mysql-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_HOST | No | MySQL host | 127.0.0.1 |
| DB_NAME | No | Default database | |
| DB_PORT | No | MySQL port | 3306 |
| DB_USER | Yes | MySQL user (required) | |
| DB_PASSWORD | No | MySQL password | |
| ALLOW_WRITES | No | Set to '1' to enable insert_row and update_rows tools | |
| DB_QUERY_TIMEOUT_MS | No | Per-query timeout in milliseconds | 10000 |
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 | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| pingA | Check MCP server and MySQL connectivity. Returns whether the database connection works. Call this first whenever you are unsure whether the database is reachable — the error field tells you what to fix (missing env vars, wrong credentials, host unreachable). |
| list_tablesA | List all tables in the connected database. Always start here when you do not know what tables exist — do not guess table names. |
| describe_tableA | Describe a table: column names, types, nullability, keys, defaults, and column comments. Always call this BEFORE query_table so you query with real column names. Returns a warning (not an error) if the table does not exist. |
| query_tableA | Query rows from a table with structured parameters — no SQL strings are accepted. WHERE conditions are equality-only key/value pairs ({ status: "active" }); use columns to narrow the output; limit defaults to 20 and is hard-capped at 200 rows. Workflow: describe_table first to learn column names, then query with a small limit and narrow columns, expanding only when needed. |
| check_permissionsA | Show the connected MySQL account's privileges and whether it is read-only. Call this when the user asks about database security, or to verify that writes are impossible before running queries. If read_only is false, the account CAN modify data — recommend switching to a SELECT-only account. |
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
Each tool has a clearly distinct role: connectivity check (ping), table discovery (list_tables), schema inspection (describe_table), row retrieval (query_table), and privilege audit (check_permissions). Descriptions even prescribe an explicit workflow order, leaving no room for misselection.
Four of five tools follow a consistent verb_noun snake_case pattern (list_tables, describe_table, query_table, check_permissions). The lone bare verb 'ping' is a minor, conventional deviation that does not impede readability.
Five tools is a tight, well-scoped surface for a read-only MySQL inspection server, and each one earns its place. It sits at the thin end of the range, with the database-level discovery and diagnostic tools consuming two of the five slots.
For read-only exploration the surface is workable, but there are notable gaps: no offset/pagination (limit hard-capped at 200), no ordering or range/inequality predicates (equality-only WHERE), and no cross-table or aggregate queries, so common asks like 'latest N rows' or 'counts over time' become dead ends. Absence of any write path appears intentional given the read-only recommendation.