Postgres MCP Pro
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATABASE_URI | Yes | PostgreSQL database connection URI in the format postgresql://username:password@localhost:5432/dbname | |
| OPENAI_API_KEY | No | OpenAI API key for the experimental index tuning by LLM 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_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
Each tool has a clearly distinct purpose with no ambiguity: analyze_db_health focuses on health checks, analyze_query_indexes and analyze_workload_indexes target index optimization from different sources, execute_sql and explain_query handle query execution and analysis, get_object_details and list_objects provide object-level information, get_top_queries identifies performance issues, and list_schemas lists schemas. There is no overlap in functionality.
All tools follow a consistent verb_noun pattern using snake_case: analyze_db_health, analyze_query_indexes, analyze_workload_indexes, execute_sql, explain_query, get_object_details, get_top_queries, list_objects, and list_schemas. The naming is predictable and readable throughout.
With 9 tools, the count is well-scoped for a Postgres database management server. Each tool earns its place by covering distinct aspects like health analysis, query optimization, execution, explanation, object listing, and performance monitoring, without being excessive or sparse.
The tool surface is nearly complete for Postgres database management, covering health checks, query analysis, execution, object inspection, and performance monitoring. Minor gaps exist, such as lack of tools for database creation, user management, or backup operations, but core workflows are well-covered and agents can work around these omissions.