Skip to main content
Glama
BullMQ Failed Job Inspector

BullMQ Failed Job Inspector

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.

Related MCP server: Sentinal MCP

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/.

Available Tools

1 tool
list_failed_jobsB
Read-only

List the configured BullMQ queue's retained failed jobs, newest first.

Inputs: limit, offset. Returns: jobs, limit, offset, queue_name, +1 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 1 tool

    Disambiguation5/5

    With a single tool there is no possibility of confusion between tools; its purpose (listing retained failed jobs) is unambiguous.

    Naming Consistency5/5

    The lone name follows a clear verb_noun snake_case convention (list_failed_jobs), so consistency within the set is trivially satisfied.

    Tool Count3/5

    A one-tool surface is thin even for a narrow inspector; an 'inspect' domain reasonably implies at least listing plus detail/retry/remove operations.

    Completeness2/5

    Only a list operation exists: no way to fetch a single failed job's payload/stacktrace, retry it, or remove it, which leaves agents at a dead end after listing.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to manage BullMQ Redis-based job queues through natural language, supporting operations like job monitoring, queue control, and multi-instance Redis connections. Users can add, retry, promote, and clean jobs while accessing detailed job logs and queue statistics directly within the assistant.
      20
      499 npm
      7
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      FastMCP server with read-only tools to monitor Redis — queue depths, Celery queue status, connected clients, server/memory info, and per-database key counts
      5
      3
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      An MCP server that lets an agent inspect and operate Redis-backed job queues, supporting Asynq and BullMQ backends with per-state counts, job details, and state transitions.
      6
      22 npm
      MIT