mcp-server-postgres
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_ROWS | No | Hard upper limit for result pages | 100 |
| DATABASE_URL | Yes | Primary PostgreSQL DSN | |
| MASKED_COLUMNS | No | Comma-separated list of columns to redact | |
| PERMISSION_TIER | No | READ_ONLY | READ_WRITE | DDL_ALLOWED | ADMIN | READ_ONLY |
| READ_REPLICA_URL | No | Optional replica DSN for read routing | |
| SLOW_QUERY_THRESHOLD_MS | No | Warning threshold for latency | 500 |
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 | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryC | Executes a validated PostgreSQL query with parameterized inputs (Tier: READ_ONLY/READ_WRITE). |
| nl_queryC | Intelligently translates natural language into validated, optimized SQL and executes it. |
| schema_inspectC | Resolve exact table names, column names, types, nullability, and constraints. |
| list_tablesC | Lists all tables in the specified schema. |
| describe_tableB | Returns detailed column, index, and foreign key definitions. |
| explainC | Run EXPLAIN (FORMAT JSON) and attach cost estimate and plan summary. |
| transactionC | Executes multiple write operations inside an explicit BEGIN/COMMIT block. |
| confirm_ddlB | Confirms and executes high-risk DDL operations after receiving a validation token. |
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 8 tools
Most tools are distinct, but schema_inspect and describe_table both return column/type/constraint information and overlap heavily. query and nl_query are separable by input style, and transaction vs confirm_ddl differ by write scope, but the schema inspection pair creates real misselection risk.
Mixed conventions: list_tables and describe_table follow verb_noun, schema_inspect reverses to noun_verb, nl_query is adjective_noun, and query/explain/transaction are bare single words. Still readable, but not a predictable pattern.
Eight tools is well within the ideal 3-15 range. Each tool maps to a meaningful capability (query, NL query, schema lookup, table listing, description, explain, transactions, DDL) without bloat.
Core lifecycle is covered: read/write queries, NL queries, transactions, DDL, schema inspection, and plan analysis. Minor gaps exist (no schema/database listing, no EXPLAIN ANALYZE, no views/functions inspection), but agents can work around them via query.