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 |
Capabilities
Features and capabilities supported by this server
| 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 | |
Latest Blog Posts
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/CobaltBlue3699/mysql-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server