mysql_mcp_server_pro
by wenb1n-dev·★ 244·Score 46
A comprehensive MCP server for MySQL databases with advanced query, analysis, and optimization capabilities.
Overview
The mysql_mcp_server_pro is a robust MCP server that extends beyond basic CRUD operations to provide comprehensive database management features. It includes specialized tools for SQL execution, Chinese field name conversion, health status analysis, table lock detection, and performance optimization. The server supports multiple MCP transfer modes (STDIO, SSE, Streamable Http) and implements OAuth2.0 for secure access with role-based permissions (readonly, writer, admin). It also offers built-in prompt templates for enhanced MySQL interaction.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MySQL MCP server when you need database health monitoring, performance optimization, and Chinese field name support in addition to basic CRUD operations.
When NOT to choose this
Don't choose this if you need support for non-MySQL databases, or if you require a simpler solution with fewer specialized features.
Tools this server exposes
10 tools extracted from the READMEexecute_sqlSQL execution tool that can execute various SQL commands based on permission configuration
get_chinese_initialsConvert Chinese field names to pinyin initials
get_db_health_runningAnalyze MySQL health status including connection, transaction, and lock status
get_table_descSearch for table structures in the database based on table names
get_table_indexSearch for table indexes in the database based on table names
get_table_lockCheck for row-level or table-level locks in the MySQL server
get_table_nameSearch for table names in the database based on table comments and descriptions
get_db_health_index_usageGet index usage statistics including redundant and poorly performing indexes
optimize_sqlProvide SQL optimization suggestions based on execution plans and table structure
use_prompt_queryTableDataUse built-in prompts to construct tool chains for querying table data
Comparable tools
Installation
Installation
- Install the package:
pip install mysql_mcp_server_pro- Configure environment variables in a .env file:
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_database
MYSQL_ROLE=readonly # or writer, admin- Start the service:
# SSE mode
mysql_mcp_server_pro --mode sse --envfile /path/to/.env
# Streamable Http mode (default)
mysql_mcp_server_pro --envfile /path/to/.env
# With OAuth authentication
mysql_mcp_server_pro --oauth trueClaude Desktop Configuration
Add to Claude Desktop config.json:
{
"mcpServers": {
"mysql": {
"command": "uvx",
"args": [
"--from",
"mysql_mcp_server_pro",
"mysql_mcp_server_pro",
"--mode",
"stdio"
],
"env": {
"MYSQL_HOST": "your_host",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database",
"MYSQL_ROLE": "admin"
}
}
}
}FAQ
- What authentication methods does this MCP server support?
- The server supports both basic authentication with environment variables and OAuth2.0 authentication with a token-based system.
- How can I extend the server with custom tools?
- You can add a new tool class in the handles package, inherit from BaseHandler, and implement get_tool_description and run_tool methods, then import it in __init__.py.
Compare mysql_mcp_server_pro with
Last updated · Auto-generated from public README + GitHub signals.