
mysql_mcp_server
MCP server giving AI assistants safe, structured read and query access to MySQL databases
The repository was last updated 36 days ago and is published under MIT.
mysql_mcp_server is an open-source MCP server for databases. It is available on CLI, API, Self-hosted, Linux, macOS, Windows and VS Code.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- What it can do
- Can change data (1 tool)
- GitHub stars
- 1.4K
- Last commit
Similar MCP servers
About mysql_mcp_server
The server sits between an AI client and a MySQL instance, letting the assistant list tables, inspect schemas, sample rows and run SQL through a defined set of tools rather than a raw connection. Connection details are supplied through environment variables, and it can work across several databases on one server when no single database is pinned.
It runs over standard input/output for local clients such as Claude Desktop, Claude Code and VS Code, or over Streamable HTTP/SSE for remote deployments. SSL/TLS and SSH tunnelling are supported for reaching databases on private networks, and passwords and SSH keys are masked in logs.
The project suits developers and data analysts who want an assistant to explore a MySQL schema and answer questions about its data. Because the SSE mode has no built-in authentication, the documentation recommends a dedicated low-privilege database user and a reverse proxy when exposing it beyond localhost.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 3 tools changes data.
From the server's own tool labels and tool names; not verified by us.
- execute_sqlName suggests: changes
- Executes standard SQL queries, with DML flagged as destructive.
- get_schema_infoName suggests: reads
- Returns column metadata for a table or database structure.
- get_table_sampleName suggests: reads
- Fetches a sample of rows from a table, up to 20.
What it does
- Table and schema discovery
- Lists tables as resources and returns column names, types, nullability, defaults and comments.
- SQL query execution
- Runs SELECT, SHOW, DESCRIBE and DML statements, with DML flagged as destructive.
- Table data sampling
- Fetches a small sample of rows so an assistant can understand data formats quickly.
- Multi-database mode
- Works across all user databases when no default database is set, using database.table names.
- SSH tunnelling and TLS
- Connects to databases behind jump hosts and supports SSL modes up to certificate identity verification.
- Prewritten exploration prompts
- Provides guided prompts for exploring a whole database or analysing a single table.
Good for
- Letting an AI assistant explore an unfamiliar MySQL schema and summarise what it contains
- Asking natural-language questions of production or analytics tables in Claude Desktop or VS Code
- Sampling table contents to check data formats before writing queries
- Running self-hosted MCP access to a database over SSE for a small team
Pricing
Open source
Free and MIT-licensed; a third-party hosted version is also listed.
Prices change. Check designcomputer.com before you buy.
More servers for the same service
mysql_mcp_server FAQ
Which transport modes does mysql_mcp_server support?
It supports standard input/output for local clients and Streamable HTTP (SSE) for remote or self-hosted deployments.
Can mysql_mcp_server run multi-statement SQL queries?
No. Only single SQL statements are supported in execute_sql, and multi-statement queries such as USE followed by SELECT are rejected.
Does the SSE mode require authentication?
No built-in authentication is included, so the documentation recommends placing it behind a reverse proxy that enforces credentials when it is exposed beyond localhost.
How is the license?
The project is released under the MIT License.
Is mysql_mcp_server free?
Yes. mysql_mcp_server is open source, so you can use and self-host it for free.
What are the best alternatives to mysql_mcp_server?
The closest alternatives to mysql_mcp_server are mcp-server-mysql, mcp-mysql-server, mysql_mcp_server_pro, mysql-mcp-server and mcp-alchemy.
Where this comes from
- Description: written from the project's README and the project's website.



