A lightweight MCP server built to query Postgres database using SQL or plain English
The server defines 4 tools with partial schema coverage and uneven description quality. Tool names follow verb_noun convention (list_tables, describe_tables, execute_raw_query, switch_database), which is good. However, most tools lack complete input parameter documentation and descriptions are generic. Only 2 of 4 tools have visible input schemas in the provided source. Output schemas are completely undocumented, the describe_table.js file is truncated and no schema definition is visible for any tool. Error handling is absent from the shown code. The execute_raw_query tool is particularly concerning: it has DESTRUCTIVE risk but no confirmation/dry-run mechanism documented, and the dry_run parameter exists but its behavior in error cases is unexplained. Overall, this is a functional but incomplete MCP server that would struggle with LLM tool selection and error recovery.
Get comprehensive table information for one or more tables including columns, indexes, triggers, foreign keys, and constraints
Execute a SQL query. The system will automatically detect the required permission level and request user approval for write operations and dangerous DDL commands.
List all user tables in the database
Switches the active database to the specified one. If an error occurs during the switch, the system automatically reverts back to the previous active database
list_tables has no visible input schema in provided source code. Cannot verify parameter types, constraints, or descriptions.
No output schemas documented for any tool. LLMs cannot predict return field structure, forcing them to guess what data is available. Describe_tables file is truncated, so full schema unknown.
execute_raw_query is marked DESTRUCTIVE but lacks error handling guidance. No documentation on what happens if dry_run validation fails, SQL has syntax errors, or execution is denied. Agent has no recovery path.
execute_raw_query description says 'system will automatically detect required permission level and request user approval' but this behavior is not documented in the input schema or error handling. Unclear how approval is requested or what the approval response looks like.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 49 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 50 | - | v1 |
switch_database description says 'automatically reverts back to previous active database' on error, but no error schema is documented. Agent cannot distinguish between a successful switch and a failed-then-reverted switch.
Parameter descriptions are minimal or absent. 'table_names' in describe_tables has a description, but 'table_schema' description is bare ('Postgres table schema name') and does not clarify the default 'public' behavior or what happens if the schema does not exist.
Credentials (POSTGRES_HOST, POSTGRES_USER, POSTGRES_PASSWORD, etc.) are correctly handled via environment variables in config.js, which is good. However, no documentation in tool descriptions warns against passing raw SQL with embedded credentials, LLMs might naively construct queries with passwords in them.
Tool descriptions do not explain when to use each tool or what happens on failure. 'List all user tables' is vague, does it include system tables? Temporary tables? Views? Does it return row counts or just names?