feat: add PostgreSQL tuner (pgtuner) MCP sidecar #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a PostgreSQL performance tuning MCP server as an optional sidecar, disabled by default. This gives the AI assistant the ability to analyze slow queries, recommend indexes, detect bloat, monitor vacuum operations, and score overall database health.
Repo: https://github.com/isdaniel/pgtuner_mcp
Server Details
dog830228/pgtuner_mcppip install pgtuner_mcp(for stdio inside container)Required Configuration
DATABASE_URIpostgresql://user:pass@host:5432/db)PGTUNER_EXCLUDE_USERIDSPostgreSQL permissions needed
The database user requires:
pg_read_all_statsroleSELECTon monitored tablespgstattupleandHypoPGextensions for full functionalityCapabilities
Proposed Implementation
Option A: SSE Sidecar (recommended — consistent with existing architecture)
Since pgtuner supports SSE natively, it fits the existing sidecar pattern used by kubernetes, flux, and homeassistant MCP servers.
Option B: stdio inside mcp-extras image
Could also be installed via
pip install pgtuner_mcpin the mcp-extras image variant (see #29) and run via stdio. This avoids the sidecar but requires the mcp-extras image.Secret keys (in env secret)
database-uri— PostgreSQL connection stringpgtuner-exclude-userids— optional exclusion listOpen questions
/sseor different)Checklist
deployment.yamlvalues.yaml.mcp.jsonentry@claude is this complete?
Implemented. pgtuner MCP sidecar is available in
deployment.yaml,values.yaml(disabled by default, requiresDATABASE_URI), and.mcp.json. Uses SSE transport on port 8085.