Postgres MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| POSTGRES_SSL | No | Whether to use SSL. Optional boolean value, default false. | false |
| POSTGRES_HOST | Yes | PostgreSQL database host. | |
| POSTGRES_PORT | No | PostgreSQL port. Optional, default 5432. | 5432 |
| POSTGRES_USER | Yes | PostgreSQL username. | |
| POSTGRES_VERIFY | No | Verify server certificate if SSL is true. Optional boolean value, default false. | false |
| POSTGRES_DATABASE | Yes | PostgreSQL database name. | |
| POSTGRES_PASSWORD | Yes | PostgreSQL password. | |
| POSTGRES_CONNECT_TIMEOUT | No | Connection timeout in seconds. Optional, default 60. | 60 |
| POSTGRES_SEND_RECEIVE_TIMEOUT | No | Query timeout in seconds. Optional, default 60. | 60 |
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_tablesC | List all user tables in the database |
| describe_tablesA | Get comprehensive table information for one or more tables including columns, indexes, triggers, foreign keys, and constraints |
| execute_raw_queryB | Execute a SQL query. The system will automatically detect the required permission level and request user approval for write operations and dangerous DDL commands. |
| switch_databaseB | Switches the active database to the specified one. If an error occurs during the switch, the system automatically reverts back to the previous active database |
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 capability: table listing, schema introspection, SQL execution, and database switching. The only potential overlap is that execute_raw_query can query metadata, but the dedicated list/describe tools are clearly scoped as conveniences.
All tools use consistent snake_case with a clear verb_noun pattern (list_tables, describe_tables, execute_raw_query, switch_database). The minor adjective in execute_raw_query does not break the convention.
Four tools is lean but reasonable for a database MCP server, and each tool has a clear role. Slightly under-provisioned for broader database workflows, but still within a well-scoped range.
The surface covers core discovery, schema inspection, arbitrary SQL execution, and database switching. Minor gaps exist around listing databases or schemas without raw SQL, but execute_raw_query makes these workarounds possible.