
mysql_mcp_server_pro
MCP server giving AI clients MySQL access with role-based permissions and health analysis
mysql_mcp_server_pro is an open-source MCP server for databases. It is available on CLI, API, Self-hosted, Linux, macOS and Windows.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- What it can do
- Can change data (1 tool)
- GitHub stars
- 249
- Last commit
Similar MCP servers
About mysql_mcp_server_pro
Beyond basic create, read, update and delete, this server adds diagnostics that an assistant can call: execution plan review, table lock checks, index usage reports and an overall database health check. It runs over stdio, SSE or streamable HTTP, and can be placed behind OAuth 2.0 when served over HTTP.
Access is governed by a role setting with three levels. A readonly role allows only SELECT, SHOW, DESCRIBE and EXPLAIN; writer adds INSERT, UPDATE and DELETE; admin also permits CREATE, ALTER, DROP and TRUNCATE. Several statements can be sent in one call, separated by semicolons. Lookup tools can find tables and fields from their comments, and a helper converts Chinese field names to pinyin initials.
The project is aimed at developers and data teams who want an assistant to query, explain or tune a MySQL database. Developers can add their own tools by subclassing a base handler class and registering it.
Tools this server provides (10)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 10 tools changes data; 1 name doesn't say.
From the server's own tool labels and tool names; not verified by us.
- execute_sqlName suggests: changes
- Runs SQL statements permitted by the configured role.
- get_chinese_initialsName suggests: reads
- Converts Chinese field names to pinyin initials.
- get_db_health_runningName suggests: reads
- Analyzes connection, transaction, running and lock status.
- get_table_descName suggests: reads
- Returns table structures for one or more table names.
- get_table_indexName suggests: reads
- Returns indexes for one or more tables.
- get_table_lockName suggests: reads
- Checks for row-level or table-level locks on the server.
- get_table_nameName suggests: reads
- Searches table names by comments and descriptions.
- get_db_health_index_usageName suggests: reads
- Reports index usage, redundant indexes and unused indexes.
- optimize_sql
- Suggests SQL optimizations from execution plans and table data.
- use_prompt_queryTableDataName suggests: reads
- Lets the model chain tool calls using a built-in prompt; disabled by default.
What it does
- Role-based SQL permissions
- Readonly, writer and admin roles restrict which statement types the assistant may run.
- Execution plan analysis
- Reviews query plans alongside table structure, indexes and row counts to suggest optimizations.
- Database health checks
- Reports connection, transaction, running and lock status for the connected MySQL server.
- Lock and index diagnostics
- Detects row and table locks and flags redundant, poorly performing or unused indexes.
- Comment-based table lookup
- Finds tables and their structures by searching table comments and descriptions.
- Custom tool extensions
- New tools can be added by subclassing a base handler and importing it into the server.
Good for
- Diagnosing why a slow query is slow and getting index recommendations
- Investigating a stuck UPDATE or suspected deadlock on a MySQL server
- Letting a non-expert query a database with read-only access
- Finding the right tables in a large schema by describing what they hold
- Running a quick health check on a MySQL instance from an AI client
Pricing
Open source
Free under the MIT license; self-hosted.
More servers for the same service
mysql_mcp_server_pro FAQ
What transport modes does mysql_mcp_server_pro support?
It supports STDIO, SSE and streamable HTTP transports.
How are database permissions controlled?
A MYSQL_ROLE setting chooses readonly, writer or admin, and each role allows a fixed set of SQL statement types. The default is readonly.
Can I run several SQL statements at once?
Yes, multiple statements can be executed in one request when separated by semicolons.
How do I install mysql_mcp_server_pro?
It can be installed with pip as mysql_mcp_server_pro, or run directly with uvx by adding the server to an MCP client configuration.
Is mysql_mcp_server_pro free?
Yes. mysql_mcp_server_pro is open source, so you can use and self-host it for free.
What are the best alternatives to mysql_mcp_server_pro?
The closest alternatives to mysql_mcp_server_pro are mysql_mcp_server, postgres-mcp, mcp-server-mysql, MySQL MCP Server and Mysql MCP.
Where this comes from
- Description: written from the project's README.


