This MCP server provides AI-powered PostgreSQL performance tuning capabilities, including slow query identification, optimal index recommendations, and execution plan analysis.
From the registry: provides AI-powered PostgreSQL performance tuning capabilities.
Please install the `pgtuner-mcp` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **PostgreSQL database** — PostgreSQL 12+ with pg_stat_statements extension enabled (required)
- **Python 3.10+** — Python runtime required
Canonical MCP server config (stdio transport):
- command: `python`
- args: ["-m","pgtuner_mcp"]
- required environment variables:
- `DATABASE_URI`: PostgreSQL connection string (example: `postgresql://user:password@localhost:5432/mydb`)
- optional environment variables:
- `PGTUNER_EXCLUDE_USERIDS`: Comma-separated OIDs of users to exclude from monitoring (example: `16384,16385`)
Note: Install with: pip install pgtuner_mcp. Supports stdio, SSE, and streamable-http modes. Optional extensions: hypopg (hypothetical index testing), pgstattuple (bloat detection). Docker image available: dog830228/pgtuner_mcp.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.DATABASE_URIrequiredPostgreSQL connection stringMinimal, token-efficient Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB