postgres-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MASSTRADE_RO_USER | No | Read-only username for wren-profiles mode. Read from the environment or ~/.wren/.env. | |
| POSTGRES_MCP_USER | No | Database username for direct PostgreSQL mode. Referenced in config.yaml as ${POSTGRES_MCP_USER}. | |
| POSTGRES_MCP_CONFIG | No | Path to the YAML configuration file. Defaults to ./config.yaml or ./config.example.yaml. | |
| MASSTRADE_RO_PASSWORD | No | Read-only password for wren-profiles mode. Read from the environment or ~/.wren/.env. | |
| POSTGRES_MCP_PASSWORD | No | Database password for direct PostgreSQL mode. Referenced in config.yaml as ${POSTGRES_MCP_PASSWORD}. |
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 |
|---|---|
| queryA | Run a read-only SQL query against the database. The query is validated against the security policy before execution: only allowlisted commands are accepted, denied keywords are rejected, and a LIMIT is appended automatically when the query has none. Args: sql: SQL statement to execute (read-only). Returns: Rows as a JSON array of objects, or an object with an "error" key. |
| list_tablesA | List all base tables in the public schema. |
| describe_tableB | Describe the columns of a table or view in the public schema. Args: table_name: Name of the table or view. Returns: Column metadata as a JSON array of objects. |
| relationshipsA | List foreign-key relationships between tables in the public schema. |
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 has a clearly distinct purpose: query runs ad-hoc read-only SQL, list_tables enumerates tables, describe_table returns column metadata, and relationships exposes foreign keys. There is no overlap in their intended use, so an agent can easily select the right tool.
Three tools follow a verb_noun pattern (list_tables, describe_table) or a clear verb (query), while relationships is a noun. This is a minor deviation, but all names use snake_case and remain readable and predictable overall.
Four tools is well-scoped for a read-only Postgres introspection server. Each tool serves a distinct, necessary function (querying, listing, describing, and mapping relationships) without redundancy or bloat.
The toolset covers the core read-only workflows: running queries, listing base tables, describing columns, and discovering foreign keys. However, it lacks tools for listing views or schemas (list_tables only covers public base tables), which are minor gaps for full schema exploration.