mysql-mcp MCP Server

A Model Context Protocol (MCP) server that gives AI agents direct access to MySQL databases.

Local serverstdioMIT

What is the mysql-mcp Server?

mysql-mcp is an MCP project maintained in the turkeryildirim/mysql-mcp repository. The maintainer describes its purpose as “A Model Context Protocol (MCP) server that gives AI agents direct access to MySQL databases”. Read the project documentation for the complete scope.

Local setup

The project provides a local client configuration using node. 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, MAX_ROWS, ALLOW_DESTRUCTIVE_DDL. 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 mysql-mcp Server

{
  "mcpServers": {
    "mysql": {
      "command": "node",
      "args": [
        "/absolute/path/to/mysql-mcp/dist/index.js"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "mcp_user",
        "MYSQL_PASSWORD": "YOUR_MYSQL_PASSWORD",
        "MYSQL_DATABASE": "",
        "MAX_ROWS": "1000",
        "ALLOW_DESTRUCTIVE_DDL": "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
MAX_ROWSDeclared in the maintainer’s client configuration.Check documentation
ALLOW_DESTRUCTIVE_DDLDeclared in the maintainer’s client configuration.Check documentation