agr_postgres_mcp
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PG_HOST | Yes | PostgreSQL hostname | |
| PG_PORT | No | Database port | 5432 |
| PG_USER | No | Database username | postgres |
| PSQL_PATH | No | Full path to the psql binary | |
| PG_DATABASE | Yes | Database name | |
| PG_PASSWORD | Yes | Database password | |
| PG_SERVER_NAME | No | MCP server name | postgres |
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": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryB | Execute a SQL query against the PostgreSQL database. Returns the query results as text. Use LIMIT clauses on exploratory queries. |
| list_tablesB | List all tables in the database with their schema, name, type, and owner. |
| describe_tableA | Describe a table's columns, types, constraints, and indexes. Equivalent to psql \d+ command. |
| list_indexesB | List all indexes in the database, optionally filtered by table name. |
| table_sizesA | Show table sizes including data, indexes, and total. Sorted by total size descending. |
| table_statsA | Show table statistics including live/dead tuples, last vacuum/analyze times. |
| active_connectionsA | Show active database connections with their state, query, and duration. |
| locksA | Show current locks in the database with blocking information. |
| explainA | Show the query execution plan for a SQL query using EXPLAIN. Does not execute the query. |
| database_sizeA | Show the total database size and individual table sizes. |
| row_countsA | Show estimated row counts for all tables, sorted by count descending. |
| foreign_keysA | List foreign key constraints, optionally filtered by table. |
| index_usageA | Show index usage statistics to identify unused or rarely used indexes. |
| schema_searchB | Search for tables or columns matching a pattern. Useful for finding tables by name. |
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 14 tools
Most tools target a distinct diagnostic concern such as schema, indexes, locks, or statistics. The main overlap is between database_size and table_sizes, which both report table sizes, but the rest are clearly separable.
All names are snake_case and readable, but conventions are mixed: list_/describe_ prefixes appear on some tools while others use bare nouns like locks and table_sizes or bare verbs like query and explain. This is mostly predictable but not fully consistent.
With 14 tools, the server is well-scoped for PostgreSQL inspection and administration. Each tool covers a meaningful diagnostic or query task without excessive redundancy.
The toolkit provides strong coverage of schema discovery, query analysis, sizes, stats, indexes, and locking. It lacks explicit tools for database objects like views or functions and for write operations, but the generic query tool fills those gaps, so the core diagnostic surface is complete.