MCP Catalogs
Homemysql_mcp_server_pro screenshot

mysql_mcp_server_pro

by wenb1n-dev·244·Score 46

A comprehensive MCP server for MySQL databases with advanced query, analysis, and optimization capabilities.

databasedeveloper-toolsmonitoring
43
Forks
14
Open issues
9 mo ago
Last commit
2d ago
Indexed

Overview

The mysql_mcp_server_pro is a robust MCP server that extends beyond basic CRUD operations to provide comprehensive database management features. It includes specialized tools for SQL execution, Chinese field name conversion, health status analysis, table lock detection, and performance optimization. The server supports multiple MCP transfer modes (STDIO, SSE, Streamable Http) and implements OAuth2.0 for secure access with role-based permissions (readonly, writer, admin). It also offers built-in prompt templates for enhanced MySQL interaction.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Database administrators monitoring MySQL health status and analyzing performance issues
you:Developers executing secure SQL queries with proper access controls
you:Data analysts optimizing slow queries and analyzing database indexes
you:What authentication methods does this MCP server support?
you:How can I extend the server with custom tools?

When to choose this

Choose this MySQL MCP server when you need database health monitoring, performance optimization, and Chinese field name support in addition to basic CRUD operations.

When NOT to choose this

Don't choose this if you need support for non-MySQL databases, or if you require a simpler solution with fewer specialized features.

Tools this server exposes

10 tools extracted from the README
  • execute_sql

    SQL execution tool that can execute various SQL commands based on permission configuration

  • get_chinese_initials

    Convert Chinese field names to pinyin initials

  • get_db_health_running

    Analyze MySQL health status including connection, transaction, and lock status

  • get_table_desc

    Search for table structures in the database based on table names

  • get_table_index

    Search for table indexes in the database based on table names

  • get_table_lock

    Check for row-level or table-level locks in the MySQL server

  • get_table_name

    Search for table names in the database based on table comments and descriptions

  • get_db_health_index_usage

    Get index usage statistics including redundant and poorly performing indexes

  • optimize_sql

    Provide SQL optimization suggestions based on execution plans and table structure

  • use_prompt_queryTableData

    Use built-in prompts to construct tool chains for querying table data

Comparable tools

postgres-mcpsqlite-mcpmysql-shell-mcp

Installation

Installation

  1. Install the package:
pip install mysql_mcp_server_pro
  1. Configure environment variables in a .env file:
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_database
MYSQL_ROLE=readonly # or writer, admin
  1. Start the service:
# SSE mode
mysql_mcp_server_pro --mode sse --envfile /path/to/.env

# Streamable Http mode (default)
mysql_mcp_server_pro --envfile /path/to/.env

# With OAuth authentication
mysql_mcp_server_pro --oauth true

Claude Desktop Configuration

Add to Claude Desktop config.json:

{
  "mcpServers": {
    "mysql": {
      "command": "uvx",
      "args": [
        "--from",
        "mysql_mcp_server_pro",
        "mysql_mcp_server_pro",
        "--mode",
        "stdio"
      ],
      "env": {
        "MYSQL_HOST": "your_host",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "your_username",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database",
        "MYSQL_ROLE": "admin"
      }
    }
  }
}

FAQ

What authentication methods does this MCP server support?
The server supports both basic authentication with environment variables and OAuth2.0 authentication with a token-based system.
How can I extend the server with custom tools?
You can add a new tool class in the handles package, inherit from BaseHandler, and implement get_tool_description and run_tool methods, then import it in __init__.py.

Compare mysql_mcp_server_pro with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.