MySQL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_HOST | No | MySQL host | localhost |
| DB_NAME | No | Database name | test_db |
| DB_PORT | No | MySQL port | 3306 |
| DB_USER | No | MySQL user | root |
| DRY_RUN | No | Validate SQL without returning data | false |
| LOG_DIR | No | Log directory | ./logs |
| ALLOW_DDL | No | Allow CREATE/ALTER/DROP/TRUNCATE | false |
| LOG_LEVEL | No | Log level: debug/info/warn/error | info |
| ALLOW_VIEW | No | Allow SHOW / DESCRIBE | true |
| DB_PASSWORD | Yes | MySQL password | |
| DB_POOL_MAX | No | Max pool connections | 10 |
| DB_POOL_MIN | No | Min pool connections | 2 |
| ALLOW_DELETE | No | Allow DELETE | false |
| ALLOW_INSERT | No | Allow INSERT | false |
| ALLOW_SELECT | No | Allow SELECT queries | true |
| ALLOW_UPDATE | No | Allow UPDATE | false |
| MCP_TRANSPORT | No | Transport: stdio/http-sse/streamable-http | stdio |
| MCP_SERVER_NAME | No | Server name used as log file prefix | mysql-mcp-server |
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": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tablesA | List all tables in the current database |
| describe_tableB | Get the structure of a specific table |
| execute_queryB | Execute a SELECT query on the database |
| list_databasesA | List all available databases |
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 4 tools
Each tool targets a distinct resource or action: table structure, SELECT query execution, database listing, and table listing. There is no overlap in functionality.
All tool names consistently follow the verb_noun pattern (list_databases, list_tables, describe_table, execute_query), making them easy to parse and select.
With 4 tools, the set is minimal but focused. It covers basic database exploration needs, though one might expect additional tools for write operations or schema browsing.
The set handles core read operations (listing, describing, querying) but lacks any write capabilities (INSERT, UPDATE, DELETE) and does not support non-SELECT queries, leaving notable gaps for a general MySQL server.