PostgreSQL performance Tuner MCP Server
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. Its 40 documented tools cover min, analyze, table, index. It runs locally over stdio via the published package.
People who work with min, analyze and table and want it reachable from Claude, Cursor, VS Code, or another MCP client. The project is written in Python.
VERIFIED ACTIVE
LAST COMMIT 2026-06-02 · ★ 29 · #80 OF 168 MAINTAINED DATABASE · VERIFIED 2026-09-18
Apache-2.0 · Python servers · how we verify → /methodology
01 · Install PostgreSQL performance Tuner MCP Server
before you install - you'll need
Set DATABASE_URI, PGTUNER_EXCLUDE_USERIDS before connecting.
Claude Code
claude mcp add isdaniel-pgtuner_mcp -- uvx pgtuner-mcp Claude Desktop / Cursor / VS Code - add to config
{
"mcpServers": {
"isdaniel-pgtuner_mcp": {
"command": "uvx",
"args": [
"pgtuner-mcp"
]
}
}
} Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.
Using another client? Same JSON, different key
Claude Desktop · mcpServers
Cursor · mcpServers
VS Code · servers
Windsurf · mcpServers
Zed · context_servers
Cline · mcpServers
Roo Code · mcpServers
Continue · mcpServers
LibreChat · mcpServers
Gemini CLI · mcpServers
Codex CLI · mcp_servers
Full setup guides: every client.
02 · Evidence
Security posture
What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.
runs as local process (stdio) - runs on your machine with your user's permissions
license Apache-2.0 - declared in the repository
pypi package pgtuner-mcp - check the name against the project README before installing (PyPI has no namespace ownership)
registry namespace io.github.isdaniel is GitHub-verified and matches the repo owner
03 · What PostgreSQL performance Tuner MCP Server can do
Prose above is summarized from the project's README and registry record - no invented capabilities.
What you can build
With this server connected, an agent can analyze a query's execution plan with EXPLAIN ANALYZE, including automated issue detection, get detailed table statistics including size, row counts, dead tuples, and access patterns, create, list, drop, or reset HypoPG hypothetical indexes. Supports hide/unhide existing indexes, and find unused and duplicate indexes that can be safely dropped.
Capability map
Tools grouped from the project's README - what PostgreSQL performance Tuner MCP Server lets an agent do.
Analyze
6 tools - e.g. Analyze a query's execution plan with EXPLAIN ANALYZE, including automated issue detection; Analyze disk I/O read/write patterns, identify hot tables, buffer cache efficiency, and I/O bottlenecks.…
analyze_query · analyze_disk_io_patterns · analyze_wait_events · analyze_table_bloat · analyze_index_bloat · analyze
Min
5 tools - e.g. Minimum call count filter (default: 1); Minimum mean (average) execution time in milliseconds filter; Minimum improvement threshold (default: 10%)
min_calls · min_mean_time_ms · min_improvement_percent · min_bloat_percent · min_size_gb
read & search
4 tools - e.g. Retrieve slow queries from pg_stat_statements with detailed stats (total time, mean time, calls, cache hit ratio). Excludes system catalog queries.; Find unused and duplicate indexes that can be safely…
get_slow_queries · find_unused_indexes · get_active_queries · get_bloat_summary
Table
3 tools - e.g. Get detailed table statistics including size, row counts, dead tuples, and access patterns; Name of a specific table to analyze (optional); Minimum table size in GB to include in schema-wide scan…
get_table_stats · table_name · min_table_size_gb
Index
3 tools - e.g. AI-powered index recommendations based on query workload analysis; Name of a specific index to analyze (optional); Minimum index size in GB to include (default: 5)
get_index_recommendations · index_name · min_index_size_gb
Include
3 tools - e.g. Test with HypoPG (default: true); Include actionable recommendations (default: true); Include TOAST table analysis (default: false)
include_hypothetical_testing · include_recommendations · include_toast
Explain
1 tool - e.g. Run EXPLAIN with hypothetical indexes to test improvements without creating real indexes
explain_with_indexes
Manage
1 tool - e.g. Create, list, drop, or reset HypoPG hypothetical indexes. Supports hide/unhide existing indexes.
manage_hypothetical_indexes
Latest releases
v0.6.0 · 2026-06-02
add skills. · include source database in ROLLBACK PREPARED hint
v0.5.0 · 2025-12-11
Add Vacuum Monitoring, and Disk IO tools · comprehensive security and code quality improvements
v0.4.0 · 2025-12-04
add user exclusion filter for monitoring queries
04 · Who maintains PostgreSQL performance Tuner MCP Server
PostgreSQL performance Tuner MCP Server is maintained by isdaniel. We track 2 MCP servers from isdaniel - 2 actively maintained, 89 combined GitHub stars, oldest repo from Mar 2025. Full record: all servers from isdaniel.
05 · Facts
- repository
- github.com/isdaniel/pgtuner_mcp
- category
- database - ranked #80 of 168 actively-maintained database servers as of 2026-09-18.
- registry
- io.github.isdaniel/pgtuner_mcp (active, first published 2025-12-13)
- packages
- pypi:pgtuner-mcp
06 · PostgreSQL performance Tuner MCP Server FAQ
Is PostgreSQL performance Tuner MCP Server still maintained?
Yes - as of 2026-09-18, its last commit was 2026-06-02. We re-verify nightly.
What can PostgreSQL performance Tuner MCP Server do?
With this server connected, an agent can analyze a query's execution plan with EXPLAIN ANALYZE, including automated issue detection, get detailed table statistics including size, row counts, dead tuples, and access patterns, create, list, drop, or reset HypoPG hypothetical indexes. Supports hide/unhide existing indexes, and find unused and duplicate indexes that can be safely dropped.
How do I install PostgreSQL performance Tuner MCP Server?
Run `uvx pgtuner-mcp`. The README documents 2 environment variables (DATABASE_URI, PGTUNER_EXCLUDE_USERIDS) to set first. Set DATABASE_URI, PGTUNER_EXCLUDE_USERIDS before connecting. You can also paste the ready-made client config above.
Does PostgreSQL performance Tuner MCP Server run locally?
Yes - it's a stdio server: it runs on your machine (via uvx) with your user's permissions. Your data stays local unless the server itself calls external APIs.
07 · Alternatives to PostgreSQL performance Tuner MCP Server
Alternatives to PostgreSQL performance Tuner MCP Server
Maintained database servers if PostgreSQL performance Tuner MCP Server isn't the fit.
- Dbx Query databases from AI agents using connections configured in DBX. ★ 20,017 · 2026-09-18
- Toolbox for Databases MCP Toolbox for Databases enables your agent to connect to your database. ★ 16,449 · 2026-09-18
- Butterbase Ai MCP Server Butterbase MCP server - manage your backend: schemas, auth, functions, storage, RAG, deploys. ★ 3,562 · 2026-09-18
- Dbhub Minimal, token-efficient Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB ★ 3,534 · 2026-09-18
- LINQ to DB Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB. ★ 3,328 · 2026-09-17
- Supabase MCP server for interacting with the Supabase platform ★ 2,910 · 2026-09-17
Pairs well with
Servers that cover what PostgreSQL performance Tuner MCP Server doesn't - only shown when the pairing reason fits the companion.
- Server Chart → data & analytics companion data & analytics · ★ 4,367
- ClaudeR - RStudio MCP Server → data & analytics companion data & analytics · ★ 342
- Server Filesystem → filesystem companion filesystem · ★ 39,038
- Pdf MCP → filesystem companion filesystem · ★ 135
- Telnyx → API integration companion API integration · ★ 197
- Microsoft 365 MCP Server → API integration companion API integration · ★ 980
More database MCP servers · Ado MCP · DB2TOON MCP · Code Memory · Agent Discover · Flashcards Open Source App
More Python MCP servers · HubVibe Site Audits · Lucius MCP · Loci · Japan Data MCP · MTG MCP Server · see all