MySQL MCP Server
A Python MCP server for listing, reading and querying MySQL tables through a controlled interface.
Sources and review
Checked against public documentation on . Suitability guidance is our editorial judgment; this is not a performance benchmark or an endorsement.
Querying MySQL from an MCP client in a Python environment.
About MySQL MCP Server
This community MySQL MCP server lists tables as resources, reads table contents and executes SQL with error handling. It supports a multi-database mode, SSH tunnelling and both stdio and streamable HTTP transports, with the HTTP mode suggested for remote or self-hosted deployments.
MySQL MCP Server is an open-source project written primarily in Python, with 1.4k stars on GitHub. It was last updated in August 2026.
Add MySQL MCP Server to your MCP client
Generated from the launch command in the project's README. Your client starts the server on demand. Replace <user>, <password> and <database> with your own values first.
Claude Code
claude mcp add mysql-mcp-server -e MYSQL_HOST=localhost -e 'MYSQL_USER=<user>' -e 'MYSQL_PASSWORD=<password>' -e 'MYSQL_DATABASE=<database>' -- uvx mysql_mcp_serverCursor
{
"mcpServers": {
"mysql-mcp-server": {
"command": "uvx",
"args": ["mysql_mcp_server"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "<user>",
"MYSQL_PASSWORD": "<password>",
"MYSQL_DATABASE": "<database>"
}
}
}
}VS Code
{
"servers": {
"mysql-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": ["mysql_mcp_server"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "<user>",
"MYSQL_PASSWORD": "<password>",
"MYSQL_DATABASE": "<database>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"mysql-mcp-server": {
"command": "uvx",
"args": ["mysql_mcp_server"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "<user>",
"MYSQL_PASSWORD": "<password>",
"MYSQL_DATABASE": "<database>"
}
}
}
}Codex
[mcp_servers.mysql-mcp-server]
command = "uvx"
args = ["mysql_mcp_server"]
env = { MYSQL_HOST = "localhost", MYSQL_USER = "<user>", MYSQL_PASSWORD = "<password>", MYSQL_DATABASE = "<database>" }MySQL MCP Server vs. the alternatives
All 163 alternatives →| Record | Stars | Pricing | ||
|---|---|---|---|---|
| MySQL MCP Serverthis listing | 1.4k | Python | MIT | Open source |
| MCP Reference Servers | 91k | TypeScript | MIT AND Apache-2.0 | Open source |
| context7 | 62k | TypeScript | MIT | Open source |
| chrome-devtools-mcp | 53k | TypeScript | Apache-2.0 | Open source |
| Playwright MCP | 37k | TypeScript | Apache-2.0 | Open source |
| github-mcp-server | 33k | Go | MIT | Open source |
