MySQL Ops MCP
v1.0.0MySQL MCP server: browse schema, query, CRUD.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_databases
列出所有可用的数据库
list_tables
列出指定数据库中的所有表
| Parameter | Type | Description |
|---|---|---|
database | string | 数据库名称(可选,默认使用当前连接的数据库) |
describe_table
查看表结构和字段信息
| Parameter | Type | Description |
|---|---|---|
table * | string | 表名 |
database | string | 数据库名称(可选) |
query
执行SELECT查询语句
| Parameter | Type | Description |
|---|---|---|
sql * | string | SELECT查询语句 |
database | string | 数据库名称(可选) |
create_table
创建新表
| Parameter | Type | Description |
|---|---|---|
sql * | string | CREATE TABLE语句 |
database | string | 数据库名称(可选) |
insert
插入数据到表中
| Parameter | Type | Description |
|---|---|---|
sql * | string | INSERT语句 |
database | string | 数据库名称(可选) |
update
更新表中的数据
| Parameter | Type | Description |
|---|---|---|
sql * | string | UPDATE语句 |
database | string | 数据库名称(可选) |
delete_data
删除表中的数据(需要授权)。此操作需要用户明确批准。
| Parameter | Type | Description |
|---|---|---|
sql * | string | DELETE语句 |
database | string | 数据库名称(可选) |
drop_table
删除表(需要授权)。此操作不可逆,需要用户明确批准。
| Parameter | Type | Description |
|---|---|---|
table * | string | 要删除的表名 |
database | string | 数据库名称(可选) |
execute_sql
执行自定义SQL语句(通用工具)
| Parameter | Type | Description |
|---|---|---|
sql * | string | SQL语句 |
database | string | 数据库名称(可选) |
get_table_info
获取表的详细信息,包括索引、约束等
| Parameter | Type | Description |
|---|---|---|
table * | string | 表名 |
database | string | 数据库名称(可选) |