Postgres MCP Pro
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATABASE_URI | Yes | The PostgreSQL database connection URI (e.g., postgresql://username:password@localhost:5432/dbname) | |
| OPENAI_API_KEY | No | OpenAI API key for experimental index optimization by LLM feature (optional) |
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_detailsA | Show detailed information about a database object |
| explain_queryB | 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_queriesB | Reports the slowest or most resource-intensive queries using data from the 'pg_stat_statements' extension. |
| execute_sqlC | 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 distinct purposes, such as analyze_db_health for health checks and execute_sql for query execution, but analyze_query_indexes and analyze_workload_indexes could be confused as both focus on index recommendations, though their scopes differ (specific queries vs. workload analysis).
All tool names follow a consistent snake_case pattern with clear verb_noun structures, such as analyze_db_health, execute_sql, and list_objects, making them predictable and easy to understand.
With 9 tools, the set is well-scoped for a Postgres database management server, covering key areas like health analysis, query optimization, schema exploration, and SQL execution without being overwhelming.
The tools provide strong coverage for monitoring, analysis, and query execution in Postgres, but there are minor gaps such as missing CRUD operations for database objects (e.g., create_table or drop_schema) that agents might need to work around.