Skip to main content

BullMQ Failed Job Inspector

Inspect retained BullMQ failures through a read-only MCP tool. The server runs locally and needs Python 3.12 or later, uv, and access to your Redis instance.

Run from this repository

From the repository root, configure your Redis URL and BullMQ queue in a local .env file.

cp .env.example .env
uv sync --locked

For an MCP client that starts the server over stdio, set its command to uv and its arguments to ["--directory", "/absolute/path/to/dlq-recovery-mcp", "run", "--locked", "dlq-recovery-mcp", "--transport", "stdio"]. Use the absolute path to your clone.

Set up an MCP client over stdio from PyPI

Once the package is published to PyPI, add this entry to an MCP client that accepts an mcpServers configuration. Replace the Redis URL and queue name with your own values.

{
  "mcpServers": {
    "bullmq": {
      "command": "uvx",
      "args": ["dlq-recovery-mcp", "--transport", "stdio"],
      "env": {
        "DLQ_REDIS_URL": "redis://127.0.0.1:6379/0",
        "DLQ_BULLMQ_QUEUE": "payments"
      }
    }
  }
}

Run a local Streamable HTTP server

uv run --locked dlq-recovery-mcp --transport streamable-http

Point your MCP client or MCP Inspector at http://127.0.0.1:8080/mcp using Streamable HTTP. After the PyPI release, you can also run uvx dlq-recovery-mcp --transport streamable-http with the Redis and queue settings supplied through your environment.

List failed jobs

Call list_failed_jobs with {} for the latest 20 retained failures, or use limit and offset to select a page. Use the returned next_offset to request the next page. A null value means there is no next page. Queue changes between calls can shift offset-based pages.

If the queue uses a custom prefix, set DLQ_BULLMQ_PREFIX. The default is bull.

The tool reads the configured BullMQ queue's Redis failed index and job metadata. It returns the job ID, name, failure reason, attempts made, and Unix timestamps in milliseconds. Payloads and stack traces are excluded. Only failures still retained in the configured queue's failed state are visible.

Redis read behavior

The server shares one async Redis client with a pool of up to 16 connections and closes it at shutdown. Configure the Redis URL and queue before startup. Each failed-job listing has a five-second deadline, with up to two retries for transient connection errors or timeouts. Retries use short randomized backoff. Redis access failures return a tool error. Successful reads may return an empty page.

Redis credentials and queue access

For authenticated Redis, set these variables on the MCP server.

Variable Value
DLQ_REDIS_URL Redis address and database, for example redis://127.0.0.1:6379/0
DLQ_REDIS_USERNAME Redis ACL username. Omit for password-only authentication.
DLQ_REDIS_PASSWORD Redis password in its original form.

Supply the password through your environment or secret manager. Redis URL credentials in the form redis://USERNAME:PERCENT_ENCODED_PASSWORD@HOST:PORT/0 also work. Choose one credential format per server. For local Redis without authentication, omit the credential variables. Use your MCP client's local environment or secret settings when supplying credentials.

On Redis 7 or newer, a Redis administrator can create a new read-only account for the payments queue under the default bull prefix. For example, pass these arguments to an authenticated administrative redis-cli invocation. Supply the password rule from your secret manager.

redis-cli ACL SETUSER dlq-inspector on "$DLQ_REDIS_ACL_PASSWORD_RULE" \
  '%R~bull:payments:*' +zrevrange +hmget

The password rule begins with > followed by the account password. Match the read pattern to the configured queue and prefix. Add +select if the client must select a nondefault Redis database.

Build the package

Run uv build from the repository root to produce a wheel and source distribution in dist/.

Metadata

Release files for dlq-recovery-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dlq-recovery-mcp 0.1.0
File Size Uploaded Provenance Actions
dlq_recovery_mcp-0.1.0.tar.gz 5.8 kB With provenance Details for dlq_recovery_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dlq-recovery-mcp 0.1.0
File Interpreter ABI Platform Actions
dlq_recovery_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for dlq_recovery_mcp-0.1.0-py3-none-any.whl

Total release size: 12.4 kB

Release files / dlq_recovery_mcp-0.1.0.tar.gz

Download URL dlq_recovery_mcp-0.1.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6fcd3c7eac15aac0334d3fb216451d600c359a5bb2fd455619cd868d4a6ccb18
BLAKE2b-256 checksum
How to use checksums
ccd3c35698b3c9984fa24d8f043c0060f61cb729101a874cc172d8f431da18de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / dlq_recovery_mcp-0.1.0-py3-none-any.whl

Download URL dlq_recovery_mcp-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
982510e98c2b1645c6aee01888bcc4441bbc8a6caa9d4dbe28f18b0b5a7301ed
BLAKE2b-256 checksum
How to use checksums
d162751dc470ee48c74f0d56e7dc2b8130ad61deab177c10eca7859eb08be180
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Security for dlq-recovery-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dlq_recovery_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page