Atlas / MCP servers / isdaniel / PGTuner

PGTunerCAUTION

mcp/isdaniel/pgtuner

provides AI-powered PostgreSQL performance tuning capabilities.

Verdict
CAUTION
Grade
C
Trust score
75 /100
Exposed tools
—
Transport
stdio · streamable-http
License
Apache-2.0
Stars
29
01

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_statements with detailed statistics
  • Analyze query execution plans with EXPLAIN and EXPLAIN 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
Read from source at commit 926acbae7b93OBSERVED · 2026-10-09
02

Connect

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-code (pypi)
claude mcp add pgtuner-mcp -- None pgtuner-mcp==0.6.0
03

Trust audit

CAUTIONgrade C · trust 75/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryWARN
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

MEDIUMInventory / provenance · inv.binary · CWE-1104
src/pgtuner_mcp/__pycache__/__init__.cpython-310.pyc
__init__.cpython-310.pyc
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
MEDIUMInventory / provenance · inv.binary · CWE-1104
src/pgtuner_mcp/__pycache__/__main__.cpython-310.pyc
__main__.cpython-310.pyc
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
MEDIUMInventory / provenance · inv.binary · CWE-1104
src/pgtuner_mcp/__pycache__/server.cpython-310.pyc
server.cpython-310.pyc
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
MEDIUMInventory / provenance · inv.binary · CWE-1104
src/pgtuner_mcp/services/__pycache__/__init__.cpython-310.pyc
__init__.cpython-310.pyc
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
MEDIUMInventory / provenance · inv.binary · CWE-1104
src/pgtuner_mcp/services/__pycache__/hypopg_service.cpython-310.pyc
hypopg_service.cpython-310.pyc
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
MEDIUMHard-coded secrets · secret.db_uri · CWE-798, CWE-321
tests/integration/conftest.py:36
return f"postgresql://postgres:test@{host}:{port}/pgtuner_test"
MEDIUMHard-coded secrets · secret.db_uri · CWE-798, CWE-321
tests/integration/test_security_behavior.py:20
# password "test" from URI postgresql://postgres:test@... should not appear
MEDIUMHard-coded secrets · secret.db_uri · CWE-798, CWE-321
tests/test_server_security.py:55
msg = "boom postgresql://app:hunter2@db:5432/x boom"
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
tests/test_server_security.py:22
assert rx.match("http://127.0.0.1:3000")
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
mcp, psycopg, pglast, starlette, uvicorn
Why it matters. 5 requirement(s) not pinned with ==
Fix. pin exact versions
LOWInventory / provenance · mcp.no_tools_extracted · CWE-1104
server.json
Why it matters. the tool list is enumerated at runtime by tools/list, not declared in source
Fix. the page says so rather than showing an empty table

Gates applied: no_behavioural_pass.

Audited 2026-10-09 · audit v0.4.1 · source sha 926acbae7b93full audit observations/trust-audit/mcp-server/isdaniel__pgtuner.json · Report an issue / request a re-scan
04

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-09926acbae7b93CAUTIONC75first audit
05

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.

Advertisement