Postgres MCP Pro
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATABASE_URI | Yes | PostgreSQL connection URI, e.g. postgresql://username:password@localhost:5432/dbname | |
| OPENAI_API_KEY | No | Optional API key for experimental LLM-based optimization |
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_objectsA | List tables/views/sequences in a schema. |
| get_object_detailsA | Get columns of a table or view. |
| execute_sqlB | Execute a SQL query. |
| explain_queryA | Get query execution plan. |
| analyze_db_healthB | Database health overview. |
| get_top_queriesA | Top queries by resource usage (requires pg_stat_statements extension). |
| analyze_index_performanceA | Analyze index usage and find unused/duplicate indexes. |
| get_active_queriesA | List currently running queries and their duration. |
| get_table_sizesB | Show table sizes including indexes and total. |
| get_database_locksA | Show current database locks and blocking queries. |
| format_sql_queryB | Format/beautify a SQL query for readability. |
| get_database_infoA | Get general database information: version, size, extensions, server settings. |
| manage_encryption_keyA | Manage the Data Encryption Certificate (Fernet key) for stored secrets. |
| list_toolsA | List all available MCP tools of this server with their descriptions. |
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 15 tools
Most tools target clearly distinct concerns: schema listing, object details, SQL execution, explain plans, active queries, locks, sizes, and index analysis. The main potential confusion is between analyze_db_health and get_database_info, which both provide broad database-level overviews and could lead an agent to pick the wrong one.
All tool names follow a consistent lowercase verb_noun pattern (list_schemas, get_object_details, execute_sql, analyze_index_performance, etc.). The naming convention is uniform and predictable, making it easy to infer what each tool does.
15 tools is at the upper end of the ideal range but still reasonable for a Postgres server covering introspection, SQL execution, performance analysis, and health checks. The inclusion of manage_encryption_key and list_tools adds some scope beyond the core database domain, making the set feel slightly over-packed.
The tool surface covers schema discovery, object details, arbitrary SQL execution, query explanation, performance diagnostics, active queries, locks, table sizes, and database info. Notable gaps include no query cancellation/termination, no vacuum/analyze maintenance tool, and no explicit database-level listing, though execute_sql can work around some of these.