Local MySQL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Logging level (debug, info, warn, error). | info |
| MYSQL_HOST | No | The MySQL host. The server refuses to start against non-loopback hosts unless ALLOW_REMOTE_MYSQL=1. | 127.0.0.1 |
| MYSQL_PORT | No | The MySQL port. | 3306 |
| MYSQL_USER | Yes | The MySQL user account. To follow least privilege, use the dedicated read-only 'mcp_readonly' user created by scripts/setup-mysql-user.sql. | |
| MCP_MAX_ROWS | No | Maximum number of rows returned by get_rows. | 1000 |
| MCP_AUDIT_LOG | No | Path to a JSONL audit log file. If empty, audit events go to stderr. | |
| MYSQL_DATABASE | Yes | The name of the database to connect to. This must match an entry in MCP_ALLOWED_SCHEMAS. | |
| MYSQL_PASSWORD | Yes | The password for MYSQL_USER. For the read-only user, set it in the SQL script and then in .env. | |
| ALLOW_REMOTE_MYSQL | No | Set to '1' to allow connecting to a non-loopback MySQL host. The server still requires a non-empty MYSQL_PASSWORD. | 0 |
| MCP_ALLOWED_TABLES | No | Optional comma-separated allowlist of tables. If empty, all tables in the allowed schemas are visible. | |
| MCP_ALLOWED_SCHEMAS | Yes | Comma-separated list of schemas the server is allowed to access. Wildcards are only allowed if ALLOW_WILDCARD_SCHEMAS=1. | |
| ALLOW_WILDCARD_SCHEMAS | No | Set to '1' to allow wildcard entries in MCP_ALLOWED_SCHEMAS. Off by default for safety. | 0 |
| MYSQL_CONNECTION_LIMIT | No | Maximum number of simultaneous MySQL connections in the pool. | 5 |
| MYSQL_QUERY_TIMEOUT_MS | No | Query timeout in milliseconds. Queries exceeding this are aborted. | 3000 |
| MYSQL_CONNECT_TIMEOUT_MS | No | MySQL connection timeout in milliseconds. | 5000 |
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 tables in allowlisted MySQL schemas. Returns table metadata (schema, name, type). Always read-only. No raw SQL. |
| describe_tableA | Describe a single allowlisted MySQL table: columns, types, nullability, and key metadata. Sensitive columns may be redacted. Read-only. |
| get_rowsA | Read rows from a single allowlisted MySQL table. Requires an explicit column list, supports equality/IN/range filters and pagination. Read-only. Sensitive columns are masked. Cap is MCP_MAX_ROWS. |
| health_checkA | Report server/database reachability. Returns ok=true and a latencyMs value when the configured MySQL is reachable. Does NOT expose host, user, password, or version. |
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 has a clearly distinct purpose: describe_table for schema metadata, list_tables for table enumeration, get_rows for data retrieval, and health_check for connectivity status. There is no overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern: describe_table, list_tables, get_rows, health_check. The naming is uniform and predictable.
The server has 4 tools, which is well-scoped for a read-only MySQL access layer. Each tool provides a necessary capability without redundancy or bloat.
For its stated purpose of safe, read-only access to allowlisted tables, the toolset covers the full lifecycle: listing tables, describing schema, reading rows, and verifying connectivity. No obvious gaps or dead ends exist.