Mysql MCP Server
MySQL database queries, metadata, and monitoring accessible via MCP tools.
Data last scanned today · Reviewed today
Overview
This MySQL MCP server, implemented in Go, provides a bridge between AI models and your database infrastructure. It supports both MySQL 5.7 and 8.x, enabling capabilities such as metadata inspection, administrative operations, and query execution through stdio or Streamable HTTP interfaces. The server manages multiple data sources, each with dedicated connection pools for reads, writes, and monitoring. Built with a focus on granular control, the server utilizes AST-based SQL classification rather than simple string matching to enforce security. It includes configurable limits on query duration, result size, and row counts, alongside a robust configuration validator for management. Operational safety is prioritized through a strict read-only default and gated write access that checks against both SQL policy and database account permissions.
Our verdict
With a security score of 30/100, this project carries a high risk level. The score reflects that the server is community-maintained by a single contributor rather than an official vendor, lacks external editorial review, and has limited community adoption. While the implementation includes advanced security features like AST-based SQL validation, the critical lack of an external security audit means it should be used cautiously, primarily in testing or non-sensitive environments until further peer verification occurs.
- Uses AST-based SQL classification for robust query filtering.
- Enforces strict limits on result sizes and query duration.
- Includes a Makefile for reproducible builds and testing.
- Maintains zero direct dependencies to minimize supply-chain risk.
- High security risk due to lack of external code review.
- Single-contributor project with limited adoption tracking.
- Not maintained by the official MySQL vendor.
Tools
| Tool | Description | Risk |
|---|---|---|
| mysql.query | Executes one read-only SELECT/UNION; parameters are bound through driver placeholders | low |
| mysql.explain | Runs safe EXPLAIN on a query that has passed the read-only policy | low |
| mysql.execute | Executes one classified DML or DDL statement; the result identifies the transaction mode | high |
| mysql.metadata.schemas | Lists visible schemas | low |
| mysql.metadata.tables | Lists tables/views in a schema | low |
| mysql.metadata.describe_table | Returns table and column information | low |
| mysql.metadata.indexes | Returns index information | low |
| mysql.metadata.constraints | Returns constraint and foreign key information | low |
| mysql.monitor.overview | Version, host, read-only status, connection counts, and other overview data | low |
| mysql.monitor.storage | Aggregates tables, data, and index space by schema | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| ChatGPT | ||||
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf |
Frequently asked questions
›Which MySQL versions are supported by this server?
This server supports MySQL 5.7 and MySQL 8.x.
›How are write operations handled?
The server defaults to read-only mode for security, and all write operations must pass global feature gates, data source policies, SQL AST validation, and database account permissions.
›Can I connect to multiple databases at once?
Yes, a single process can connect to multiple MySQL data sources, each maintaining independent connection pools for reads, writes, and monitoring.
›What authentication options are available for HTTP mode?
HTTP mode supports either unauthenticated access or static Bearer Token authentication.
›Does the server enforce limits on resource usage?
Yes, the server enforces strict limits on query duration, SQL size, row count, result size, and concurrency per data source.
›How should I configure the Docker container for HTTP traffic?
You must set the listener to 0.0.0.0:8080 in your configuration file, as a loopback listener inside the container cannot receive traffic published by Docker.
Alternatives
Changelog
- Improvedv1.0.0
2026-08-21
Badge
Maintain this server? Add the live badge to your README.