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 connecting database tools to Claude, Cursor, VS Code, or another MCP client. The project is written in Python.
VERIFIED ACTIVE
LAST COMMIT 2026-06-02 · ★ 26 · #64 OF 151 MAINTAINED DATABASE · VERIFIED 2026-08-25
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, 84 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 #64 of 151 actively-maintained database servers as of 2026-08-25.
- release cadence
- 1 release in the last 90 days (latest 2026-06-02)
- 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-08-25, its last commit was 2026-06-02 and it shipped 1 release in the last 90 days. 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. ★ 16,462 · 2026-08-25
- Toolbox for Databases MCP Toolbox for Databases enables your agent to connect to your database. ★ 16,249 · 2026-08-25
- Dbhub Minimal, token-efficient Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB ★ 3,395 · 2026-08-21
- Butterbase Ai MCP Server Butterbase MCP server - manage your backend: schemas, auth, functions, storage, RAG, deploys. ★ 3,225 · 2026-08-24
- Supabase MCP server for interacting with the Supabase platform ★ 2,871 · 2026-08-22
- MongoDB MCP Server MongoDB Model Context Protocol Server ★ 1,106 · 2026-08-24
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,337
- Keboola MCP Server → data & analytics companion data & analytics · ★ 86
- Server Filesystem → filesystem companion filesystem · ★ 38,704
- X402 List MCP → filesystem companion filesystem · ★ 58
- Telnyx → API integration companion API integration · ★ 197
- Microsoft 365 MCP Server → API integration companion API integration · ★ 932
More database MCP servers · Ado MCP · DB2TOON MCP · Code Memory · Agent Discover · Flashcards Open Source App
More Python MCP servers · DEVONthink MCP (istefox) · Lucius MCP · Japan Data MCP · MTG MCP Server · Nexus MCP · see all