Skip to main content
Glama
guido-marinho

MySQL MCP Server

MySQL MCP Server

A Model Context Protocol server that provides read-only access to MySQL databases.

Features

Tools

  • query - Execute read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN)

    • All queries run within READ ONLY transactions

Resources

  • Table schemas - Automatic discovery of tables and columns with their types, keys, and constraints

Related MCP server: @cano721/mysql-mcp-server

Installation

Docker

docker build -t mcp/mysql .
docker run -i --rm mcp/mysql mysql://user:password@host:3306/database

NPM

npm install -g @modelcontextprotocol/server-mysql

NPX

npx -y @modelcontextprotocol/server-mysql mysql://user:password@localhost:3306/database

Usage

Add to your MCP's config:

docker pull guidomarinho/mcp-mysql
{
  "mcpServers": {
    "your_mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "guidomarinho/mcp-mysql:latest",
        "mysql://root:password@host.docker.internal:3306/you_db"
      ],
      "env": {}
    }
  }
}

Using local Docker

{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/mysql",
        "mysql://root:password@host.docker.internal:3306/database"
      ]
    }
  }
}

Using NPX

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mysql",
        "mysql://user:password@localhost:3306/database"
      ]
    }
  }
}

Note: When using Docker to connect to a MySQL server on your host machine, use host.docker.internal instead of localhost.

Connection String Format

mysql://username:password@host:port/database

Development

npm install
npm run build
node dist/index.js mysql://user:password@localhost:3306/database

License

MIT

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    Enables safe interaction with MySQL databases through SELECT queries, table structure inspection, and database schema exploration. Provides read-only access to query data and examine database metadata.
    1
  • A
    license
    A
    quality
    D
    maintenance
    Enables read-only MySQL database access, allowing listing databases, tables, describing schemas, and executing SELECT/SHOW/DESCRIBE/EXPLAIN queries.
    7
    66
    4
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Enables AI assistants to securely interact with MySQL databases, including listing tables, viewing schemas, and executing read-only SQL queries through natural language.
    6
  • A
    license
    -
    quality
    D
    maintenance
    Enables schema introspection and safe read-only queries on MySQL databases, supporting table/column discovery, relationship exploration, and controlled SELECT queries.
    11
    MIT

View all related MCP servers

Related MCP Connectors

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

  • GibsonAI MCP server: manage your databases with natural language

  • Read-only Yandex Metrika MCP. Query visits, sources, geo, devices and more in plain language.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/guido-marinho/mcp-mysql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server