Mysql MCP Server Pro logo

Mysql MCP Server Pro

by wenb1n-dev

MySQL MCP access with role-based SQL permissions, schema discovery, health checks, lock analysis, and query optimization.

Install Mysql MCP Server Pro

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "wenb1n-dev-mysql-mcp-server-pro": {
      "command": "uvx",
      "args": [
        "mysql_mcp_server_pro",
        "mysql_mcp_server_pro",
        "stdio"
      ],
      "env": {
        "MYSQL_HOST": "YOUR_VALUE_HERE",
        "MYSQL_PORT": "YOUR_VALUE_HERE",
        "MYSQL_USER": "YOUR_VALUE_HERE",
        "MYSQL_PASSWORD": "YOUR_VALUE_HERE",
        "MYSQL_DATABASE": "YOUR_VALUE_HERE",
        "MYSQL_ROLE": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx mysql_mcp_server_pro mysql_mcp_server_pro stdio

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

wenb1n-dev/mysql_mcp_server_pro MCP server exposes MySQL operations and diagnostics through MCP in STDIO, SSE, or Streamable HTTP modes. It can execute SQL within role-based permissions, inspect schemas and indexes, analyze locks and database health, and generate SQL optimization suggestions. Use it when an agent needs controlled access to a MySQL database for querying, administration, or performance investigation. Configuration uses MySQL connection environment variables, with optional OAuth2 support for the HTTP service.

Use cases

  • Run permitted MySQL queries from an MCP client
  • Inspect table schemas and indexes from comments
  • Diagnose MySQL locks and running health
  • Review unused and redundant indexes
  • Optimize SQL using execution-plan information

Key features

  • STDIO, SSE, and Streamable HTTP transports
  • Role-based SQL permissions
  • MySQL schema and index inspection
  • Database health and lock analysis
  • SQL execution-plan optimization suggestions
  • Optional OAuth2 for HTTP mode

Tools10

What Mysql MCP Server Pro lets your agent do. Expand a tool for its parameters.

Self-reported~361 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

34/35 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · mysql_mcp_server_pro (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars249Stargazers on the source repository.
Last commit1y agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed10Callable tools this server registers over MCP.
Directory activity11 viewsConfig copies, upvotes, and views on AllMCPs.

How Mysql MCP Server Pro works

What wenb1n-dev/mysql_mcp_server_pro MCP server does

wenb1n-dev/mysql_mcp_server_pro MCP server connects an MCP client to a configured MySQL database and exposes both SQL execution and database investigation tools. It supports three transport modes: STDIO for local client processes, SSE, and Streamable HTTP. The HTTP service can also be started with OAuth2 authentication enabled.

SQL execution is governed by a configured role. The available roles are readonly, writer, and admin. Readonly permits SELECT, SHOW, DESCRIBE, and EXPLAIN statements. Writer adds INSERT, UPDATE, and DELETE, while admin also permits CREATE, ALTER, DROP, and TRUNCATE. The server supports multiple SQL statements separated by semicolons.

How it works

Set the MySQL host, port, username, password, and database through environment variables or a .env file. The server reads those settings when it starts and uses the selected role to determine which SQL statements the execute_sql tool may run.

The remaining tools query the connected database or process supplied metadata. Schema tools can find table names from comments, retrieve table definitions, and inspect indexes across multiple tables. Diagnostic tools report connection, transaction, running, and lock status; inspect row-level and table-level locks; and review index usage, including redundant, poorly performing, and unused indexes. The SQL optimizer uses execution plans, table structure, row counts, and index information to produce recommendations.

The analyzing-mysql-prompt and query-table-data-prompt prompt templates support guided MySQL analysis and table-data queries. The query-table-data tool is not enabled as a typical fixed tool by default and requires code changes described by the project.

Setup and configuration

Install the package with:

Terminal
pip install mysql_mcp_server_pro

Provide these environment variables in a .env file or directly in the process environment:

text
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_database
MYSQL_ROLE=readonly

MYSQL_ROLE defaults to readonly; the documented alternatives are writer and admin. An environment file can be selected with --envfile. The default service command starts Streamable HTTP, while --mode sse selects SSE and --oauth true enables OAuth2 authentication for the HTTP service.

For local MCP clients, the package can be launched through uvx in STDIO mode.

Tools and capabilities

wenb1n-dev/mysql_mcp_server_pro MCP server includes:

  • execute_sql for permitted SQL statements.
  • get_table_name for finding tables from comments or descriptions.
  • get_table_desc and get_table_index for multi-table schema and index inspection.
  • get_db_health_running for connection, transaction, running-state, and lock checks.
  • get_table_lock for row-level and table-level lock detection.
  • get_db_health_index_usage for index-use analysis and unused-index reporting.
  • optimize_sql for execution-plan-based performance suggestions.
  • get_chinese_initials for converting Chinese field names to pinyin initials.

Limitations and notes

The server requires a reachable MySQL database and valid connection settings. SQL permissions are controlled by the selected application role, so an agent cannot use statements outside that role's configured list. OAuth2 is documented for the HTTP service, while the database still requires its MySQL credentials. The prompt-based table-query workflow requires modification to enable it as a commonly used fixed tool.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mysql MCP Server Pro

Run `pip install mysql_mcp_server_pro`, then configure the MySQL connection environment variables.

Yes.

It supports readonly, writer, and admin roles. These allow progressively broader SQL command groups, from read-only statements through schema-changing commands.

Yes. It includes tools for row-level and table-level locks, database health, index usage, redundant indexes, poorly performing indexes, and unused indexes.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMysql MCP Server Pro AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/wenb1n-dev-mysql-mcp-server-pro?style=directory)](https://allmcps.com/mcp/wenb1n-dev-mysql-mcp-server-pro)
HTML Embed
<a href="https://allmcps.com/mcp/wenb1n-dev-mysql-mcp-server-pro"><img src="https://allmcps.com/api/badge/wenb1n-dev-mysql-mcp-server-pro?style=directory" alt="Mysql MCP Server Pro on AllMCPs" /></a>