MCP Server for MySQL
Let Claude and other LLMs inspect MySQL schemas and run queries, read-only unless you opt in to writes.
Sources and review
Checked against public documentation on . Suitability guidance is our editorial judgment; this is not a performance benchmark or an endorsement.
Letting an assistant explore and query a MySQL database safely, with writes off by default.
About MCP Server for MySQL
This community MCP server gives AI assistants access to MySQL: schema inspection and queries, with write operations enabled only through environment flags. It supports SSH tunnels to remote databases, a multi-database mode, per-schema read/write permissions and automatic redaction of personal data, and is tuned for Claude Code.
MCP Server for MySQL is an open-source project written primarily in JavaScript, with 2.1k stars on GitHub. It was last updated in July 2026.
Add MCP Server for MySQL 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 mcp-server-mysql -e MYSQL_HOST=127.0.0.1 -e MYSQL_PORT=3306 -e 'MYSQL_USER=<user>' -e 'MYSQL_PASS=<password>' -e 'MYSQL_DB=<database>' -- npx -y @benborla29/mcp-server-mysqlCursor
{
"mcpServers": {
"mcp-server-mysql": {
"command": "npx",
"args": ["-y", "@benborla29/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "<user>",
"MYSQL_PASS": "<password>",
"MYSQL_DB": "<database>"
}
}
}
}VS Code
{
"servers": {
"mcp-server-mysql": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@benborla29/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "<user>",
"MYSQL_PASS": "<password>",
"MYSQL_DB": "<database>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"mcp-server-mysql": {
"command": "npx",
"args": ["-y", "@benborla29/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "<user>",
"MYSQL_PASS": "<password>",
"MYSQL_DB": "<database>"
}
}
}
}Codex
[mcp_servers.mcp-server-mysql]
command = "npx"
args = ["-y", "@benborla29/mcp-server-mysql"]
env = { MYSQL_HOST = "127.0.0.1", MYSQL_PORT = "3306", MYSQL_USER = "<user>", MYSQL_PASS = "<password>", MYSQL_DB = "<database>" }MCP Server for MySQL vs. the alternatives
All 163 alternatives →| Record | Stars | Pricing | ||
|---|---|---|---|---|
| MCP Server for MySQLthis listing | 2.1k | JavaScript | 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 |
