Skip to content
Agent Search Engine.

Record · mcp-server-mMCP serverCosts not checkedRecord checked 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 listed in this index written primarily in JavaScript, with 2.2k stars on GitHub. Its latest recorded repository push was in July 2026; that is not an ASE editorial review date.

Before connecting: access and data

This record's specific permissions have not been reviewed by ASE. Read the publisher's documentation before copying setup or connecting.

  • List the accounts, files and services the enabled tools can read, change or execute. Check your actual credentials and discovered tools.
  • Use narrowly scoped credentials and read-only mode where supported. Review proposed writes before approving them; a generated configuration does not apply these limits for you.
  • Local launch is not local-only data processing. External services receive requests, and your client may pass tool results to its model provider. Check both destinations before sharing private data.
  • Keep keys and browser session files out of shared config, repositories and screenshots. Know how to disconnect the server and separately revoke its credentials or account sessions.

Read the setup guide →

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