postgres-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| POSTGRES_MCP_PSQL | No | Path to the psql binary, used when psql is not on PATH or to skip the search. | |
| POSTGRES_MCP_CONFIG | No | Override the location of the config file (default: ~/.config/postgres-mcp/config.toml). | |
| POSTGRES_MCP_READ_ONLY | No | Set to '1' to force every configured database read-only, regardless of the config file. | 0 |
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
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_databasesA | List the configured PostgreSQL databases and their read-only status. Returns each database's name, connection target and whether it accepts writes. Passwords are never included. |
| execute_sqlA | Run SQL against a configured database and return the rows as CSV.
|
| describe_schemaA | Describe a schema's tables, or one table's columns and indexes. Without |
| test_connectionA | Check psql and connectivity, for one database or all of them. Reports the path to the psql binary, the server version, the connected
user, and each database's configured read-only or read-write mode. Omit
|
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
execute_sql and describe_schema are clearly distinct, and list_databases is primarily about enumerating configured databases. test_connection overlaps somewhat by reporting each database's read-only/write mode, but its focus on psql and connectivity makes the boundary clear enough.
All tool names follow a consistent verb_noun snake_case pattern: list_databases, execute_sql, test_connection, describe_schema. There are no mixed conventions or vague verbs.
Four tools is well-scoped for a focused Postgres server: enumeration, querying, introspection, and diagnostics. Each tool earns its place without redundancy.
Arbitrary SQL execution covers CRUD/write operations where permitted, while list_databases and describe_schema enable discovery and introspection. A minor gap is the lack of a direct list-schemas tool, but agents can work around it via information_schema queries.