MySQL MCP Server Pro
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MYSQL_HOST | No | MySQL database host address | localhost |
| MYSQL_PORT | No | MySQL database port | 3306 |
| MYSQL_ROLE | No | MySQL role for permission control. Available values: readonly, writer, admin | readonly |
| MYSQL_USER | Yes | MySQL database username | |
| MYSQL_DATABASE | Yes | MySQL database name | |
| MYSQL_PASSWORD | Yes | MySQL database password |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| execute_sqlC | 在MySQL数据库上执行SQL (支持多条SQL语句,以分号分隔) |
| get_chinese_initialsB | 创建表结构时,将中文字段名转换为拼音首字母字段 |
| get_table_descC | 根据表名搜索数据库中对应的表字段,支持多表查询(Search for table structures in the database based on table names, supporting multi-table queries) |
| get_table_indexB | 根据表名搜索数据库中对应的表索引,支持多表查询(Search for table indexes in the database based on table names, supporting multi-table queries) |
| get_table_lockB | 获取当前mysql服务器行级锁、表级锁情况(Check if there are row-level locks or table-level locks in the current MySQL server ) |
| get_table_nameB | 根据表中文名或表描述搜索数据库中对应的表名(Search for table names in the database based on table comments and descriptions ) |
| get_db_health_runningB | 获取当前mysql的健康状态(Analyze MySQL health status ) |
| get_db_health_index_usageB | 获取当前连接的mysql库的索引使用情况,包含冗余索引情况、性能较差的索引情况、未使用索引且查询时间大于30秒top5情况(Get the index usage of the currently connected mysql database, including redundant index situations, poorly performing index situations, and the top 5 unused index situations with query times greater than 30 seconds) |
| optimize_sqlB | 专业的SQL性能优化工具,基于MySQL执行计划、表结构信息、表数据量、表索引提供专家级优化建议。该工具能够分析SQL语句的执行效率,识别性能瓶颈,并提供具体的优化方案,包括索引优化、查询重写建议等,帮助提升数据库查询性能。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| analyzing-mysql-prompt | 这是分析mysql相关问题的提示词 |
| query-table-data-prompt | 这是通过调用工具查询表数据的提示词 |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Most tools have distinct purposes, such as execute_sql for SQL execution, get_table_desc for table structures, and optimize_sql for performance optimization. However, some tools like get_db_health_index_usage and get_db_health_running could be confused as both relate to health monitoring, though their specific focuses differ slightly.
Tool names follow a consistent verb_noun pattern (e.g., execute_sql, get_table_desc, optimize_sql) with clear actions and targets. There are minor deviations like get_chinese_initials, which uses a different verb style, but overall the naming is predictable and readable.
With 9 tools, the count is well-scoped for a MySQL server, covering core operations like SQL execution, table and index queries, health monitoring, and optimization. Each tool serves a specific function without unnecessary duplication, making the set efficient and focused.
The toolset provides good coverage for MySQL database management, including querying, health analysis, and optimization. Minor gaps exist, such as the lack of tools for database creation, user management, or backup operations, but core workflows like SQL execution and performance tuning are well-supported.