# PG Bloat Detective (pypi · pg-bloat-detective)

Read-only Postgres bloat verdicts: blockers, timelines, REINDEX proof.

- Trust score: 77/100 (medium)
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-10-17

## Components

- pypi · `pg-bloat-detective`: 77/100 (this document), [markdown](https://verifymcp.io/servers/r69shabh-pg-bloat-detective/pg-bloat-detective.md), [page](https://verifymcp.io/servers/r69shabh-pg-bloat-detective/pg-bloat-detective)

## Channel facts

- Registry: `pypi`
- Package: `pg-bloat-detective`
- Version: `0.1.6`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-10-17.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - Runs setuptools.build_meta at install time, a recognised build step with no custom scripting around it.
  - 0 of 30 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to r69shabh/pg-bloat-detective).
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 4 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 67/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 705 tokens (~141/item across 5 items; 5 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 0/100
  - Stability not yet verified: not enough scan history yet (needs a 30-day window).
- **Tool Coverage**: 67/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 0% of tool parameters carry a description.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 5 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 5 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

**Unverified: 1 category.** A category scored 0 because we could not verify it: a data source with nothing on this package, evidence we could not reach, or a check we could not run. We only credit what we can confirm.

## Install

### How do I install the PG Bloat Detective MCP server?

PG Bloat Detective runs locally as a PyPI package, launched with uvx pg-bloat-detective. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add r69shabh-pg-bloat-detective -- uvx pg-bloat-detective
```

### Cursor

```json
{
  "mcpServers": {
    "r69shabh-pg-bloat-detective": {
      "command": "uvx",
      "args": [
        "pg-bloat-detective"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "r69shabh-pg-bloat-detective": {
      "command": "uvx",
      "args": [
        "pg-bloat-detective"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add r69shabh-pg-bloat-detective -- uvx pg-bloat-detective
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "r69shabh-pg-bloat-detective": {
      "type": "local",
      "command": [
        "uvx",
        "pg-bloat-detective"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add r69shabh-pg-bloat-detective --command uvx --arg pg-bloat-detective
```

### Hermes

```yaml
mcp_servers:
  r69shabh-pg-bloat-detective:
    command: "uvx"
    args: ["pg-bloat-detective"]
```

### Netclaw

```json
{
  "McpServers": {
    "r69shabh-pg-bloat-detective": {
      "Transport": "stdio",
      "Command": "uvx",
      "Arguments": [
        "pg-bloat-detective"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add r69shabh-pg-bloat-detective -t stdio -c uvx -a pg-bloat-detective
```

### Other

```json
{
  "mcpServers": {
    "r69shabh-pg-bloat-detective": {
      "command": "uvx",
      "args": [
        "pg-bloat-detective"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-10-14 (score 77, +28)

- [security improvement] Injection markers: unverified → pass
- [security] First check of Judged manipulation: pass
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] MCP protocol: unverified → pass
- [functional] First check of Tool coverage: 0
- [functional] First check of Schema quality: fail
- [functional] First check of Destructive annotations: pass
- [functional] First check of Schema quality: fail
- [functional] First check of Schema quality: good

### 2026-10-12 (score 49)

First indexed and scored.

## MCP tools (5)

### `bloat_check` (~167 tokens)

Diagnose PostgreSQL bloat from a collected timeline.

Read-only: only reads the local SQLite timeline file, never touches Postgres.
Args:
    db: Path to the SQLite timeline file (default: BLOAT_DB env, 'timeline.db').
        Collect one first with bloat_collect, or pass any timeline.db path.
Returns:
    findings: list of {table, verdict, evidence, action} — verdict is one of
    normal | vacuum-starved | blocked-by-idle-xact | blocked-by-slot |
    blocked-by-prepared | blocked-by-active-xact | needs-rewrite |
    index-bloated | index-unused. Evidence carries dead/live counts,
    pgstattuple approx %, pgstatindex %, blocker pid+query.

Input parameters:

- `db` (string)

### `bloat_collect` (~130 tokens)

Take a read-only Postgres snapshot into the timeline, then return fresh verdicts.

Safe on prod: read-only transaction, 5s statement timeout, needs only
pg_stat_* views + optional pgstattuple extension. No writes, no agents.
Args:
    dsn: Postgres DSN, e.g. 'dbname=app user=readonly host=db.internal'.
        Default: BLOAT_DSN env. Never logs the password.
Returns:
    {snapshot: 'saved', db: path, findings: [...with action per table/index]}.

Input parameters:

- `dsn` (string)

### `bloat_timeline` (~151 tokens)

Dead-tuple + approx + index-bloat time series: when the bloat started.

Read-only on the local timeline file.
Args:
    table: Table name to filter (e.g. 'churn'). Empty = all tables.
    db: Path to the SQLite timeline file (default: BLOAT_DB env).
Returns:
    {table: {dead: [{ts, live, dead}], approx_pct: [{ts, dead_pct}]},
     index_bloat: {index: [{ts, bloat_pct}]}}. Rising dead = vacuum-starved;
     spike-then-zero = was blocked, blocker left.

Input parameters:

- `db` (string)
- `table` (string)

### `bloat_blockers` (~133 tokens)

Who is pinning VACUUM: blocker pid + query + xmin age + slot.

Read-only on the local timeline file. Priority: prepared-xact > stale-slot
\> idle-in-transaction. Fix: end the named session, then VACUUM the table.
Args:
    db: Path to the SQLite timeline file (default: BLOAT_DB env).
Returns:
    {blockers: [{ts, kind, pid, age, query, slot}] — newest first, max 20.
     Use pid with SELECT pg_terminate_backend(pid) after verification.

Input parameters:

- `db` (string)

### `bloat_live_diagnose` (~124 tokens)

One-shot live diagnosis without touching your timeline file.

Snapshots into a throwaway temp DB, diagnoses, discards it. Read-only on
Postgres (read-only tx, 5s timeout). Safest option for prod DSNs.
Args:
    dsn: Postgres DSN (default: BLOAT_DSN env). Password never logged.
Returns:
    {findings: [...with action], blockers: [...]} — same verdict set as
    bloat_check, plus the current xmin-holder evidence.

Input parameters:

- `dsn` (string)

## Diagnostics

Captured diagnostic sections: Provenance, Install scripts, Dependencies. The full working is on the page: https://verifymcp.io/servers/r69shabh-pg-bloat-detective/pg-bloat-detective#diagnostics

## Score history

- 2026-10-17: 77
- 2026-10-16: 77
- 2026-10-15: 77
- 2026-10-14: 77
- 2026-10-13: 49
- 2026-10-12: 49

## Common questions

### What is the PG Bloat Detective MCP server?

PG Bloat Detective is an MCP server listed in the public MCP registry as io.github.r69shabh/pg-bloat-detective. Read-only Postgres bloat verdicts: blockers, timelines, REINDEX proof. This page covers its PyPI package (pg-bloat-detective).

### Is the PG Bloat Detective MCP server safe to use?

PG Bloat Detective scores 77 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 17 October 2026. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the PG Bloat Detective MCP server expose?

PG Bloat Detective exposes 5 tools: bloat_check, bloat_collect, bloat_timeline, bloat_blockers, bloat_live_diagnose. Their descriptions and schemas cost roughly 705 tokens of context every time the server is loaded.

### Is the PG Bloat Detective MCP server still maintained?

PG Bloat Detective is still listed as active in the MCP registry. We last reached this channel on 17 October 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the PG Bloat Detective MCP server under?

PG Bloat Detective declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

## Links

- PyPI project: https://pypi.org/project/pg-bloat-detective/
- Socket report: https://socket.dev/pypi/package/pg-bloat-detective
- Repository: https://github.com/r69shabh/pg-bloat-detective
- Changelog RSS feed: https://verifymcp.io/servers/r69shabh-pg-bloat-detective/pg-bloat-detective.xml
- Changelog JSON feed: https://verifymcp.io/servers/r69shabh-pg-bloat-detective/pg-bloat-detective.json
- HTML version of this page: https://verifymcp.io/servers/r69shabh-pg-bloat-detective/pg-bloat-detective
