mcp-postgres-guard
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_ROWS | No | Read result cap. | 200 |
| DATABASE_URL | Yes | Required. PostgreSQL connection URL. | |
| AUDIT_LOG_PATH | No | JSONL audit file path. | (stderr) |
| MASKED_COLUMNS | No | Columns to mask, e.g., 'ssn' or 'customers.email'. | (none) |
| WRITES_ENABLED | No | Master switch for mutations. | false |
| ALLOWED_SCHEMAS | No | Schemas visible at all. | public |
| READABLE_TABLES | No | Readable tables; empty means every table in the allowed schemas. | (all) |
| WRITABLE_TABLES | No | Writable tables; writes are opt-in. | (none) |
| REQUIRE_APPROVAL | No | Human confirmation per write. | true |
| MAX_MUTATION_ROWS | No | Refuse a mutation above this blast radius. | 100 |
| MAX_CALLS_PER_MINUTE | No | Bounds an agent stuck in a retry loop. | 60 |
| STATEMENT_TIMEOUT_MS | No | Server-enforced statement timeout in ms. | 10000 |
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 |
|---|---|
| list_tablesA | Lists tables the agent is permitted to read, with row estimates. Start here — guessing table names wastes calls against the rate limit. |
| describe_tableA | Columns, types, nullability and defaults for one table. Masked columns are marked — they can be filtered on, but their values are never returned. |
| queryA | Executes a single SELECT inside a read-only transaction, capped at 200 rows. Use $1, $2 … placeholders with the params array — never string-concatenate values into the SQL. |
| executeA | Runs a single INSERT, UPDATE or DELETE. The change is first executed in a rolled-back transaction to measure exactly how many rows it affects, then that number is shown to a human for approval. UPDATE/DELETE without a WHERE clause is always 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 4 tools
Each tool targets a distinct action: listing tables, describing schema, executing read queries, and performing safe mutations. There is no overlap in functionality.
All tool names follow a consistent snake_case verb_noun pattern: list_tables, describe_table, query, execute. The naming is predictable and clear.
With 4 tools, the server is well-scoped for its purpose of providing safe database access. Each tool plays a necessary role without redundancy.
Covers essential operations: schema exploration, reading, and safe writes. Minor gap for multi-statement transactions, but the guard design prioritizes safety.