provides AI-powered PostgreSQL performance tuning capabilities.
provides AI-powered PostgreSQL performance tuning capabilities.
A Model Context Protocol (MCP) server that provides AI-powered PostgreSQL performance tuning capabilities. This server helps identify slow queries, recommend optimal indexes, analyze execution plans, and leverage HypoPG for hypothetical index testing.
Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| get_slow_queries | Retrieve slow queries from pg_stat_statements with detailed stats (total time, mean time, calls, cache hit ratio). Excludes system catalog queries. |
| analyze_query | Analyze a query's execution plan with EXPLAIN ANALYZE, including automated issue detection |
| get_table_stats | Get detailed table statistics including size, row counts, dead tuples, and access patterns |
| analyze_disk_io_patterns | Analyze disk I/O read/write patterns, identify hot tables, buffer cache efficiency, and I/O bottlenecks. Supports filtering by analysis type (all, buffer_pool, tables, indexes, temp_files, checkpoints). |
| get_index_recommendations | AI-powered index recommendations based on query workload analysis |
| explain_with_indexes | Run EXPLAIN with hypothetical indexes to test improvements without creating real indexes |
| manage_hypothetical_indexes | Create, list, drop, or reset HypoPG hypothetical indexes. Supports hide/unhide existing indexes. |
| find_unused_indexes | Find unused and duplicate indexes that can be safely dropped |
| check_database_health | Comprehensive health check with scoring (connections, cache, locks, replication, wraparound, disk, checkpoints) |
| get_active_queries | Monitor active queries, find long-running transactions and blocked queries. By default excludes system processes. |
| analyze_wait_events | Analyze wait events to identify I/O, lock, or CPU bottlenecks. Focuses on client backend processes. |
| review_settings | Review PostgreSQL settings by category with optimization recommendations |
| analyze_table_bloat | Analyze table bloat using pgstattuple extension. Shows dead tuple counts, free space, and wasted space percentage. |
| analyze_index_bloat | Analyze B-tree index bloat using pgstatindex. Shows leaf density, fragmentation, and empty/deleted pages. Also supports GIN and Hash indexes. |
claude mcp add pgtuner --env DATABASE_URI=your-value --env PGTUNER_EXCLUDE_USERIDS=your-value -- uvx pgtuner_mcp| Variable | Description | Required |
|---|---|---|
| DATABASE_URI | Configuration value read at startup. | Optional |
| PGTUNER_EXCLUDE_USERIDS | Configuration value read at startup. | Optional |
Inspect PostgreSQL schemas and run read-only queries with the archived MCP reference server. Review its maintenance status before choosing it.
Connect the Notion MCP server to search workspace content and work with pages and databases through Notion’s hosted OAuth service.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.