readonly-db-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RODB_HOST | No | Server host (enables the zero-file path when set with RODB_USER) | |
| RODB_PORT | No | Server port (default 3306) | |
| RODB_USER | No | Username for the single env connection | |
| RODB_CONFIG | No | Path to config.toml (default ~/.config/readonly-db-mcp/config.toml) | |
| RODB_LOG_DIR | No | Audit-log directory (default <config dir>/logs/) | |
| RODB_DATABASE | No | Default schema for the single env connection | |
| RODB_ENV_FILE | No | Path to a .env file (default beside config.toml) | |
| RODB_PASSWORD | No | Password for the single env connection | |
| RODB_DISABLE_LOG | No | Set to '1' to disable the audit log | 0 |
| RODB_ENABLE_GATED | No | Allowlist of gated connections to enable, e.g. 'warehouse' or 'all' |
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": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| run_selectA | Run a single read-only SELECT (or WITH...SELECT / UNION) against a database.
Writes, DDL, multiple statements, INTO OUTFILE and dangerous functions are
rejected. Output is capped; when |
| explainA | EXPLAIN FORMAT=JSON for a SELECT — query plan (indexes, join order, estimated rows) without executing it. Same connection/schema routing as run_select. |
| list_connectionsA | List the connections you can query, with each one's default schema, any described schemas, whether it is gated (require_opt_in) and currently enabled. Call this FIRST when unsure what to target. Query one with run_select(..., connection=, schema=). Gated connections show enabled=false until RODB_ENABLE_GATED opts them in. |
| list_schemasA | List the schemas (databases) visible on a connection's server, with any
descriptions you configured. System schemas are hidden. Use this to discover
which |
| list_tablesB | List tables and views in the resolved schema (name, type, engine, approx rows). |
| describe_tableC | Columns of a table: name, type, nullability, key, default, extra, comment. |
| get_indexesC | Indexes of a table: name, columns (in order), uniqueness, type, cardinality. |
| get_foreign_keysB | Foreign keys on a table (outbound) and FKs pointing to it (inbound). |
| table_statsC | Approximate size of a table: row estimate, data/index bytes, engine, timestamps. |
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 9 tools
Each tool has a clearly distinct purpose: metadata retrieval (describe, indexes, foreign keys, schemas, tables, stats), query planning (explain), and query execution (run_select). No overlap or ambiguity.
Names consistently use snake_case and mostly follow a verb_noun pattern (describe_table, list_tables, run_select). 'table_stats' is a minor deviation (noun_noun) but remains clear.
9 tools are well-scoped for a read-only database server, covering discovery, introspection, and querying without redundancy or bloat.
The tool set covers all essential operations for a read-only database interface: listing available connections/schemas/tables, describing columns, indexes, and foreign keys, running EXPLAIN and SELECT queries, and retrieving table statistics.