mcp-db-read-only
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_URL | No | One connection URL, registered as the profile 'default'. | |
| MYSQL_HOST | No | Legacy MySQL host (read unchanged for compatibility with mcp-mysql-read-only). | |
| MYSQL_USER | No | Legacy MySQL user. | |
| DB_PASSWORD | No | Password for DB_URL, so it need not be encoded into the URL. | |
| DB_PROFILES | No | JSON object of named profiles, e.g. {"app": "postgres://...", "cache": "redis://..."}. | |
| MYSQL_DATABASE | No | Legacy MySQL database. | |
| MYSQL_PASSWORD | No | Legacy MySQL password. | |
| MYSQL_PROFILES | No | Legacy MySQL profiles, JSON object of named connections. | |
| DB_DEFAULT_PROFILE | No | Which profile starts active. Must name a real profile, else 'default', else the first one defined. | |
| DB_QUERY_TIMEOUT_MS | No | Statement timeout in milliseconds, enforced by each server where it can be. | 30000 |
| DB_CONNECT_TIMEOUT_MS | No | Connection timeout in milliseconds. | 10000 |
| MYSQL_DEFAULT_PROFILE | No | Legacy MySQL default profile. |
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 |
|---|---|
| current_connectionA | Show which database server, engine and database the read-only tools are currently pointed at |
| list_connectionsA | List the connection profiles available to switch to, with each one's engine, including any added during this session |
| list_databasesA | List databases on the currently connected server (schemas on MySQL, numbered databases on Redis) |
| use_databaseA | Switch the active database on the current server. Takes effect immediately, no restart needed |
| use_connectionA | Switch to a named connection profile, on any engine. Takes effect immediately, no restart needed |
| connectA | Connect to a database at runtime with a connection URL (mysql, mariadb, postgres, sqlite, mssql, clickhouse, mongodb, redis, elasticsearch, opensearch). Not persisted to disk, but kept for the rest of the session under an alias |
| list_tablesA | List the tables in the active database: collections on MongoDB, keys on Redis, indices on Elasticsearch |
| describe_tableA | Show the structure of a table: columns on SQL engines, inferred fields for a MongoDB collection, the mapping of an Elasticsearch index, or the type and TTL of a Redis key |
| get_table_indexesA | Show indexes on a table or MongoDB collection, or the sorting key and skipping indices of a ClickHouse table |
| get_foreign_keysA | Show foreign key relationships for a table on MySQL, PostgreSQL, SQLite or SQL Server |
| get_table_sampleA | Get sample rows from a table, documents from a collection, hits from an index, or the first entries of a Redis key |
| run_queryA | Execute a read-only SQL query (SELECT, WITH, and the engine's SHOW, DESCRIBE or EXPLAIN) on a MySQL, MariaDB, PostgreSQL, SQLite, SQL Server or ClickHouse connection |
| find_documentsB | Find documents in a MongoDB collection with a filter, optional projection and sort |
| aggregateA | Run a read-only MongoDB aggregation pipeline on a collection ($out and $merge are not allowed) |
| count_documentsA | Count documents in a MongoDB collection that match a filter |
| distinct_valuesB | List the distinct values of a field in a MongoDB collection, optionally within a filter |
| searchA | Search an Elasticsearch or OpenSearch index with a Query DSL body. Use size 0 with track_total_hits true to count, and aggs for aggregations |
| redis_commandA | Run one read-only Redis command such as GET, HGETALL, LRANGE, ZRANGE, SCAN, TTL or INFO. Write commands and KEYS are refused |
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 18 tools
Most tools target clearly distinct resources and actions, and engine-specific operations (run_query, find_documents, search, redis_command) are easy to tell apart. The only mild ambiguity is among context-switching tools like use_database, use_connection, and connect, though their descriptions clarify the differences.
Many tools follow a list_/get_/use_ verb_noun pattern, but standalone verbs like connect, aggregate, and search, plus noun-only names like distinct_values and redis_command, break the convention. The names are still readable and all snake_case, but the style is not uniform.
At 18 tools, this is slightly over the typical sweet spot, but the broad multi-engine scope (SQL, MongoDB, Elasticsearch, Redis) justifies the count. Each tool covers a distinct operation or engine, and none feel redundant.
The toolset covers the read-only database workflow end-to-end: connection selection, database/table discovery, schema inspection, sample data, and engine-specific query/aggregation/search/read operations. There are no obvious missing capabilities for a read-only toolset.