pg-readonly-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_DB_DSN | No | Connection string for the SELECT-only role | |
| DATABASE_URL | No | Alternative connection string for the SELECT-only role | |
| MCP_DB_POOL_MAX | No | Connection pool maximum size | 4 |
| MCP_DB_POOL_MIN | No | Connection pool minimum size | 1 |
| MCP_DB_MAX_BYTES | No | Response byte cap (hard max 524288) | 65536 |
| MCP_DB_CONNECT_TIMEOUT_S | No | Connection timeout in seconds | 10 |
| MCP_DB_STATEMENT_TIMEOUT_MS | No | Per-statement timeout in milliseconds | 5000 |
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": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_schemasA | List schemas the connected read-only role can access. |
| list_tablesA | List tables and views in Returns columns=[name, row_estimate, comment, kind]. |
| describe_tableA | Describe a table: columns, types, nullability, primary key, FKs, indexes. Columns come back flat as |
| sample_tableA | Return the first |
| run_queryA | Run a single read-only SELECT and return a bounded, columnar result. Accepts one statement of any read-only shape: The query is wrapped in Performance note: plain |
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 5 tools
Each tool targets a distinct operation: listing schemas vs. listing tables vs. describing a table vs. sampling rows vs. running arbitrary queries. No overlap exists.
All five tools follow a consistent verb_noun pattern with underscores (e.g., list_schemas, describe_table), providing clear and predictable naming.
Five tools is an ideal number for a read-only database interface—covering all essential operations without unnecessary complexity.
The toolset covers the full read-only workflow: schema discovery, table listing, table descriptions, data sampling, and arbitrary SELECT queries. No obvious gaps.