mcp-postgresdb-readonly
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | If set, starts server in HTTP mode on this port. If not set, runs in stdio mode. | |
| MAX_ROWS | No | Maximum rows returned per query (auto LIMIT). Default: 1000. | 1000 |
| MCP_AUTH_TOKEN | No | Bearer token required for HTTP mode. If not set, server is unprotected. | |
| QUERY_TIMEOUT_MS | No | Query timeout in milliseconds. Default: 30000. | 30000 |
| POSTGRES_PROD_SSL | No | Enable SSL for production PostgreSQL. Default: true. | true |
| POSTGRES_TEST_SSL | No | Enable SSL for test PostgreSQL. Default: true. | true |
| POSTGRES_PROD_HOST | No | Hostname for production PostgreSQL database. | |
| POSTGRES_PROD_PORT | No | Port for production PostgreSQL database. Default: 5432. | 5432 |
| POSTGRES_PROD_USER | No | User for production PostgreSQL database. | |
| POSTGRES_TEST_HOST | No | Hostname for test PostgreSQL database. | |
| POSTGRES_TEST_PORT | No | Port for test PostgreSQL database. Default: 5432. | 5432 |
| POSTGRES_TEST_USER | No | User for test PostgreSQL database. | |
| POSTGRES_PROD_SCHEMA | No | Optional schema to restrict access for production environment. If not set, all user schemas are accessible. | |
| POSTGRES_STAGING_SSL | No | Enable SSL for staging PostgreSQL. Default: true. | true |
| POSTGRES_TEST_SCHEMA | No | Optional schema to restrict access for test environment. | |
| POSTGRES_STAGING_HOST | No | Hostname for staging PostgreSQL database. | |
| POSTGRES_STAGING_PORT | No | Port for staging PostgreSQL database. Default: 5432. | 5432 |
| POSTGRES_STAGING_USER | No | User for staging PostgreSQL database. | |
| RATE_LIMIT_PER_MINUTE | No | Maximum requests per minute. Default: 60. | 60 |
| POSTGRES_PROD_DATABASE | No | Database name for production PostgreSQL. | |
| POSTGRES_PROD_PASSWORD | No | Password for production PostgreSQL user. | |
| POSTGRES_TEST_DATABASE | No | Database name for test PostgreSQL. | |
| POSTGRES_TEST_PASSWORD | No | Password for test PostgreSQL user. | |
| POSTGRES_STAGING_SCHEMA | No | Optional schema to restrict access for staging environment. | |
| POSTGRES_STAGING_DATABASE | No | Database name for staging PostgreSQL. | |
| POSTGRES_STAGING_PASSWORD | No | Password for staging PostgreSQL user. |
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 |
|---|---|
| queryA | Execute a read-only SQL query on a PostgreSQL database. ⛔ WRITE OPERATIONS ARE STRICTLY FORBIDDEN (INSERT, UPDATE, DELETE, DROP, etc.)
|
| list-tablesC | List all tables in a schema |
| describe-tableB | Get the structure of a table (columns, types, nullability, defaults) |
| list-schemasB | List all user-defined schemas in the database |
| list-environmentsB | List all configured database environments |
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 has a clearly distinct target: query executes SQL, list-tables and list-schemas enumerate metadata, describe-table inspects a single table's structure, and list-environments reports configured connections. There is no meaningful overlap between any pair.
Four tools follow a clean verb_noun kebab-case pattern (list-tables, describe-table, list-schemas, list-environments) with uniform casing. The lone exception is 'query', a bare verb with no object, which is a minor deviation from the established pattern.
Five tools is well-scoped for a read-only database accessor: one execution tool plus four discovery/introspection tools. Nothing feels redundant or missing at the count level.
The surface covers the natural discovery-to-query workflow (schemas → tables → structure → SQL), and omitting writes is intentional for a read-only server. Minor gaps exist, such as listing views/indexes or an EXPLAIN tool, but core workflows are fully supported.