Postgres MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_SSL | No | Enable SSL connection | true |
| DB_HOST | No | PostgreSQL host | 127.0.0.1 |
| DB_NAME | No | Database name | postgres |
| DB_PORT | No | PostgreSQL port | 5432 |
| DB_USER | No | Database user | postgres |
| READ_ONLY | No | Restrict to SELECT/WITH/EXPLAIN queries | true |
| DB_PASSWORD | Yes | Database password | |
| MAX_PAGE_SIZE | No | Maximum rows per page | 500 |
| QUERY_TIMEOUT | No | Query timeout in milliseconds | 30000 |
| DEFAULT_PAGE_SIZE | No | Default page size when not specified | 100 |
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 |
|---|---|
| queryC | Execute SQL with pagination and parameterization |
| describe_tableB | Get table structure including columns, constraints, and size statistics |
| list_objectsB | List tables, views, or functions in a schema |
| list_schemasC | List all schemas in the database |
| list_indexesC | List indexes for a table or schema |
| explain_queryC | Get query execution plan (EXPLAIN) |
| search_objectsB | Find tables, columns, functions, views by name pattern across schemas |
| get_connectionsB | Show active database connections, utilization, and idle-in-transaction warnings |
| diagnose_databaseC | Composite database health check: cache, connections, vacuum, indexes, sequences |
| get_slow_queriesC | Analyze slow queries via pg_stat_statements with filtering and sorting |
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 10 tools
Most tools have distinct purposes (describe_table for structure, list_schemas/list_indexes for enumeration, query for execution, and diagnostic tools). Minor overlap exists: list_objects and search_objects both enumerate objects (one by schema, one by pattern), and diagnose_database overlaps in scope with get_connections and get_slow_queries. Descriptions are clear enough to guide selection.
Nearly all tools follow a clean verb_noun pattern (describe_table, list_schemas, list_indexes, explain_query, search_objects, get_connections, get_slow_queries, list_objects), with diagnose_database fitting the same shape. The lone outlier is 'query', a bare verb that breaks the convention.
Ten tools is well-scoped for a Postgres introspection/diagnostics server, with each tool covering a distinct area of database exploration and execution. No redundancy that would bloat the surface.
Good coverage of introspection (schemas, tables, indexes, objects), query execution, and health diagnostics for a read/diagnostic-oriented server. Writes are handled via the generic query tool, but there is no explicit transaction or schema-modification surface, a minor gap agents can work around.