Mysql Pro MCP Server

2. Configure Environment Variables Create a `.env` file with the following content: ```bash # MySQL Database Configuration MYSQL_HOST=localhost

Local serverstdioGo

What is the Mysql Pro MCP Server?

  1. Configure Environment Variables Create a .env file with the following content: bash MySQL Database Configuration MYSQL_HOST=localhost MYSQL_PORT=3306

What it actually does

mcp_mysql_server_pro is not just about MySQL CRUD operations, but also includes database anomaly analysis capabilities and makes it easy for developers to extend with custom tools.

Configuration

  • Table name: department - Common fields need indexes - Each field needs comments, table needs comment - Generate 5 real data records after creation Search for data with Department name 'Executive Office' in Department organizational structure table select * from t_jcsjzx_hjkq_cd_xsz_sk xsz left join t_jcsjzx_hjkq_jcd jcd on jcd.cddm = xsz.cddm Based on current index situation, review execution

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

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_sqlSQL execution tool that can execute ["SELECT", "SHOW", "DESCRIBE", "EXPLAIN", "INSERT", "UPDATE", "DELETE", "CREATE", "ALTER", "DROP", "TRUNCATE"] commands base
get_chinese_initialsConvert Chinese field names to pinyin initials
get_db_health_runningAnalyze MySQL health status (connection status, transaction status, running status, lock status detection)
get_table_descSearch for table structures in the database based on table names, supporting multi-table queries
get_table_indexSearch for table indexes in the database based on table names, supporting multi-table queries
get_table_lockCheck if there are row-level locks or table-level locks in the current MySQL server
get_table_nameSearch for table names in the database based on table comments and descriptions
get_db_health_index_usageGet the index usage of the currently connected mysql database, including redundant index situations, poorly performing index situations, and the top 5 unused in
optimize_sqlProfessional SQL performance optimization tool, providing expert optimization suggestions based on MySQL execution plans, table structure information, table dat
use_prompt_queryTableDataUse built-in prompts to let the model construct a chain call of tools in mcp (not a commonly used fixed tool, you need to modify the code to enable it, see this

How to install the Mysql Pro MCP Server

{
  "mcpServers": {
    "mysql": {
      "command": "uvx",
      "args": [
        "--from",
        "mysql_mcp_server_pro",
        "mysql_mcp_server_pro",
        "--mode",
        "stdio"
      ],
      "env": {
        "MYSQL_HOST": "192.168.x.xxx",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "YOUR_MYSQL_PASSWORD",
        "MYSQL_DATABASE": "a_llm",
        "MYSQL_ROLE": "admin"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Table name: department - Common fields need indexes - Each field needs comments, table needs comment - Generate 5 real data records after creation Search for data with Department name 'Executive Office' in Department organizational structure table select * from t_jcsjzx_hjkq_cd_xsz_sk xsz left join t_jcsjzx_hjkq_jcd jcd on jcd.cddm = xsz.cddm Based on current index situation, review execution
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
MYSQL_ROLEDeclared in the maintainer’s client configuration.Check documentation

Frequently asked questions

2. Configure Environment Variables Create a `.env` file with the following content: ```bash # MySQL Database Configuration MYSQL_HOST=localhost MYSQL_PORT=3306 Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.