MySQL MCP
Enables integration with GitHub through the MCP framework, allowing direct cloning of repositories as mentioned in the installation instructions.
Provides tools for MySQL database operations including executing SQL queries, managing table structures, listing tables, describing table schemas, and performing CRUD operations (insert, update, delete data) on MySQL databases.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MySQL MCPshow me the top 10 customers by total purchase amount"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MySQL MCP 工具
MySQL MCP 是一个基于 MCP(Model-Control-Panel)框架的 MySQL 数据库操作工具,提供了简单易用的 API 来执行 SQL 查询、管理表结构、操作数据等功能。
MCP 框架简介
MCP(Model-Control-Panel)是一个强大的工具框架,允许您将工具函数暴露为API,使模型(如AI助手)能够直接调用这些函数。MySQL MCP 将 MySQL 数据库操作封装为 MCP 工具,便于与 Cursor IDE 等工具集成使用。
Related MCP server: MySQL MCP Server
如何使用 MCP
1. 配置 MCP
在 ~/.cursor/mcp.json 中添加以下配置:
{
"mcpServers": {
"mysql-mcp": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/mysql-mcp",
"run",
"mysql-mcp.py",
"--host", "xxx.xxx.xxx.xxx",
"--port", "3306",
"--user", "root",
"--password", "********",
"--database", "your_database",
"--connection-timeout", "10",
"--connect-retry-count", "3"
]
}
}
}2. 启动 MCP 服务
配置完成后,Cursor IDE 会自动启动 MCP 服务,无需手动操作。如需单独运行:
python mysql-mcp.py3. 在 MCP 环境中调用工具函数
在 Cursor IDE 中,AI 助手可以直接调用 MySQL MCP 工具:
# 查询所有数据库
await mcp_mysql_mcp_execute_query("SHOW DATABASES")
# 列出当前数据库的所有表
await mcp_mysql_mcp_list_tables()
# 执行复杂查询
await mcp_mysql_mcp_execute_query("SELECT * FROM users WHERE age > %s", [18])可用 MCP 工具函数
1. 执行查询:mcp_mysql_mcp_execute_query
# 执行 SELECT 查询
result = await mcp_mysql_mcp_execute_query(query="SELECT * FROM users WHERE age > %s", params=[18])
# 执行 SHOW DATABASES 查询
result = await mcp_mysql_mcp_execute_query(query="SHOW DATABASES")
# 查询结果格式
# {
# "success": true,
# "rows": [{"id": 1, "name": "张三", "age": 25}, ...],
# "row_count": 10
# }2. 列出表:mcp_mysql_mcp_list_tables
# 列出当前数据库的所有表
result = await mcp_mysql_mcp_list_tables()
# 列出特定数据库的所有表
result = await mcp_mysql_mcp_list_tables(database_name="information_schema")
# 返回结果格式
# {
# "success": true,
# "database": "your_database",
# "tables": ["users", "products", "orders"],
# "count": 3
# }3. 获取表结构:mcp_mysql_mcp_describe_table
# 获取表结构
result = await mcp_mysql_mcp_describe_table(table_name="users")
# 返回结果格式
# {
# "success": true,
# "table": "users",
# "columns": [
# {"Field": "id", "Type": "int(11)", "Null": "NO", "Key": "PRI", "Default": null, "Extra": "auto_increment"},
# {"Field": "name", "Type": "varchar(100)", "Null": "NO", "Key": "", "Default": null, "Extra": ""}
# ]
# }4. 切换数据库:mcp_mysql_mcp_use_database
# 切换到另一个数据库
result = await mcp_mysql_mcp_use_database(database_name="another_database")
# 返回结果格式
# {
# "success": true,
# "message": "已切换到数据库 another_database",
# "current_database": "another_database"
# }5. 其他数据操作工具
创建表:
mcp_mysql_mcp_create_table(table_name, columns_def)插入数据:
mcp_mysql_mcp_insert_data(table_name, data)更新数据:
mcp_mysql_mcp_update_data(table_name, data, condition, params)删除数据:
mcp_mysql_mcp_delete_data(table_name, condition, params)
功能特点
执行 SQL 查询语句并获取结果
列出数据库中的所有表
获取表结构信息
创建新表
插入、更新和删除数据
切换数据库
自动处理连接错误和重试
提供详细的错误信息和原因分析
错误处理
所有工具函数都会返回详细的错误信息和原因分析,便于快速定位和解决问题:
# 查询不存在的表
result = await mcp_mysql_mcp_execute_query(query="SELECT * FROM non_existing_table")
# 返回: {"error": "执行查询失败: Table 'your_database.non_existing_table' doesn't exist\n原因:查询的表不存在", "query": "SELECT * FROM non_existing_table"}安装与配置
安装
确保您已安装 Python 3.12 或更高版本
克隆仓库到本地:
git clone https://github.com/Liu-creators/mysql-mcp.git
cd mysql-mcp创建并激活虚拟环境:
python -m venv .venv
source .venv/bin/activate # 在 Windows 上使用 .venv\Scripts\activate安装依赖:
pip install -e .其他配置方式
除了 MCP 配置外,还可以通过以下方式配置:
环境变量
export MYSQL_HOST=localhost
export MYSQL_PORT=3306
export MYSQL_USER=root
export MYSQL_PASSWORD=your_password
export MYSQL_DATABASE=your_database
export MYSQL_CONNECTION_TIMEOUT=10
export MYSQL_CONNECT_RETRY_COUNT=3命令行参数
python mysql-mcp.py --host localhost --port 3306 --user root --password your_password --database your_database扩展与自定义
您可以修改源代码来添加更多功能或调整现有功能的行为。主要的扩展点包括:
在
mysql-mcp.py中添加新的工具函数修改现有函数的错误处理和返回值
调整数据库连接的默认配置
许可证
Available Tools
8 toolscreate_tableB
创建新表
Args:
table_name: 表名
columns_def: 列定义,例如 "id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), age INT"
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含创建结果的字典
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | ||
| columns_def | Yes | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It mentions the return value ('包含创建结果的字典') but lacks details on authentication, rate limits, side effects (e.g., what happens if table exists), or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is reasonably concise with a clear Args/Returns structure. It avoids unnecessary text, but could be slightly more compact without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a table creation tool with no output schema and no annotations, the description covers the basic function and parameters. However, it lacks warnings about table existence, permission requirements, or transactional behavior, which limits completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema provides no descriptions (0% coverage), so the description must compensate. It explains db_config's purpose and default behavior, and gives a concrete example for columns_def. However, table_name is only described as '表名' (table name), which adds little value beyond the schema's title.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states '创建新表' (create new table), which is a specific verb+resource. It distinguishes itself from sibling tools like delete_data, describe_table, etc., by focusing on table creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., insert_data, update_data). There is no mention of prerequisites, when not to use, or comparisons with siblings, leaving the agent without context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_dataB
从表中删除数据
Args:
table_name: 表名
condition: WHERE条件子句
params: 条件参数列表
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含删除结果的字典
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | ||
| condition | Yes | ||
| params | No | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description only states it deletes data and returns a dictionary. It does not disclose destructive behavior, authorization needs, rollback possibilities, or rate limits. For a delete operation, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with a purpose sentence followed by a parameter list and return statement. It is front-loaded and contains no unnecessary words. However, it could be more structured with a clear use-case sentence.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool is destructive (delete) with 4 parameters, no output schema, and no annotations, the description lacks critical details: return dictionary keys, safety warnings, and when to use this vs siblings like update_data. It is incomplete for a production tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It provides brief Chinese explanations for each parameter (e.g., table_name: '表名', condition: 'WHERE条件子句'). These add some meaning beyond the schema's types, but are minimal and lack details like format or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool deletes data from a table. It uses the specific verb 'delete' and resource 'data from table'. This distinguishes it from siblings like insert_data, update_data, and create_table.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus alternatives like update_data or execute_query. It lacks prerequisites, warnings about irreversible deletion, or examples.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_tableA
获取表结构
Args:
table_name: 表名
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含表结构信息的字典
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but only states it returns a dictionary. It does not disclose read-only nature, required permissions, potential side effects, or any behavioral traits beyond the basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with three clear sections (description, args, returns) and no superfluous text. It is efficiently structured and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description should provide more context about the returned data structure and behavior. It lacks details on what '表结构信息' includes (e.g., column names, data types) and does not clarify whether it is a read-only operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It provides brief Chinese explanations for each parameter ('表名' for table_name, '数据库连接配置参数...' for db_config), adding some meaning beyond names. However, the explanations are minimal and do not fully clarify types or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states '获取表结构' (get table structure), which is a specific verb and resource. It distinguishes itself from sibling tools like create_table and list_tables by focusing on structural metadata.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly indicates when to use it (when you need table structure), but it does not explicitly state when not to use it or provide alternatives. No comparison with sibling tools is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_queryA
执行SQL查询语句,返回查询结果
Args:
query: SQL查询语句
params: 查询参数,用于参数化查询,防止SQL注入
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含查询结果的字典
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| params | No | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations were provided, so the description must cover behavioral traits. It mentions parameterized queries for SQL injection prevention and optional db_config, but does not disclose side effects (e.g., whether reads are safe, if DML statements are allowed, error behavior, or resource usage). The return format is noted as a dict, but missing details on success/failure indicators.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with a clear docstring structure (Args and Returns sections), front-loading the purpose. No redundant sentences; however, it could be slightly restructured to improve readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters (1 required), no output schema, and sibling tools, the description covers basic usage but lacks error handling details, differentiation from siblings, and implications of running DML queries. It leaves gaps for an agent to determine safe boundaries.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds significant meaning: 'query' is the SQL statement, 'params' for parameterized queries, and 'db_config' for optional connection settings. This clarifies each parameter's role beyond the schema's type information, though more detail on allowed values or formats would improve it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states '执行SQL查询语句,返回查询结果' (Execute SQL query statement, return query results), specifying the verb 'execute' and resource 'SQL query'. It distinguishes from sibling tools like create_table, delete_data, etc., which are specific table operations, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use execute_query versus alternatives like describe_table or select (if any). It does not mention prerequisites or common use cases, leaving the agent to infer appropriate usage without explicit context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insert_dataB
向表中插入数据
Args:
table_name: 表名
data: 要插入的数据,字段名和值的字典
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含插入结果的字典
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | ||
| data | Yes | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states that the tool inserts data (implying mutation) but does not disclose side effects, permissions, error handling, or result format beyond a generic dictionary. For a mutation tool, more transparency is needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with a front-loaded purpose line followed by structured Args/Returns sections. However, the docstring format is slightly verbose; still, it effectively conveys the necessary information without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers parameter semantics but lacks details on return values (vague 'dict containing insert results'), error conditions, and prerequisites (e.g., table must exist). For a 3-parameter tool with no output schema, it is minimally adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the tool description adds significant meaning to each parameter: table_name is the table name, data is a dictionary of field names and values, and db_config is an optional database connection config. This goes beyond the schema's type-only information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states '向表中插入数据' (insert data into table), which is a specific verb+resource combination. This distinguishes it from sibling tools like create_table, update_data, and delete_data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of context, prerequisites, or scenarios where other tools would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesA
列出指定数据库中的所有表
Args:
database_name: 数据库名称,如果为None则使用默认数据库
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含表列表的字典
| Name | Required | Description | Default |
|---|---|---|---|
| database_name | No | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavior. It mentions the return type (dictionary) but lacks details on whether this is read-only, error handling, or authentication needs. Adequate but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with a clear one-sentence purpose and structured Args/Returns sections. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and a simple listing operation, the description covers the basics but could elaborate on edge cases like invalid database or connection failures. It is minimally complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates by explaining that database_name can be None for default and db_config for connection config. This adds meaning beyond the schema's bare structure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all tables in a database ('列出指定数据库中的所有表'), using a specific verb and resource. It distinguishes from sibling tools like create_table, describe_table, and execute_query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides basic argument explanations but does not explicitly guide when to use this tool versus alternatives, such as describe_table or execute_query. Usage is implied but not elaborated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_dataB
更新表中的数据
Args:
table_name: 表名
data: 要更新的数据,字段名和值的字典
condition: WHERE条件子句
params: 条件参数列表
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含更新结果的字典
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | ||
| data | Yes | ||
| condition | Yes | ||
| params | No | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, and the description does not disclose behavioral traits like required permissions, the irreversible nature of updates, or side effects. It only states the return type ('包含更新结果的字典'), which is insufficient for an AI agent making safe decisions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description uses a docstring format with bullet-like lines, which is acceptable but not optimally concise. Some details (e.g., default config) could be streamlined, and the structure is not highly scannable for AI.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all 5 parameters but does not specify default behavior for db_config or error handling. With no output schema, the return value description ('包含更新结果的字典') is vague. Gaps remain in what constitutes a successful update.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description explains each parameter's purpose (e.g., '要更新的数据,字段名和值的字典' for data) beyond the schema's type information. This adds meaningful guidance, though it could be more precise about the condition format.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly uses the verb '更新' (update) and specifies the resource '表中的数据' (data in table), which distinguishes it from insertion or deletion. However, it does not explicitly differentiate from sibling tools like insert_data or delete_data, leaving room for confusion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., insert for new records, delete for removal). The description lacks context on prerequisites, such as whether the table must exist or what conditions are appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
use_databaseC
切换到指定的数据库
Args:
database_name: 数据库名称
db_config: 数据库连接配置参数,如果为None则使用默认配置
Returns:
包含切换结果的字典
| Name | Required | Description | Default |
|---|---|---|---|
| database_name | Yes | ||
| db_config | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It only states the tool returns a dictionary with results, but does not disclose behavioral traits like side effects on global state, idempotency, connection handling, or error conditions. This is insufficient for safe agent invocation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is structured as a docstring with Args and Returns sections, which is clear. However, it is somewhat verbose for a simple switching action; the purpose could be conveyed in one sentence. Every sentence earns its place, but brevity could be improved.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and minimal annotations, the description lacks completeness. It does not explain what 'switching' entails (e.g., persistent vs session-level), potential errors (invalid database name, connection issues), or return value details (keys/structure of the result dictionary). More context is needed for reliable tool usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description adds meaningful parameter explanations: 'database_name' is the database name, and 'db_config' configures connection parameters with a default of None. While db_config lacks specifics (e.g., allowed keys), the description adds value beyond the schema's titles and structure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool switches databases, using a specific verb ('切换到') and resource ('数据库'). However, it does not elaborate on what 'switching' implies operationally (e.g., setting active database for subsequent queries), which could be clearer. It is distinct from sibling tools like create_table or execute_query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus others, nor any when-not or alternative suggestions. The description does not indicate prerequisites (e.g., need an existing database) or scenario context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a unique and clearly defined purpose targeting different database operations (e.g., create table, insert data, execute query). There is no ambiguity or overlap among the tools.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_table, list_tables, update_data). This makes the naming predictable and easy to understand.
With 8 tools, the server is well-scoped for basic MySQL database operations. The count is appropriate, covering essential CRUD and metadata operations without being too sparse or bloated.
The tool set covers core operations like table creation, data manipulation, and querying. However, it is missing important DDL operations such as DROP TABLE or ALTER TABLE, which could be considered minor gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI models to perform MySQL database operations through a standardized interface, supporting secure connections, query execution, and comprehensive schema management.712133MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely connect to and manage MySQL databases with support for multiple database connections, complete CRUD operations, schema inspection, and dynamic connection management through natural language.3580MIT
- AlicenseNot gradedqualityDmaintenanceEnables Cursor AI to interact with MySQL databases through natural language, supporting SQL queries, table schema retrieval, and data operations.45417MIT
- AlicenseNot gradedqualityDmaintenanceEnables secure, runtime-authenticated MySQL database querying and mutation through dynamic tools, allowing AI assistants to list databases/tables, describe schemas, and perform CRUD operations.242MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Liu-creators/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server