mysql-mcp-lite
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MYSQL_HOST | No | MySQL host. | 127.0.0.1 |
| MYSQL_PORT | No | MySQL port. | 3306 |
| MYSQL_USER | No | MySQL user. | root |
| MYSQL_DATABASE | No | Default database for list_tables, describe_table, and query. No default database is configured. | |
| MYSQL_MAX_ROWS | No | Rows returned per call; truncated is true when the result is cut. | 500 |
| MYSQL_PASSWORD | No | MySQL password. Defaults to empty. | |
| MYSQL_TIMEOUT_MS | No | Per-SELECT limit using MAX_EXECUTION_TIME. | 30000 |
| MYSQL_ALLOW_WRITE | No | Set to true to let query run any statement, committed. Read-only by default. | off |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Explore a MySQL database: list_databases -> list_tables -> describe_table, then query. Read-only: only SELECT/SHOW/DESCRIBE/EXPLAIN/WITH run.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_databasesA | List the databases visible to the configured MySQL user. |
| list_tablesA | List tables and views in a database (default: MYSQL_DATABASE), with approximate row counts. |
| describe_tableB | Return the CREATE TABLE statement: columns, types, indexes and foreign keys. |
| queryA | Run one SQL statement. Returns JSON {columns, rows, truncated}: at most MYSQL_MAX_ROWS rows,
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| mysql | Ask about the database in plain words; the agent explores the schema and runs SQL. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool has a clear, non-overlapping role: list_databases scopes to the server, list_tables scopes to one database, describe_table details one table, and query executes SQL. An agent can pick correctly without hesitation, and the read-only/write gating on `query` is explicitly stated.
list_databases, list_tables, describe_table follow a clean verb_noun pattern, with `query` being a single-verb outlier. That deviation is natural for a generic SQL execution tool and remains readable, so it is a minor inconsistency rather than a structural one.
Four tools is a deliberately lean, well-scoped surface for a 'lite' MySQL server, and each one earns its place as a distinct discovery step. Nothing feels padded, and a generic `query` tool absorbs the long tail of operations without inflating the count.
Discovery (databases → tables → schema) plus arbitrary SQL execution covers the read-only exploration workflow end to end, including writes when MYSQL_ALLOW_WRITE is set. Minor gaps exist—no dedicated index/column listing, no EXPLAIN helper, and no separate DDL or transaction tools—but `query` lets an agent work around all of them.