postgres-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_SSL | No | Enable SSL connection (default database) | true |
| DB_HOST | No | PostgreSQL host (default database) | 127.0.0.1 |
| DB_NAME | No | Database name (default database) | postgres |
| DB_PORT | No | PostgreSQL port (default database) | 5432 |
| DB_USER | No | Database user (default database) | postgres |
| READ_ONLY | No | Restrict to SELECT/WITH/EXPLAIN queries | true |
| DB_PASSWORD | No | Database password (default database) | |
| MAX_PAGE_SIZE | No | Maximum rows per page | 500 |
| QUERY_TIMEOUT | No | Query timeout in milliseconds | 30000 |
| DB_CONFIG_PATH | No | Path to JSON config file (alternative) | |
| DEFAULT_PAGE_SIZE | No | Default page size when not specified | 100 |
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 | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryC | Execute SQL with pagination and parameterization |
| describe_tableB | Get table structure including columns, constraints, and size statistics |
| list_objectsB | List tables, views, or functions in a schema |
| list_schemasB | List all schemas in the database |
| list_indexesB | List indexes for a table or schema |
| explain_queryC | Get query execution plan (EXPLAIN) |
| search_objectsB | Find tables, columns, functions, views by name pattern across schemas |
| get_connectionsB | Show active database connections, utilization, and idle-in-transaction warnings |
| diagnose_databaseB | Composite database health check: cache, connections, vacuum, indexes, sequences |
| get_slow_queriesC | Analyze slow queries via pg_stat_statements with filtering and sorting |
| list_partitionsC | List partitioned tables and monitor partition pruning efficiency (PostgreSQL 12+) |
| replication_statusA | Monitor logical replication: publications, subscriptions, and lag (PostgreSQL 13+) |
| progress_reportB | Monitor progress of VACUUM, ANALYZE, CLUSTER, and CREATE INDEX operations |
| wal_monitorC | Monitor WAL size, growth, archive status, and replication slots |
| extended_statsB | List extended statistics and provide recommendations for multi-column correlations |
| index_dedupB | Identify B-tree indexes that can benefit from deduplication (PostgreSQL 13+) |
| generated_columnsB | List generated columns and monitor their dependencies (PostgreSQL 12+) |
| jsonb_analysisB | Analyze JSONB columns and recommend GIN indexes for better performance |
| parallel_queryC | Monitor parallel query worker usage and performance |
| autovacuum_advisorA | Analyze autovacuum effectiveness and recommend tuning settings |
| huge_pagesB | Monitor huge pages usage and provide configuration recommendations |
| statements_enhancedC | Enhanced pg_stat_statements analysis with parallel workers and WAL tracking |
| foreign_keyB | Monitor foreign key performance and identify missing indexes |
| backup_monitorB | Monitor pg_basebackup progress and PITR recovery timeline |
| extensionsB | List installed extensions, check compatibility, and view dependencies |
| connection_poolB | Monitor HikariCP connection pool metrics, detect connection leaks, and track wait times |
| jpa_mappingC | Validate database schema against JPA/Hibernate entity mappings |
| orm_performanceB | Analyze ORM query performance, detect N+1 problems, and identify lazy loading issues |
| transaction_monitorB | Monitor active transactions, isolation levels, and detect long-running transactions |
| prepared_statementC | Analyze prepared statement cache hit ratio and query patterns |
| migration_trackingB | Track Flyway/Liquibase migrations, detect schema drift, and validate checksums |
| orm_index_coverageB | Analyze index coverage for ORM @Query annotations and recommend missing indexes |
| jsonb_entityB | Analyze JSONB columns for @Convert entity attributes and recommend GIN indexes |
| batch_operationC | Monitor JDBC batch operation performance and efficiency |
| sequence_monitorB | Monitor sequences for JPA @GeneratedValue and detect exhaustion risks |
| timeseries_partitionC | Recommend partitioning strategies for time-series entity tables |
| connection_leakC | Detect connection leaks and analyze connection acquisition patterns |
| deadlock_analysisC | Analyze deadlock patterns and lock wait information |
| jpa_schema_validationB | Validate Spring Data JPA annotations against database schema |
| orm_performance_baselineC | Establish and monitor performance baselines for ORM CRUD operations |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/irsyadjpp/postgres-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server