MySQL Server Pro is an MCP server that provides standard CRUD operations, schema inspection, and database anomaly analysis for MySQL databases. Designed for developers, database administrators, and software engineers working with AI interfaces, it enables large language models to interact directly with relational databases under strict role-based access control. The server supports three operation profiles: readonly, writer, and admin, preventing unauthorized modifications according to configuration. Beyond querying and modifying data, MySQL Server Pro analyzes query execution plans, diagnoses deadlocks, evaluates table and row locks, and inspects index usage to spot redundant or underperforming indexes. It accommodates multiple MCP communication protocols, including standard input and output (STDIO), Server-Sent Events (SSE), and Streamable HTTP with optional OAuth 2.0 authentication. The server also contains tools to discover table names through table comments and convert Chinese schema names to pinyin, allowing AI agents to navigate and troubleshoot database systems accurately.
Category: Databases & Data Stores
Tags: anomaly-detection, crud, database, mysql, SQL
pip install mysql_mcp_server_pro, or execute directly using uvx. 2. Configure your MySQL credentials by creating a .env file or preparing environment variables for MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, and MYSQL_ROLE (readonly, writer, or admin). 3. To add the server to your MCP client configuration (such as Claude Desktop or Cursor) using STDIO, add the following configuration block: 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" } } } } 4. For SSE or Streamable HTTP connections, start the service using mysql_mcp_server_pro --mode sse --envfile /path/to/.env or mysql_mcp_server_pro --envfile /path/to/.env and point your client to the appropriate local URL.Part of MCP Servers
You can install MySQL Server Pro via pip with the command pip install mysql_mcp_server_pro. Alternatively, you can run it directly inside an MCP client using uvx without a manual installation step by specifying the package and necessary database environment variables in your client configuration.
MySQL Server Pro enables MCP clients to execute SQL commands, inspect table structures, and search schemas based on table comments. It also performs database diagnostics, including lock detection, running status health checks, query execution plan reviews, and index performance audits to assist with slow query troubleshooting.
The server supports STDIO for local client integration, Server-Sent Events (SSE), and Streamable HTTP. It also features built-in OAuth 2.0 password mode authentication for HTTP setups, allowing secure token-based authorization headers.
MySQL Server Pro works with any MCP-compliant client that supports STDIO, SSE, or Streamable HTTP connections, including Cursor, Cline, Trae editor, Tongyi Qianwen plugin, and Claude Desktop.