Postgres MCP Pro
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATABASE_URI | Yes | Postgres database connection URI, e.g. postgresql://username:password@localhost:5432/dbname. Use a least-privilege (read-only) database role when running in restricted mode. | |
| OPENAI_API_KEY | No | OpenAI API key, required only for the experimental LLM-based index tuning feature. |
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 |
|---|---|
| list_schemasA | List all schemas in the database |
| list_objectsC | List objects in a schema |
| get_object_detailsB | Show detailed information about a database object |
| explain_queryA | Explains the execution plan for a SQL query, showing how the database will execute it and provides detailed cost estimates. |
| analyze_workload_indexesB | Analyze frequently executed queries in the database and recommend optimal indexes |
| analyze_query_indexesA | Analyze a list of (up to 10) SQL queries and recommend optimal indexes |
| analyze_db_healthA | Analyzes database health. Here are the available health checks:
|
| get_top_queriesA | Reports the slowest or most resource-intensive queries using data from the 'pg_stat_statements' extension. |
| execute_sqlB | Execute any SQL query |
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 9 tools
Most tools have clearly distinct purposes: schema listing, object details, health checks, query explanation, and query execution. The main possible confusion is between analyze_workload_indexes and analyze_query_indexes, though their descriptions clarify that one analyzes observed workload and the other analyzes user-provided SQL.
All tool names consistently follow a snake_case verb_noun pattern, such as list_schemas, get_object_details, explain_query, and execute_sql. The convention is predictable throughout the set.
Nine tools is well-scoped for a PostgreSQL analysis and administration server. Each tool covers a distinct capability area without obvious redundancy or missing basic operations.
The surface covers schema exploration, object inspection, health analysis, query planning, index recommendations, top-query reporting, and arbitrary SQL execution. Some structured write or session-management operations are absent, but execute_sql provides a workaround for most gaps.