Skip to main content
Glama
mysql2-mcp-server

mysql2-mcp-server

by jcxy

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MAX_ROWSNoMaximum number of rows returned; result sets are truncated when exceeded.1000
SSH_HOSTNoSSH server address.
SSH_PORTNoSSH server port.22
READ_ONLYNoWhether to enable read-only mode, which disables mysql_execute.false
MYSQL_HOSTNoMySQL server address.localhost
MYSQL_PORTNoMySQL server port.3306
MYSQL_USERNoMySQL username.root
SSH_ENABLEDNoWhether to enable the SSH tunnel.false
SSH_PASSWORDNoSSH password (alternative to SSH private key).
SSH_USERNAMENoSSH username.
MYSQL_DATABASENoDefault database (optional).
MYSQL_PASSWORDNoMySQL password.
SSH_PASSPHRASENoSSH private key passphrase (optional).
SSH_PRIVATE_KEYNoSSH private key content (alternative to SSH password).
SSH_REMOTE_HOSTNoTunnel target MySQL host.localhost
SSH_REMOTE_PORTNoTunnel target MySQL port.3306
MYSQL_MCP_CONFIG_FILENoPath to the configuration file.~/.mysql-mcp/config.json

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

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
mysql_queryB

执行 MySQL 查询,返回查询结果。可用环境: default(默认: default)。结果行数上限: default ≤ 1000 行,超出会被截断并在返回中标记 truncated;请用 WHERE/LIMIT 收窄范围或先执行 COUNT(*) 取总数

mysql_executeB

执行 MySQL 更新/删除/插入语句,返回受影响行数。可用环境: default(默认: default)

mysql_list_tablesB

列出数据库中的所有表。可传 database 参数指定库;环境未配置默认库且未传参时返回数据库列表。可用环境: default(默认: default)。结果行数上限: default ≤ 1000 行,超出会被截断并在返回中标记 truncated;请用 WHERE/LIMIT 收窄范围或先执行 COUNT(*) 取总数

mysql_describe_tableA

查看指定表的结构(列名、类型、是否可空等)。可用环境: default(默认: default)。结果行数上限: default ≤ 1000 行,超出会被截断并在返回中标记 truncated;请用 WHERE/LIMIT 收窄范围或先执行 COUNT(*) 取总数

mysql_beginA

开始一个事务(仅直连模式支持)。可用环境: default(默认: default)

mysql_commitB

提交当前事务。可用环境: default(默认: default)

mysql_rollbackC

回滚当前事务。可用环境: default(默认: default)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct role: transaction control (begin/commit/rollback), read queries via mysql_query, writes via mysql_execute, and schema inspection via list_tables/describe_table. The read/write split between query and execute is explicitly clarified in descriptions, leaving little room for misselection.

Naming Consistency5/5

All tools follow a consistent mysql_ prefix with snake_case action-oriented names. The pattern is predictable across transaction, query, execution, and schema-introspection operations.

Tool Count5/5

Seven tools is well-scoped for a MySQL server: transaction lifecycle, read/write execution, and schema discovery are all covered without redundant operations. No tool feels extraneous or missing at this level of granularity.

Completeness4/5

Core MySQL workflows are covered: querying, mutating data, transactions, and schema exploration. Minor gaps exist around explicit environment/connection management and convenience operations like EXPLAIN or database listing beyond the list_tables fallback, but these are largely workable through mysql_query/mysql_execute.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues