mysql_mcp_server_pro  by wenb1n-dev

MySQL database interaction and analysis tool

Created 5 months ago
256 stars

Top 98.7% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Model Context Protocol (MCP) server that enhances MySQL database interactions by incorporating anomaly detection and extensibility for custom tools. It targets developers who need advanced database management capabilities beyond standard CRUD operations, offering features like SQL analysis, health checks, and permission control, all while supporting various MCP transfer modes and OAuth2.0.

How It Works

The server acts as an intermediary, translating MCP requests into executable MySQL operations. It leverages a suite of specialized tools for tasks such as SQL execution, schema inspection, performance analysis, and database health monitoring. Key features include permission-based access control, Chinese-to-Pinyin conversion for field names, and the ability to analyze SQL execution plans and table locks, providing a robust framework for intelligent database interaction.

Quick Start & Requirements

  • Installation: pip install mysql_mcp_server_pro
  • Prerequisites: MySQL database, Python environment.
  • Configuration: Requires a .env file with MySQL connection details (host, port, user, password, database) and an optional MYSQL_ROLE (readonly, writer, admin).
  • Running:
    • SSE mode: mysql_mcp_server_pro --mode sse --envfile /path/to/.env
    • Streamable Http mode: mysql_mcp_server_pro --envfile /path/to/.env
    • OAuth2.0: mysql_mcp_server_pro --oauth true
  • Docs: Usage instructions and client configuration examples are provided in the README.

Highlighted Details

  • Supports all MCP transfer modes: STDIO, SSE, Streamable Http.
  • Includes advanced analysis tools: SQL execution plan, table lock, database health, and index usage.
  • Offers role-based permission control (readonly, writer, admin).
  • Facilitates custom tool extensions by inheriting from BaseHandler.

Maintenance & Community

Information regarding maintainers, community channels (Discord/Slack), or a public roadmap is not detailed in the provided README.

Licensing & Compatibility

The README does not explicitly state the project's license. Compatibility for commercial use or closed-source linking would require clarification on the licensing terms.

Limitations & Caveats

The README mentions that the use_prompt_queryTableData tool is not commonly used and requires code modification to enable. Specific details on supported MySQL versions or potential compatibility issues with certain database configurations are not provided.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
12 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.