hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Integrations
Enables configuration of MySQL database connection settings (host, port, user, password, database) through environment variables stored in .env files.
Allows executing SQL queries against MySQL databases, supporting multiple SQL statements, table name/field querying based on comments, SQL execution plan analysis, and Chinese to pinyin field conversion.
mcp_mysql_server
Introduction
mcp_mysql_server_pro is not just about MySQL CRUD operations, but also includes database anomaly analysis capabilities and makes it easy for developers to extend with custom tools.
- Supports both STDIO and SSE modes
- Supports multiple SQL execution, separated by ";"
- Supports querying database table names and fields based on table comments
- Supports SQL execution plan analysis
- Supports Chinese field to pinyin conversion
- Supports table lock analysis
- Supports permission control with three roles: readonly, writer, and adminCopy
Usage Instructions
SSE Mode
- Use uv to start the service
Add the following content to your mcp client tools, such as cursor, cline, etc.
mcp json as follows:
Modify the .env file content to update the database connection information with your database details:
Start commands:
STDIO Mode
Add the following content to your mcp client tools, such as cursor, cline, etc.
mcp json as follows:
Custom Tool Extensions
- Add a new tool class in the handles package, inherit from BaseHandler, and implement get_tool_description and run_tool methods
- Import the new tool in init.py to make it available in the server
Examples
- Create a new table and insert data, prompt format as follows:
- Query data based on table comments, prompt as follows:
- Analyze slow SQL, prompt as follows:
- Analyze SQL deadlock issues, prompt as follows:
You must be authenticated.
Added support for STDIO mode and SSE mode Added support for multiple SQL execution, separated by ";" Added ability to query database table names and fields based on table comments Added SQL Execution Plan Analysis Added Chinese field to pinyin conversion