MCP MySQL Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| READONLY | No | If set to 'true', only SELECT and SHOW commands are allowed | false |
| ALLOW_DDL | No | Whether to allow DDL operations | false |
| ALLOW_DROP | No | Whether to allow DROP operations | false |
| MYSQL_HOST | Yes | MySQL host address | localhost |
| MYSQL_PORT | Yes | MySQL port | 3306 |
| MYSQL_USER | Yes | MySQL username | root |
| MCP_LOG_DIR | No | Log directory | ./.setting |
| TOOL_PREFIX | No | Optional tool prefix for tool names and config isolation | |
| ALLOW_DELETE | No | Whether to allow DELETE operations | false |
| MCP_LOG_FILE | No | Log filename | mcp-mysql.log |
| PROJECT_NAME | No | Optional project branding for tool descriptions | |
| MYSQL_DATABASE | Yes | Database name | |
| MYSQL_PASSWORD | Yes | MySQL password | |
| MCP_DDL_LOG_FILE | No | DDL SQL log filename | ddl.sql |
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
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sql_queryC | Execute SQL query, supports DDL and DML operations |
| get_database_infoA | Get database information, including database list, table list and configuration information |
| get_operation_logsC | Get operation logs |
| check_permissionsA | Check database permissions for DDL, DROP, DELETE and other operations. Returns detailed permission status including readonly mode restrictions (only SELECT and SHOW allowed when readonly is enabled) |
| get_ddl_sql_logsC | Get DDL SQL operation logs |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Most tools have distinct purposes, but 'get_ddl_sql_logs' and 'get_operation_logs' overlap, as DDL logs are a subset of operation logs. This may cause confusion.
Three tools follow the 'get_' prefix pattern, but 'check_permissions' uses 'check_' and 'sql_query' is a noun-verb inversion, breaking consistency.
Five tools cover essential database operations (permissions, info, query, logs) without unnecessary bloat, well-scoped for a MySQL server.
Core operations are covered via sql_query for DDL/DML and get_database_info for browsing. Missing explicit user management tools, but sql_query can compensate.