MySQL MCP Server

A MySQL Model Context Protocol (MCP) server implemented with FastMCP 2.0 and Python.

Local serverstdio

What is the MySQL MCP Server?

MySQL MCP Server is an MCP project maintained in the ganganbiz1/mysql-mcp-server repository. The maintainer describes its purpose as “A MySQL Model Context Protocol (MCP) server implemented with FastMCP 2.0 and Python”. 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. 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.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
execute_queryExecute a SQL query and return results
execute_updateExecute an update/insert SQL query
get_tablesGet a list of tables in the database
get_table_schemaGet schema information for a specific table
describe_databaseGet comprehensive database structure information

How to install the MySQL MCP Server

{
  "mcpServers": {
    "mysqlMcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MYSQL_HOST",
        "-e",
        "MYSQL_PORT",
        "-e",
        "MYSQL_USER",
        "-e",
        "MYSQL_PASSWORD",
        "-e",
        "MYSQL_DATABASE",
        "mysql-mcp-server"
      ],
      "env": {
        "MYSQL_HOST": "host.docker.internal",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "YOUR_MYSQL_PASSWORD",
        "MYSQL_DATABASE": "mcpdb"
      }
    }
  }
}

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