PostgreSQL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_SSL | No | Enable SSL connection | false |
| DB_HOST | No | PostgreSQL server hostname | localhost |
| DB_PORT | No | PostgreSQL server port | 5432 |
| DB_DATABASE | No | Database name | postgres |
| DB_PASSWORD | No | PostgreSQL password | |
| DB_USERNAME | No | PostgreSQL username | postgres |
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 |
|---|---|
| connectA | Connect to a PostgreSQL database using a connection string. The connection persists for subsequent queries until changed or disconnected. Only hosts listed in DB_ALLOWED_HOSTS (plus the default DB_HOST:DB_PORT) are permitted. |
| disconnectA | Disconnect from the current runtime database and revert to the default environment-configured connection |
| queryA | Run a read-only SQL query against the currently connected 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 3 tools
The three tools have completely distinct roles: connect establishes a connection, disconnect tears it down, and query executes SQL. There is no overlap or ambiguity between them.
All tool names are single lowercase verbs in the imperative style: connect, disconnect, query. The naming pattern is perfectly consistent and predictable.
Three tools is an appropriate scope for a focused read-only query server: connection management plus query execution. Each tool has a clear, necessary purpose.
The connection lifecycle is complete, and query covers the core read-only use case. Missing conveniences like schema listing or write operations are either outside the stated read-only scope or can be worked around via SQL queries.