Skip to content
Agent Search Engine.

Record · mcp-server-mMCP serverOpen sourceVerified Sep 23, 2026

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.

Best for

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 CodeRun in your terminal
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-mysql
Cursor~/.cursor/mcp.json or .cursor/mcp.json
{
  "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.vscode/mcp.json
{
  "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 Desktopclaude_desktop_config.json
{
  "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~/.codex/config.toml
[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>" }

Check the project's README for required accounts, keys and permissions before connecting. Setup guide for each client →

For agent buildersMake your product part of the discovery.Explore advertising

MCP Server for MySQL vs. the alternatives

All 163 alternatives →
RecordStarsPricing
MCP Server for MySQLMCP serverthis listing2.1kOpen source
MCP Reference ServersMCP server91kOpen source
context7MCP server62kOpen source
chrome-devtools-mcpMCP server53kOpen source
Playwright MCPMCP server37kOpen source
github-mcp-serverMCP server33kOpen source

See all 163 MCP Server for MySQL alternatives, compared →