MCP Queue Doctor logo

MCP Queue Doctor

Diagnoses pg-boss and graphile-worker queues for retry storms, stuck jobs, missed schedules, and expiry problems.

Install MCP Queue Doctor

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-queue-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-queue-doctor"
      ],
      "env": {
        "QUEUE_DOCTOR_DATABASE_URL": "YOUR_VALUE_HERE",
        "QUEUE_DOCTOR_BACKEND": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env QUEUE_DOCTOR_DATABASE_URL=YOUR_VALUE_HERE --env QUEUE_DOCTOR_BACKEND=YOUR_VALUE_HERE --transport stdio mcp-queue-doctor -- npx -y mcp-queue-doctor

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y mcp-queue-doctor

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The mcp-queue-doctor MCP server inspects PostgreSQL job queues managed by pg-boss or graphile-worker. It runs diagnostic rules and exposes queue counts, failed and stuck jobs, schedule state, job records, and backend capability details over stdio. Findings include evidence, rankings, and recovery steps rather than only raw counts. Reach for it when you need to investigate repeated failures, inactive workers, missed cron activity, or queue configuration issues.

Use cases

  • Diagnose repeated queue failures and retry storms
  • Find workers with stale heartbeats or long-running jobs
  • Check cron queues for missed firings
  • Inspect queue retention, expiry, and retry settings
  • Compare supported diagnostics across pg-boss and graphile-worker

Key features

  • Ranked findings with evidence and recovery steps
  • pg-boss and graphile-worker backend detection
  • Failed, stuck, and missed-schedule analysis
  • Per-queue state and configuration inspection
  • Capability-aware diagnostics for partial backends
  • Direct PostgreSQL connectivity over stdio

Tools8

What MCP Queue Doctor lets your agent do. Expand a tool for its parameters.

Self-reported~179 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

18/18 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · mcp-queue-doctor (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads288Package downloads in the last 30 days.
Last commit4mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed8Callable tools this server registers over MCP.

How MCP Queue Doctor works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Queue Doctor

mcp-queue-doctor is an MCP server that connects to PostgreSQL job queues managed by pg-boss or graphile-worker. Its main tools diagnose queue health, inspect failed and stuck jobs, check missed schedules, view queue and job details, and report backend capabilities. It returns evidence and recovery guidance through the MCP interface.

Install it globally with `npm install -g mcp-queue-doctor`, then configure an MCP client to launch the command and set `QUEUE_DOCTOR_DATABASE_URL`. The server uses stdio, so the client starts it as a subprocess.

Yes, mcp-queue-doctor supports graphile-worker 0.17 with reduced capabilities. Set `QUEUE_DOCTOR_BACKEND=graphile`; analyses that require per-job expiry, worker heartbeats, successful-job retention, or database cron history remain unavailable.

Run the MCP client on a machine that can reach the database, or use an SSH tunnel and point `QUEUE_DOCTOR_DATABASE_URL` at the local tunnel endpoint. Remote sandboxes cannot reach a database restricted to another machine's loopback interface.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Queue Doctor AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-queue-doctor?style=directory)](https://allmcps.com/mcp/mcp-queue-doctor)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-queue-doctor"><img src="https://allmcps.com/api/badge/mcp-queue-doctor?style=directory" alt="MCP Queue Doctor on AllMCPs" /></a>