Mysql MCP Server

Provides an MCP server for interacting with MySQL databases using read-only and test-execute queries.

Local serverstdioTypeScript★ 6

What is the Mysql MCP Server?

Provides an MCP server for interacting with MySQL databases using read-only and test-execute queries.

What you get

This server supports executing read-only queries (query) and write queries that are ultimately rolled back (test_execute).

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Mysql MCP Server

{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--add-host=host.docker.internal:host-gateway",
        "--env-file",
        "/Users/username/.mcp/.env",
        "ghcr.io/xiangma9712/mcp/mysql"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Frequently asked questions

It's a server that lets you interact with MySQL databases using read-only queries and test executions of write queries that are rolled back, enhancing database safety.