DLQ Recovery Inspector
Inspect failed jobs and dead-letter queues from an MCP client. The server lists retained BullMQ and Sidekiq failures, reports RabbitMQ and Amazon SQS dead-letter queue counts, and reads Kafka Connect dead-letter record metadata. It runs locally and exposes read-only tools.
Quickstart from PyPI
- Install
uvand confirm that Redis is reachable from the machine running your MCP client. - Add the entry below to your client's MCP configuration. Use your Redis URL and BullMQ queue name.
- Reload the client and ask it to show the latest failed jobs.
On first use, the client runs uvx to download the published package from PyPI and start the server over stdio. Stdio is the default in the current source. The package page lists published versions.
BullMQ client configuration
{
"mcpServers": {
"bullmq": {
"command": "uvx",
"args": ["dlq-recovery-mcp", "--transport", "stdio"],
"env": {
"DLQ_PROVIDER": "bullmq",
"DLQ_REDIS_URL": "redis://127.0.0.1:6379/0",
"DLQ_BULLMQ_QUEUE": "payments"
}
}
}
}
Upgrading from 0.1.x
Set DLQ_PROVIDER=bullmq in existing BullMQ configurations before using
0.2.0. Stdio is the default in 0.2.0. If you start an HTTP server separately,
include --transport streamable-http in its launch command.
Run from source
Clone the repository to develop the server or try the queue adapters in the current checkout.
git clone https://github.com/nsunny2772/dlq-recovery-mcp.git
cd dlq-recovery-mcp
cp -n .env.example .env
uv sync --locked
Set DLQ_PROVIDER and the connection variables for your provider before startup.
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.
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. You can also run uvx dlq-recovery-mcp --transport streamable-http with the Redis and queue settings supplied through your environment.
List failed jobs
Try asking your MCP client: “Show me the latest failed jobs and summarize their failure reasons.”
Call list_failed_jobs with {} to start with up to 20 failures, newest first. Set limit to 1–100 to change the page size. Pass the response's next_offset as offset for the next page, and stop when it is null. Continue if the page is empty and next_offset is present. A job can disappear between reading the failed index and loading its metadata. 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.
Run the tests
uv run --locked --extra sqs --extra kafka python -m unittest discover -s tests -v
Set DLQ_TEST_REDIS_URL to a dedicated test Redis instance to include the
live BullMQ and Sidekiq pagination tests. The suite uses isolated keys and
removes them after each test. Kafka tests use the client library's broker
simulator. RabbitMQ and SQS tests use an HTTP fixture and SDK stub.
Build the package
Run uv build from the repository root to produce a wheel and source distribution in dist/.
Other queue backends
Set DLQ_PROVIDER in the server environment to select one backend per process.
Use bullmq for the BullMQ setup above. Names are case-insensitive.
bullm is an alias for bullmq, and kafka is an alias for kafka-connect. Start with
dlq-recovery-mcp --transport stdio or use the existing HTTP transport.
| Backend | Configuration | MCP tool |
|---|---|---|
sidekiq |
DLQ_REDIS_URL, DLQ_SIDEKIQ_QUEUE, optional DLQ_SIDEKIQ_DEAD_KEY (defaults to dead) |
list_failed_jobs |
rabbitmq |
DLQ_RABBITMQ_API_URL (management base URL), DLQ_RABBITMQ_QUEUE (DLQ name), DLQ_RABBITMQ_USERNAME, DLQ_RABBITMQ_PASSWORD, optional DLQ_RABBITMQ_VHOST (defaults to /) |
get_dlq_stats |
sqs |
DLQ_SQS_QUEUE_URL, AWS region and credentials through the standard AWS SDK configuration |
get_dlq_stats |
kafka-connect |
DLQ_KAFKA_BOOTSTRAP_SERVERS, DLQ_KAFKA_TOPIC (DLQ topic), optional DLQ_KAFKA_CONFIG (JSON object for client settings such as TLS and SASL) |
list_dlq_records |
MCP client configuration for RabbitMQ, SQS, and Kafka Connect
Use the entries below to run the adapters from your local checkout. Copy the
entries you need into your client's mcpServers object. Replace the checkout
path, endpoint, and queue or topic name. Each entry starts its own MCP process.
The --extra flags install the optional SQS and Kafka dependencies.
{
"mcpServers": {
"rabbitmq-dlq": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/dlq-recovery-mcp", "run", "--locked", "dlq-recovery-mcp", "--transport", "stdio"],
"env": {
"DLQ_PROVIDER": "rabbitmq",
"DLQ_RABBITMQ_API_URL": "http://127.0.0.1:15672",
"DLQ_RABBITMQ_VHOST": "/",
"DLQ_RABBITMQ_QUEUE": "payments-dlq",
"DLQ_RABBITMQ_USERNAME": "dlq-reader",
"DLQ_RABBITMQ_PASSWORD": "REPLACE_WITH_LOCAL_SECRET"
}
},
"sqs-dlq": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/dlq-recovery-mcp", "run", "--locked", "--extra", "sqs", "dlq-recovery-mcp", "--transport", "stdio"],
"env": {
"DLQ_PROVIDER": "sqs",
"DLQ_SQS_QUEUE_URL": "https://sqs.ap-south-1.amazonaws.com/123456789012/payments-dlq",
"AWS_DEFAULT_REGION": "ap-south-1",
"AWS_PROFILE": "dlq-reader"
}
},
"kafka-connect-dlq": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/dlq-recovery-mcp", "run", "--locked", "--extra", "kafka", "dlq-recovery-mcp", "--transport", "stdio"],
"env": {
"DLQ_PROVIDER": "kafka-connect",
"DLQ_KAFKA_BOOTSTRAP_SERVERS": "127.0.0.1:9092",
"DLQ_KAFKA_TOPIC": "payments-dlq"
}
}
}
}
Use your MCP client's local secret settings for the RabbitMQ password. For SQS,
use an existing local AWS profile with access to the queue, or omit
AWS_PROFILE to use the SDK's default credential chain. The Kafka example
targets a local plaintext listener. For a secured cluster, supply
DLQ_KAFKA_CONFIG as a JSON string with your cluster's TLS and SASL settings.
- Sidekiq reads the global Dead set newest first and filters each page to the configured queue. Continue using
next_offseteven when a page is empty.failed_at_msis the Dead-set insertion time, andfailed_reasoncontains the exception class when available. - RabbitMQ and SQS return queue counts without receiving, acknowledging, or requeuing messages. Enable the RabbitMQ management plugin and queue statistics. The SQS principal needs
sqs:GetQueueAttributes. SQS counts are approximate. - Kafka Connect takes a partition, an optional Kafka offset, and a limit. Omit the offset to start at the earliest retained record. Resume using
next_offset, which can equal the requested offset when a poll times out. A null offset ends the scan. The tool returns metadata and supported error context headers when available. It excludes keys and payloads from the response and leaves consumer offsets uncommitted.
Metadata
Release files for dlq-recovery-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dlq_recovery_mcp-0.2.0.tar.gz | 19.9 kB | With provenance | Details for dlq_recovery_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dlq_recovery_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for dlq_recovery_mcp-0.2.0-py3-none-any.whl |
Total release size: 36.4 kB
Release files / dlq_recovery_mcp-0.2.0.tar.gz
| Download URL | dlq_recovery_mcp-0.2.0.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83cd9fb774b943b4a437aaa12b9fa082b7ef8bbb42aa419fe97ac1e84477cebf
|
|
BLAKE2b-256 checksum How to use checksums |
9b808bf61ad9e67582d99b881e27072acfdb0ce5448b3e2bbda970b057745546
|
| 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 4, 2026.
Transparency logRelease files / dlq_recovery_mcp-0.2.0-py3-none-any.whl
| Download URL | dlq_recovery_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d3f0eb7e527398f59e719b77cab0790fd029bec84b482b2797cfcaa86660ed4
|
|
BLAKE2b-256 checksum How to use checksums |
a84394a6a976262e4803e2a49386f0327eb8aa8d8dbeecae4561455358821053
|
| 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 4, 2026.
Transparency logSecurity for dlq-recovery-mcp 0.2.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.
Attestation for dlq_recovery_mcp-0.2.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 4, 2026.
Transparency logA 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.