A read-only database query MCP server supporting PostgreSQL and SQLite with encrypted connection management
Three tools with clear verb-noun naming (db_list_connections, db_schema, db_query) and solid descriptions (avg 180 chars, within 10-1024 baseline). All parameters have type definitions and descriptions. However, output schemas are not documented, responses are formatted as plain text strings rather than structured JSON objects. No error handling guidance, no pagination support for potentially large schema/query results, and no input validation constraints (e.g., max query size, timeout). Security is well-designed (read-only enforcement, no credential exposure), but composition could be stronger, db_query lacks guidance on result limits (claims 1000 rows but no pagination mechanism).
List all saved database connections. Shows name, provider type, host, database, and username. Never exposes passwords or connection strings. Call this first to see which connections are available.
Execute a read-only SQL query against a named database connection. Returns up to 1000 rows. The connection is enforced read-only at the database session level — INSERT, UPDATE, DELETE, and DDL statements are rejected by the database. Use db_schema first to understand the database structure.
Get the full database schema for a named connection. Returns tables, columns, data types, primary keys, and foreign key constraints. Use db_list_connections first to see available connection names.
Output schemas not documented. Tools return plain text strings (CommandResult.Message + CommandResult.Details) rather than structured JSON. LLMs cannot parse results reliably or extract fields for downstream tool calls.
No pagination or result-limiting mechanism. db_query claims 'up to 1000 rows' but provides no limit/offset parameters or next_cursor. Large result sets will blow context windows and degrade LLM reasoning.
No error handling guidance. Errors are returned as plain text (CommandResult.Message) with no classification (retryable vs fatal) or recovery hints. LLMs cannot determine next steps on failure.
No input validation constraints documented. db_query accepts arbitrary SQL strings with no length limits, timeout guidance, or complexity constraints. Malicious or runaway queries could hang the server.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 51 | <=2025-11-25 | v2 |
db_schema and db_query descriptions reference 'Use db_list_connections first' but do not explain what structure db_schema returns or how to interpret column/constraint metadata. Discovery guidance is incomplete.