Skip to main content
Glama
shibbirweb

mcp-db-read-only

by shibbirweb

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_URLNoOne connection URL, registered as the profile 'default'.
MYSQL_HOSTNoLegacy MySQL host (read unchanged for compatibility with mcp-mysql-read-only).
MYSQL_USERNoLegacy MySQL user.
DB_PASSWORDNoPassword for DB_URL, so it need not be encoded into the URL.
DB_PROFILESNoJSON object of named profiles, e.g. {"app": "postgres://...", "cache": "redis://..."}.
MYSQL_DATABASENoLegacy MySQL database.
MYSQL_PASSWORDNoLegacy MySQL password.
MYSQL_PROFILESNoLegacy MySQL profiles, JSON object of named connections.
DB_DEFAULT_PROFILENoWhich profile starts active. Must name a real profile, else 'default', else the first one defined.
DB_QUERY_TIMEOUT_MSNoStatement timeout in milliseconds, enforced by each server where it can be.30000
DB_CONNECT_TIMEOUT_MSNoConnection timeout in milliseconds.10000
MYSQL_DEFAULT_PROFILENoLegacy 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 18 tools

Disambiguation4/5

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.

Naming Consistency3/5

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.

Tool Count4/5

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.

Completeness5/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues