rabbit-mcp
Provides tools for interacting with RabbitMQ using typed message contracts: publishing events, sending requests and receiving replies, inspecting queues and messages, finding messages, reading streams, recovering messages from error/dead-letter queues, parking poison messages, resending corrected messages, and answering service requests in responder mode. Supports MassTransit wire format and plain JSON, with management API access for queue and consumer visibility.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rabbit-mcppeek the orders_error queue and tell me why the messages failed"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
rabbit-mcp
English · ქართული
An MCP server for RabbitMQ built on message contracts (.NET 10). Each contract becomes a typed tool whose input schema is the contract itself. Messages use the MassTransit wire format, so MassTransit services receive them as they are; services without MassTransit get plain JSON. The server itself does not depend on MassTransit.
Send:
publish_<contract>andrequest_<contract>, validated against the contract first.See: queues, messages (with fault details) and who consumes each contract.
Recover: move messages from
_errorqueues back, fix and resend them, or park poison messages. Nothing is ever deleted.Answer: in responder mode the model answers requests sent by your services.
Protect:
contracts diffcatches wire-breaking changes in CI; roles, rate limits and audit for teams.
Install
Way | How |
Binary | Releases: self-contained for Linux, Windows and macOS. macOS: |
.NET tool |
|
Docker |
|
Source |
|
claude mcp add rabbit-mcp \
-e RabbitMcp__Uri=amqp://guest:guest@localhost:5672/ \
-e RabbitMcp__EnablePublish=true \
-- /full/path/to/rabbit-mcpClaude Desktop: the same as "command" and "env" in claude_desktop_config.json. Local RabbitMQ: docker compose up -d.
Try it: samples/Shop starts RabbitMQ, PostgreSQL, a MassTransit shop and rabbit-mcp with one command, and walks through orders, error recovery and approvals.
Related MCP server: foral
Tools
Tool | What it does | Enabled by |
| Contracts and their details; check JSON without sending | always |
| Queue counts; messages without removing them (payload, contract check, fault, | always |
| Finds a message by id or text and tells which queue it is in | always |
| Reads a RabbitMQ stream from | always |
| Queues; which queues a contract reaches and who consumes it |
|
| Audit: "who republished yesterday?" |
|
| Publishes an event / sends a request and returns the reply |
|
| Moves messages back from an error or dead-letter queue: preview, then |
|
| Parks messages that can never succeed in |
|
| Sends a fixed copy of a failed message and parks the original |
|
| Requests from services waiting for an answer |
|
Results are structured (outputSchema); errors say what to do next. Prompts diagnose_errors, investigate_message, review_approvals and contract_health walk through common tasks, and every contract is a resource contract://<Name>.
Contracts
// Event → publish_payment_captured
[MessageContract("Payment was captured by the PSP.", Version = 1)]
public sealed record PaymentCaptured
{
[Description("Order the payment belongs to.")]
public required Guid OrderId { get; init; }
[Range(typeof(decimal), "0.01", "1000000")]
public required decimal Amount { get; init; }
}
// Request → request_get_order_status
[MessageContract("Asks for the current status of an order.",
Responses = new[] { typeof(OrderStatus), typeof(OrderNotFound) })]
public sealed record GetOrderStatus
{
public required Guid OrderId { get; init; }
}required, nullability,[Description]and DataAnnotations go into the schema and are enforced.Names follow MassTransit (
urn:message:Namespace:Type, exchangeNamespace:Type);UrnandExchangeoverride them.Your contracts: a class library referencing the
RabbitMcp.Contractspackage, loaded withRabbitMcp__ContractAssemblies=/path/Billing.Contracts.dll.
Services without MassTransit — Format = MessageFormat.Raw: the body is plain JSON, metadata goes into AMQP properties, and you set Exchange and/or RoutingKey. Requests use RabbitMQ RPC (reply_to + correlation_id; the reply type in the AMQP type).
[MessageContract("Asks the shipping desk for a quote.", Format = MessageFormat.Raw, RoutingKey = "shipping-quotes",
Responses = new[] { typeof(ShippingQuote), typeof(ShippingUnavailable) })]
public sealed record GetShippingQuote { … }Without C# (AsyncAPI) — RabbitMcp__ContractFiles=warehouse.yaml: every message of an AsyncAPI 3.0 or 2.x file becomes a tool with the file's JSON Schema; routing comes from the AMQP bindings, x-rabbit-mcp: { format: masstransit } for MassTransit services. Example: samples/asyncapi/warehouse.yaml. rabbit-mcp contracts asyncapi Billing.Contracts.dll exports C# contracts.
Compatibility check — compare two builds (or two AsyncAPI files) in CI; exit code 1 on breaking changes:
rabbit-mcp contracts diff old/Billing.Contracts.dll new/Billing.Contracts.dll
# BREAKING OrderPlaced customer: Type changed from string to number.
# WARNING OrderPlaced: Breaking change without a version bump (still v1).Request/response
request_<contract> waits for the reply (timeout 1–120 s) and returns responded, faulted or timeout, with the reply checked against its contract.
Responder: RabbitMcp__RespondTo=ApproveLargeOrder lets your service ask and the model answer. Requests appear in pending_requests; the model answers with reply_<response> or reject_request (the requester gets a RequestFaultException). Requests are kept in memory; one instance per ClientName answers, others stand by.
For teams (HTTP)
RabbitMcp__Transport=http serves /mcp (and /healthz). It refuses to start without authentication:
API keys:
RabbitMcp__ApiKeys="alice:KEY1;ci:KEY2"(≥ 32 characters); clients sendX-Api-Key.JWT / OIDC:
RabbitMcp__JwtAuthority+RabbitMcp__JwtAudience.
docker run -d -p 5080:5080 \
-e RabbitMcp__Uri=amqp://user:pass@rabbit:5672/ \
-e RabbitMcp__ApiKeys="team:$(openssl rand -base64 32)" \
-e RabbitMcp__ContractAssemblies=/contracts/Billing.Contracts.dll -v ./contracts:/contracts:ro \
ghcr.io/lazogio/rabbit-mcp:1.0Roles (HTTP only; without roles every caller may use every enabled tool):
RabbitMcp__Roles__viewer="read"
RabbitMcp__Roles__operator="read;publish:Order*;request;republish:*_error"
RabbitMcp__UserRoles="alice=operator;ci=viewer"
RabbitMcp__DefaultRoles="viewer"Permissions: read, publish, request, republish, respond, *; patterns limit them by contract or queue. Users are matched by API key name, token user or the JWT roles claim. Callers see only the tools they may use, and each call is checked again.
Configuration
Environment variable RabbitMcp__<Option> or appsettings.json. Lists are ;-separated, * is a wildcard.
Option | Default | Description |
|
| AMQP URI, vhost at the end |
| — | Contract DLLs / AsyncAPI files. Empty: built-in samples |
| — | Management API, e.g. |
|
| Allow sending / moving messages |
| — | Contracts that may / may never be sent |
|
| Where poison messages are parked |
| — / | Responder contracts / waiting-request limit |
|
| The person confirms changes in the client's dialog ( |
| — / | Audit file (JSON Lines) / include message bodies |
|
| Limits |
| — | Changes per caller, e.g. |
|
| Transport |
| — | HTTP authentication |
| — | Roles |
| Rarely needed |
OpenTelemetry: set OTEL_EXPORTER_OTLP_ENDPOINT; traces join the MassTransit consumer's trace.
Guarantees
No silent loss: invalid messages are not sent; publisher confirms and
mandatoryturn an undeliverable message into an error.Safe moves: a message leaves the error queue only after the broker confirmed its new copy; the body never changes.
Nothing is deleted: poison messages are parked with every header, and can be brought back.
A person confirms: clients with MCP elicitation (e.g. Claude Code) show a dialog before anything moves; stateless HTTP falls back to
confirm=true.Audited: every send, move and answer — including refused ones — with the user.
Untrusted content: message headers never redirect where messages go; passwords never appear in logs or errors.
License
MIT. Development, tests and releases: CONTRIBUTING.md.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
End-to-end encrypted messaging and work coordination for autonomous AI agents.
Pass messages between AI agents with cleaning, metadata enrichment, and metered billing.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover and execute tools via a secure MCP server with JWT authentication, RBAC, rate limiting, and audit logging.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access internal systems without public APIs as typed, governed MCP tools, with human-approved writes and fail-closed contract updates.Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants and MCP-enabled clients to discover and call application capabilities exposed as structured, schema-defined tools, with input validation, error handling, and API/database integration. It also ships a sample client that demonstrates secure tool execution and seamless AI-agent interoperability.-
- AlicenseNot gradedqualityAmaintenanceTurns existing REST/OpenAPI APIs into governed MCP tools for AI agents without modifying the APIs themselves, generating agent-friendly tools from specs, Postman collections, HAR files or cURL commands. Owners enable tools and set policies, while every call injects upstream credentials, redacts PII, projects responses to fit context limits, and produces a full audit trail.13 npm4Apache 2.0