Verified

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

ToolDescriptionRisk
mysql.queryExecutes one read-only SELECT/UNION; parameters are bound through driver placeholderslow
mysql.explainRuns safe EXPLAIN on a query that has passed the read-only policylow
mysql.executeExecutes one classified DML or DDL statement; the result identifies the transaction modehigh
mysql.metadata.schemasLists visible schemaslow
mysql.metadata.tablesLists tables/views in a schemalow
mysql.metadata.describe_tableReturns table and column informationlow
mysql.metadata.indexesReturns index informationlow
mysql.metadata.constraintsReturns constraint and foreign key informationlow
mysql.monitor.overviewVersion, host, read-only status, connection counts, and other overview datalow
mysql.monitor.storageAggregates tables, data, and index space by schemalow

Compatibility

ClientLocalDockerRemoteRead-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

Badge

Mysql MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.