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.

  1. Weather MCP Server providing weather information, air quality data, and timezone utilities using the Open-Meteo API. ★ 58

05 · Facts

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