Skip to main content
Glama
xucodeboy

MySQL MCP Server Pro

by xucodeboy

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_HOSTYesMySQL database host
MYSQL_PORTYesMySQL database port
MYSQL_ROLENoMySQL role permissions. Available values: readonly, writer, adminreadonly
MYSQL_USERYesMySQL database username
MYSQL_DATABASEYesMySQL database name
MYSQL_PASSWORDYesMySQL database password

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription
analyzing-mysql-prompt这是分析mysql相关问题的提示词
query-table-data-prompt这是通过调用工具查询表数据的提示词

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xucodeboy/mysql_mcp_server_pro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server