Connects Claude to your PostgreSQL database through pg_stat_statements and HypoPG to surface slow queries, analyze execution plans, and recommend indexes without touching disk. You get tools for pulling workload stats, testing hypothetical indexes, checking cache hit ratios, monitoring vacuum progress, and analyzing I/O patterns across tables. It also ships with health scoring that checks connection utilization, lock contention, and autovacuum effectiveness. Useful when you're tuning queries interactively and want to ask Claude to explain why a sequential scan is happening or whether a proposed index would actually help. Requires pg_read_all_stats role and expects DATABASE_URI as an environment variable.
claude mcp add --transport stdio isdaniel-pgtuner_mcp uvx pgtuner_mcp