Skip to main content
Glama
irsyadjpp

postgres-mcp-server

by irsyadjpp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_SSLNoEnable SSL connection (default database)true
DB_HOSTNoPostgreSQL host (default database)127.0.0.1
DB_NAMENoDatabase name (default database)postgres
DB_PORTNoPostgreSQL port (default database)5432
DB_USERNoDatabase user (default database)postgres
READ_ONLYNoRestrict to SELECT/WITH/EXPLAIN queriestrue
DB_PASSWORDNoDatabase password (default database)
MAX_PAGE_SIZENoMaximum rows per page500
QUERY_TIMEOUTNoQuery timeout in milliseconds30000
DB_CONFIG_PATHNoPath to JSON config file (alternative)
DEFAULT_PAGE_SIZENoDefault page size when not specified100

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

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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