MCP MySQL Server

MCP MySQL Server is a Go-based MCP server implementation that provides MySQL database interaction functionality, allowing MCP clients (e.g., Claude Desktop) to perform database operations.

Local serverstdio

What is the MCP MySQL Server MCP Server?

MCP MySQL Server is an MCP project maintained in the cnosuke/mcp-mysql repository. The maintainer describes its purpose as “MCP MySQL Server is a Go-based MCP server implementation that provides MySQL database interaction functionality, allowing MCP clients (e.g., Claude Desktop) to perform database operations”. Read the project documentation for the complete scope.

Local setup

The project provides a local client configuration using docker. Follow the repository’s build and installation steps before copying it, and replace example paths with the paths on your own computer.

Configuration values

The example declares MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, MYSQL_READ_ONLY. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

How to install the MCP MySQL Server MCP Server

{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "cnosuke/mcp-mysql:latest"
      ],
      "env": {
        "MYSQL_HOST": "your-mysql-host",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "your-username",
        "MYSQL_PASSWORD": "YOUR_MYSQL_PASSWORD",
        "MYSQL_DATABASE": "your-database",
        "MYSQL_READ_ONLY": "false"
      }
    }
  }
}

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

Configuration

VariableDescriptionRequired
MYSQL_HOSTDeclared in the maintainer’s client configuration.Check documentation
MYSQL_PORTDeclared in the maintainer’s client configuration.Check documentation
MYSQL_USERDeclared in the maintainer’s client configuration.Check documentation
MYSQL_PASSWORDDeclared in the maintainer’s client configuration.Check documentation
MYSQL_DATABASEDeclared in the maintainer’s client configuration.Check documentation
MYSQL_READ_ONLYDeclared in the maintainer’s client configuration.Check documentation