MCP.Market

MySQL MCP Server

by musaddiq-dev·io.github.musaddiq-dev/mysql-mcp-server·v0.1.2

Python MCP server for MySQL database inspection and querying

B72/100grade B
What users say
No reviews yet
Be the first
Safety scan
B72/100

full report

Adoption
New

0 stars33 downloads/wk

Reviews

Write one

Nobody has reviewed MySQL MCP Server yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

MySQL MCP Server tools (8, 3 write)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • mysql_describe_table

    Describe the schema of a specific table.

  • mysql_execute_ddlwrite action

    Execute a DDL (Data Definition Language) statement for schema modifications.

  • mysql_execute_read_querywrite action

    Execute a SELECT query and return the results.

  • mysql_execute_write_querywrite action

    Execute a data modification query (INSERT, UPDATE, DELETE) and return the results.

  • mysql_explain_query

    Explain the execution plan of a SQL query.

  • mysql_get_database_summary

    Get a comprehensive summary of the current database.

  • mysql_get_table_ddl

    Get the DDL (Data Definition Language) statement for creating a table.

  • mysql_list_tables

    List all tables in the database.

Public scan report

scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it

no findings
  • Code scan4 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 127 days ago8/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 72/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How MySQL MCP Server compares

Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
72/100
higher than 30% of 802 Databases servers
Tools
8
the typical Databases server has 8
Tools that change things
38%
typical: 10%. Fewer write tools means less an agent can break
Downloads a week
33
more than 20% of 324 Databases servers with a package

What its tools let an agent do: 5 read · 3 change

Install MySQL MCP Server in Claude Code, Cursor or VS Code

claude mcp add mysql-mcp-server -- uvx mdev-mysql-mcp-server
Add to Cursor

What the publisher says

From the MySQL MCP Server repository's README, as published. We do not edit it. Read it on GitHub

<!-- mcp-name: io.github.musaddiq-dev/mysql-mcp-server -->

MySQL MCP Server

A Python Model Context Protocol (MCP) server for inspecting and querying MySQL databases from MCP-compatible clients. It provides table discovery, schema inspection, read query execution, DDL lookup, query explanation, and optional write/DDL tools for controlled database administration workflows.

Features

  • List tables and describe table schemas
  • Execute SELECT queries with safety checks
  • Retrieve SHOW CREATE TABLE output
  • Explain query execution plans
  • Summarize tables and row counts
  • Optional write and DDL tools for users who intentionally run with elevated database privileges

Safety Model

mysqlexecutereadquery only accepts a single statement beginning with SELECT, rejects common modifying SQL keywords and risky file-read/write forms, and caps returned rows by MYSQLREADQUERYLIMIT. This is a guardrail, not a substitute for database permissions. Use a dedicated read-only MySQL user for safe exploration. The write and DDL tools can modify or destroy data if the configured database user is allowed to do so; keep them on manual approval in your MCP client.

Requirements

  • Python 3.11+
  • MySQL 5.7+ or MySQL 8.0+
  • MCP-compatible client such as Claude Desktop, Cursor, VS Code, or another MCP host

Installation

When published to PyPI, install or run the server like a standard Python MCP package:

uvx mdev-mysql-mcp-server

For local development from source:

git clone https://github.com/musaddiq-dev/mysql-mcp-server.git
cd mysql-mcp-server
python -m venv .venv
source .venv/bin/activate
pip install -e .

Configuration

Copy the example environment file and update it with your database connection details.

cp .env.example .env

Example read-only user:

CREATE USER 'mcp_readonly'@'localhost' IDENTIFIED BY 'change-me';
GRANT SELECT ON your_database.* TO 'mcp_readonly'@'localhost';
FLUSH PRIVILEGES;

Running

mdev-mysql-mcp-server

From a local checkout before PyPI publication, run:

python -m mysql_mcp_server.server

MCP Client Configuration

For published installs, prefer uvx. MCP servers using stdio must write protocol messages only to stdout; this server writes logs to stderr through Python logging.

Claude Desktop / Cursor / Windsurf / Cline

Most MCP clients accept this mcpServers JSON shape:

{
  "mcpServers": {
    "mysql": {
      "command": "uvx",
      "args": ["mdev-mysql-mcp-server"],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "mcp_readonly",
        "MYSQL_PASSWORD": "change-me",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

For local development from this repository, use the installed console script path instead:

{
  "mcpServers": {
    "mysql": {
      "command": "/absolute/path/to/mysql-mcp-server/.venv/bin/mdev-mysql-mcp-server",
      "args": [],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "mcp_readonly",
        "MYSQL_PASSWORD": "change-me",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

Claude Code CLI

claude mcp add mysql \
  --env MYSQL_HOST=localhost \
  --env MYSQL_PORT=3306 \
  --env MYSQL_USER=mcp_readonly \
  --env MYSQL_PASSWORD=change-me \
  --env MYSQL_DATABASE=your_database \
  -- uvx mdev-mysql-mcp-server

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

MySQL MCP Server: common questions

Is MySQL MCP Server safe?
Mostly: it is graded B (72/100). Read the MySQL MCP Server safety report
How do I install MySQL MCP Server?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does MySQL MCP Server need an API key?
Yes. The registry entry asks for MYSQL_PASSWORD.
Is MySQL MCP Server maintained?
The last commit was 163 days ago (2026-05-23). The latest release is v0.1.2.
What can I use instead of MySQL MCP Server?
Servers from other publishers that do the same job: DBHub MCP server, Appwrite MCP server and Sling CLI MCP server.
How does MySQL MCP Server compare with other Databases MCP servers?
safety score 72/100 (higher than 30% of 802 Databases servers); tools 8 (the typical Databases server has 8); tools that change things 38% (typical: 10%. Fewer write tools means less an agent can break). Full comparison.

Alternatives to MySQL MCP Server

Same job from other publishers: the closest match first, then the best rated.

  • DBHub
    Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite
    A
  • Appwrite
    Build and deploy backends: auth, Postgres/MySQL/vector databases, storage, functions, hosting, CDN
    A
  • Sling CLI
    Sling CLI MCP server for querying any database, running data pipelines and managing replications
    B
  • Faucet
    SQL database to MCP tools and REST API: PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake.
    A
  • Quarry
    Safety-railed database access: Postgres, MySQL, SQLite, Redis. Read-only by default.
    A

More from musaddiq-dev →