PGTunerCAUTION
provides AI-powered PostgreSQL performance tuning capabilities.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://pypi.org/project/pgtuner-mcp/) [](https://pypi.org/project/pgtuner-mcp/) [](https://www.python.org/downloads/) [](https://pypi.org/project/pgtuner-mcp/) [](https://hub.docker.com/r/dog830228/pgtuner_mcp)
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.
Features
Query Analysis
- Retrieve slow queries from
pg_stat_statementswith detailed statistics - Analyze query execution plans with
EXPLAINandEXPLAIN ANALYZE - Identify performance bottlenecks with automated plan analysis
- Monitor active queries and detect long-running transactions
Index Tuning
- AI-powered index recommendations based on query workload analysis
- Hypothetical index testing with HypoPG extension (no disk usage)
- Find unused and duplicate indexes for cleanup
- Estimate index sizes before creation
- Test query plans with proposed indexes before implementing
Database Health
- Comprehensive health scoring with multiple checks
- Connection utilization monitoring
- Cache hit ratio analysis (buffer and index)
- Lock contention detection
- Vacuum health and transaction ID wraparound monitoring
- Replication lag monitoring
- Background writer and checkpoint analysis
Vacuum Monitoring
- Track long-running VACUUM and VACUUM FULL operations
926acbae7b93OBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add pgtuner-mcp -- None pgtuner-mcp==0.6.0
Trust audit
CAUTIONgrade C · trust 75/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (11)
__init__.cpython-310.pyc
__main__.cpython-310.pyc
server.cpython-310.pyc
__init__.cpython-310.pyc
hypopg_service.cpython-310.pyc
return f"postgresql://postgres:test@{host}:{port}/pgtuner_test"# password "test" from URI postgresql://postgres:test@... should not appear
msg = "boom postgresql://app:hunter2@db:5432/x boom"
assert rx.match("http://127.0.0.1:3000")mcp, psycopg, pglast, starlette, uvicorn
Gates applied: no_behavioural_pass.
926acbae7b93full audit observations/trust-audit/mcp-server/isdaniel__pgtuner.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | 926acbae7b93 | CAUTION | C | 75 | first audit |
Questions
What is the PGTuner MCP server?
provides AI-powered PostgreSQL performance tuning capabilities.
Is PGTuner safe to connect to an agent?
With care. The audit graded it C (75/100) and found 11 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does PGTuner need?
No credential environment variables were found in its source, so it appears to need none.
How does PGTuner run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as pgtuner_mcp.
How current is this page?
The grade is for one exact copy of the source (926acbae7b93), read on 2026-10-09. The repository is watched and re-audited when it changes.