# mcp-queue-doctor [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/ethanasm/mcp-queue-doctor  
**GitHub Stars:** 0  
**npm Downloads (last month):** 288  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-queue-doctor

## Description
Diagnoses pg-boss and graphile-worker job queues: retry storms, stuck workers, missed schedules.

## Tools
Capabilities this server exposes over MCP:

- **diagnose** — Start here.** Runs the whole rule catalog, returns ranked findings with evidence and recovery steps
- **queue_overview** — Per-queue counts by state, stuck jobs, and each queue's expiry/retention/retry config
- **failed_jobs** — Failures in a window with error messages, plus a per-queue error-frequency breakdown
- **stuck_jobs** — Jobs active past a threshold, with age, expiry, and heartbeat staleness
- **missed_schedules** — Cron queues whose latest firing is older than their expression implies
- **schedule_status** — Every registered schedule with cron, timezone, last firing, and next expected
- **job_detail** — One job's full record: state, timings, retries, payload, output
- **server_info** — Connectivity, detected schema, matched dialect, and reduced capabilities

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-queue-doctor": {
    "command": "npx",
    "args": ["-y","mcp-queue-doctor"],
    "env": {
      "QUEUE_DOCTOR_DATABASE_URL": "",
      "QUEUE_DOCTOR_BACKEND": ""
    }
  }
}
```

**Requires environment variables:** `QUEUE_DOCTOR_DATABASE_URL`, `QUEUE_DOCTOR_BACKEND` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-queue-doctor does

The mcp-queue-doctor MCP server connects directly to PostgreSQL and examines job-queue data from pg-boss or graphile-worker. Its main diagnostic entry point, `diagnose`, runs the available rule catalog and returns ranked findings with supporting evidence and suggested recovery steps.

The rules cover retry storms, jobs that remain active too long, missed schedules, duplicate registrations, expiry overruns, retention-window mismatches, and inactive queues. Failure analysis also classifies errors such as rate limits, transient transport failures, authentication problems, and missing resources. This classification affects the recovery guidance; for example, repeatedly retrying rate-limited work may worsen the incident.

## How it works

The process runs as a local stdio MCP server launched by the client. It reads the database connection from its environment and queries PostgreSQL directly; there is no hosted intermediary. The client machine therefore needs network access to the target database. An SSH tunnel can provide that access when the database is reachable only from another host.

Schedule expectations are normally derived from pg-boss's database schedule table by parsing cron expressions, so a separate expected-job list is not required for the common pg-boss case. Each finding includes the observations used to produce it, allowing an operator or agent to inspect the reasoning.

Backend capability declarations prevent unsupported measurements from appearing as zeros. For example, graphile-worker does not retain successful jobs, does not provide per-job expiry or worker heartbeats, and stores cron expressions outside the database. Rules depending on those fields remain unavailable rather than reporting misleading results.

## Setup and configuration

Install the package globally with npm, then configure an MCP client to launch `mcp-queue-doctor` and provide `QUEUE_DOCTOR_DATABASE_URL`. A read-only PostgreSQL account is suitable for the connection example in the supplied configuration. The backend defaults to pg-boss; set `QUEUE_DOCTOR_BACKEND=graphile` when inspecting graphile-worker. The supported pg-boss versions are v11 and later; v10 and earlier are recognized but refused.

Claude Desktop uses its MCP configuration file and may require an absolute executable path because its subprocess environment has a limited `PATH`. Claude Code can register the server with `claude mcp add`, or a project-scoped `.mcp.json` can be checked in. Headless project sessions need project MCP servers explicitly enabled. Keep connection strings out of committed configuration and provide them through environment expansion.

## Tools and capabilities

- `diagnose`: Runs the rule catalog and returns ranked findings, evidence, and recovery steps.
- `queue_overview`: Reports per-queue state counts, stuck jobs, and expiry, retention, and retry settings.
- `failed_jobs`: Lists failures in a time window and summarizes error frequency by queue.
- `stuck_jobs`: Finds active jobs beyond a threshold and reports age, expiry, and heartbeat staleness.
- `missed_schedules`: Identifies cron queues whose latest firing is older than expected.
- `schedule_status`: Shows registered schedules, cron expressions, time zones, and firing times.
- `job_detail`: Retrieves a job's state, timings, retries, payload, and output.
- `server_info`: Reports connectivity, detected schema, backend match, and reduced capabilities.

The mcp-queue-doctor MCP server has full support for pg-boss v11 and later, and partial capability-declared support for graphile-worker 0.17.

## Limitations and notes

Graphile-worker support is intentionally partial because its data model lacks several pg-boss fields. Its stuck-job analysis uses age rather than heartbeats, and schedule-related rules that require database cron history are unavailable. Cloud or sandboxed clients can diagnose only databases reachable from the environment where the server runs; a production database bound to a developer's local loopback address is not reachable from a remote sandbox.

_Full upstream README: https://allmcps.com/mcp/mcp-queue-doctor/readme_

