RabbitMQ MCP Server
Provides tools to manage RabbitMQ message brokers, including operations on queues, exchanges, bindings, and other administrative tasks via RabbitMQ's admin API.
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., "@RabbitMQ MCP Server List all queues on the default vhost"
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.
mcp-server-rabbitmq
A Model Context Protocol (MCP) server for RabbitMQ broker management and operations. It lets AI agents manage RabbitMQ brokers conversationally: multi-broker connections, blue-green migration, health checks, and full observability.
Package: amq-mcp-server-rabbitmq on PyPI · Stack: Python, MCP Python SDK (mcp.server.fastmcp), uv
Features
31 tools in v4 (enum-based dispatchers), or 61 tools in v3 (one tool per operation) for broker management - connections, queues, exchanges, health checks, observability, and blue-green migration
16 composable skills - topology visualization, dead letter analysis, capacity planning, and more
Multi-broker support - connect multiple brokers simultaneously, switch between them by alias
Startup connection from the environment - set
RABBITMQ_AMQP_ENDPOINTso the tools work without a connect call, for hosts that respawn the server per sessionMutative tools gated behind
--allow-mutative-toolsflag (off by default for safety)Tool groups - load only the tools you need with
--tool-groupsSecurity hardened - SSRF protection, credential stripping, TLS warnings, JWKS HTTPS enforcement
Related MCP server: rabbitmq-mcp
Versions
The server ships two tool layouts so you can choose your upgrade path:
Version | Layout | Upgrade impact | Choose it when |
v3 ( | 61 tools, one per operation (e.g. | Non-breaking - a drop-in upgrade from v2.x. | You have existing prompts/integrations bound to v2/v3 tool names and want zero churn. |
v4 ( | 31 enum-based dispatchers (e.g. | Breaking - tool names change (opt in with | You want ~60% fewer tool-description tokens per turn, faster startup, and per-group tool loading (see Why opt in to v4). |
Both are published from this repo. v4 defaults to v3 behavior unless you pass --v4, so installing the latest package never breaks an existing setup on its own. See v4 Mode for the full mapping and the CHANGELOG for the v3 → v4 tool-name table.
Quick Start
Install via PyPI
pip install amq-mcp-server-rabbitmq
# or
uv pip install amq-mcp-server-rabbitmqConfigure in Claude Desktop (v4 mode - recommended)
{
"mcpServers": {
"rabbitmq": {
"command": "uvx",
"args": [
"amq-mcp-server-rabbitmq@latest",
"--v4",
"--allow-mutative-tools"
]
}
}
}Configure in Claude Desktop (v3 mode - legacy, 61 tools)
{
"mcpServers": {
"rabbitmq": {
"command": "uvx",
"args": [
"amq-mcp-server-rabbitmq@latest",
"--allow-mutative-tools"
]
}
}
}Basic Usage
Once configured, the agent can connect to your broker and manage it conversationally:
You: Connect to my RabbitMQ broker at rabbitmq.example.com with user admin
You: List all queues and show me which ones have messages backing up
You: Create a dead letter exchange and bind it to the orders queuev4 Mode
v4 consolidates the 61 individual v3 tools into 31 enum-based dispatchers (29 consolidated groups plus the 2 standalone mutative tools below), reducing context window pressure while preserving full functionality. Each consolidated tool accepts an action parameter to select the operation.
Why opt in to v4
Fewer tokens. Every tool's name and description is sent to the model on every request, whether or not it's used. v4 roughly halves the tool count (61 → 31) and cuts that idle tool-description text by about 60% - from ~2,300 tokens to ~900 tokens (name + docstrings). That is context budget returned to the actual conversation on every single turn, and a smaller tool list also makes the model faster and more accurate at picking the right tool.
Faster startup. Fewer tools means less to register and advertise during the MCP handshake, so the server connects and the client finishes tool discovery sooner. With
--tool-groupsyou can trim further - e.g. load onlyread/healthfor a monitoring agent - registering just the tools that session needs.
Numbers above are measured against this repo's tool definitions; exact token counts vary by client and model tokenizer.
Key Differences from v3
Aspect | v3 | v4 |
Tool count | 61 | 31 (29 dispatchers + 2 standalone mutative) |
Naming |
|
|
Loading | All or nothing | Selectable via |
Compat | N/A |
|
Standalone Mutative Tools
Two tools remain standalone because they are high-impact operations that benefit from explicit invocation and additional confirmation:
close_connection- Close a specific connection by namerebalance_queues- Rebalance queue leaders across cluster nodes
These require the mutative tool group to be loaded.
Configuration
CLI Arguments
Argument | Description |
| Enable v4 consolidated tool mode (31 tools instead of 61) |
| Select which tool groups to load (space-separated). Options: core, read, mutative, migration, observability, health |
| Register v3 tool name aliases alongside v4 tools (for migration) |
| Enable tools that can create, modify, or delete resources (default: off) |
| RabbitMQ Management API port (default: 443 for TLS, 15672 for non-TLS) |
| Use Streamable HTTP transport instead of stdio |
| Port to run the MCP server on (default: 8888) |
| JWKS URI for JWKS bearer token verification |
| Expected token issuer ( |
| Expected token audience ( |
| Required token scopes to enforce |
Tool Groups (v4)
Group | Tools | Gate |
core | connect, connect_oauth, broker, get_skill, get_guideline | Always loaded |
read | queues, exchanges, connections, cluster, entities, overview, policies, shovels, auth | Always loaded |
mutative | manage_queue, manage_exchange, manage_binding, manage_policy, manage_vhost, publish, close_connection, rebalance_queues | Requires |
migration | definitions_export, definitions_import, definitions_compare, definitions_migrate, migration_readiness, federation_setup | Requires |
observability | find_queues | Always loaded |
health | health | Always loaded |
Environment Variables
Variable | Description |
| Log level: DEBUG, INFO, WARNING (default), ERROR |
| Connect at startup, e.g. |
| Management API endpoint, e.g. |
| Alias for the environment-configured broker (default: its hostname) |
Connecting at startup
Normally the agent calls the connect tool once per session. Some MCP hosts, particularly aggregators and proxies, start a fresh server process per session or per tool call, so that connection state does not survive and later calls fail with "No active broker". Setting an endpoint URI makes the server connect during startup instead, so the tools work on every spawn:
{
"mcpServers": {
"rabbitmq": {
"command": "uvx",
"args": ["amq-mcp-server-rabbitmq@latest", "--v4"],
"env": {
"RABBITMQ_AMQP_ENDPOINT": "amqps://admin:pass@broker.example.com:5671"
}
}
}
}Details:
The scheme selects TLS and the default port.
amqpsis TLS on 5671,amqpis plaintext on 5672,httpsis TLS on 443,httpis plaintext on 15672. An explicit:portoverrides the default.Either variable is enough. Give only
RABBITMQ_AMQP_ENDPOINTand the management endpoint is derived from it (same host and credentials, matching TLS), and vice versa. Set both when they differ, for example when the management API is on another host or uses separate credentials.--management-portstill applies as the derived management port whenRABBITMQ_MANAGEMENT_ENDPOINTis not set.Percent-encode reserved characters in credentials. A password of
p@ss/wordis writtenp%40ss%2Fword.Failures are non-fatal. An unreachable broker or malformed URI logs a warning and leaves the connect tool available, rather than killing the server.
Works in both v3 and v4 mode. Credentials are never written to logs or error messages. OAuth is not supported through these variables; use the OAuth connect tool.
Tools (v3 layout)
The following table shows the v3 tool names. In v4 mode, these are consolidated into 31 enum-based dispatchers (see the v4 Mode section above). Use --v1-compat to register these names alongside v4 tools.
Connection and Session (6 tools)
Tool | Description |
| Connect to a broker with username/password (SIMPLE auth) |
| Connect to a broker using an OAuth token |
| Switch the active broker by alias |
| List all registered broker connections and which is active |
| Get best-practice guidelines for RabbitMQ deployment and sizing |
| Get a composable workflow recipe (see Skills section below) |
Read-Only: Queues and Exchanges (7 tools)
Tool | Description |
| List all queues in the broker |
| List all exchanges in the broker |
| List all virtual hosts |
| Get detailed information about a specific queue |
| Get detailed information about a specific exchange |
| Get bindings, optionally filtered by queue or exchange |
| Peek at messages in a queue without consuming them |
Read-Only: Connections and Consumers (4 tools)
Tool | Description |
| List all connections on the broker |
| List all consumers on the broker |
| List all open channels on the broker |
| List all users on the broker |
Read-Only: Cluster and Nodes (2 tools)
Tool | Description |
| Get the list of nodes and their info in the cluster |
| Get detailed node info including memory, disk, uptime |
Read-Only: Policies and Shovels (4 tools)
Tool | Description |
| List all policies in a virtual host |
| Get a specific policy by name |
| List all shovels on the broker |
| Get detailed information about a specific shovel |
Read-Only: Permissions and Identity (2 tools)
Tool | Description |
| Get permissions for a user in a virtual host |
| Get the current authenticated user |
Read-Only: Definitions and Migration (3 tools)
Tool | Description |
| Get full broker definitions (exchanges, queues, bindings, users, etc.) |
| Compare definitions between two connected brokers |
| Pre-flight check for blue-green migration |
Read-Only: Observability (3 tools)
Tool | Description |
| Get cluster-wide stats: version, node count, message rates, object totals |
| Find queues by criteria: depth, idle time, no consumers, unacked messages |
| Get connection/channel open and close rates |
Health Checks (8 tools)
Tool | Description |
| Check if the broker is in alarm |
| Check if quorum queues have minimum online quorum |
| Check for local alarms on the active broker |
| Check if TLS certificates expire within a timeframe |
| Check if a protocol listener is active |
| Check health of all virtual hosts |
| List all feature flags and their status |
| List deprecated features currently in use |
Mutative: CRUD (16 tools)
Tool | Description |
| Create a queue (quorum, classic, or stream) |
| Delete a specific queue |
| Remove all messages from a queue |
| Create an exchange (direct, fanout, topic, headers) |
| Delete a specific exchange |
| Create a binding from an exchange to a queue |
| Delete a binding |
| Create or update a policy |
| Delete a policy |
| Create a virtual host |
| Delete a virtual host and all its resources |
| Set permissions for a user in a virtual host |
| Close a specific connection by name |
| Update server definitions |
| Export definitions with optional transformations |
| Import definitions to the active broker |
Mutative: Migration (4 tools)
Tool | Description |
| Export, transform, and import definitions between brokers |
| Set up federation upstream and policy for message draining |
| Rebalance queue leaders across cluster nodes |
| Publish a message via HTTP Management API (diagnostics) |
Mutative: AMQP (2 tools)
Tool | Description |
| Publish a message to a specific queue via AMQP |
| Publish a message to a fanout exchange via AMQP |
Skills
Skills are composable workflows accessed via rabbitmq_broker_get_skill. They guide the agent through multi-step operations by orchestrating existing tools - no additional code required.
Skill | What it does | Tools it composes |
| Check alarms on both brokers + compare definitions for go/no-go | is_in_alarm, compare_definitions |
| Export from source with transforms, import to target | export_definitions, import_definitions |
| Verify federation plugin, create upstream and policy | get_broker_overview, import_definitions |
| Interpret publish/deliver rates and backlog trends | get_queue_info |
| Calculate memory %, disk headroom, FD usage per node | get_node_information, get_cluster_nodes_info |
| Generate Mermaid diagram of exchange-binding-queue graph | list_exchanges, list_queues, get_bindings |
| Predict which queues receive a message given exchange + routing key | get_exchange_info, get_bindings |
| Find queues with no bindings and no consumers | list_queues, get_bindings, list_consumers |
| Find exchanges with no outbound bindings (excluding amq.*) | list_exchanges, get_bindings |
| Walk x-dead-letter-exchange arguments to map the full DLX chain | get_queue_info, get_bindings |
| Peek at DLQ messages and extract x-death headers (source, reason) | get_messages |
| Aggregate dead letters by source queue and rejection reason | list_queues, get_queue_info, get_messages |
| Compare live broker state against best-practice guidelines | get_broker_overview, get_cluster_nodes_info, list_queues, get_guideline |
| Assess queue type, consumers, depth, and policy coverage | get_queue_info, get_guideline |
| Compute resource utilization % vs watermarks, project time-to-alarm | get_cluster_nodes_info |
| Find overlapping policy patterns and report priority winners | list_policies |
Documentation
In-depth guides live in docs/:
Multi-Broker — register and switch between brokers by alias
Authentication — broker auth (SIMPLE/OAuth) and HTTP JWT/JWKS Bearer auth
Skills — the 16 composable workflow recipes
Migration — blue-green migration, definition transforms, federation draining
CHANGELOG — version history and the full v3 → v4 tool-name mapping
Development
Prerequisites
Python 3.10+
uv package manager
Running Locally
git clone https://github.com/amazon-mq/mcp-server-rabbitmq.git
cd mcp-server-rabbitmq
uv run amq-mcp-server-rabbitmqTesting
uv run pytestLinting
uv run ruff check . && uv run ruff format .Docker (Local RabbitMQ)
docker-compose upThis starts RabbitMQ 4 with the management plugin on localhost:5672 (AMQP) and localhost:15672 (Management UI). Default credentials: guest / guest.
Security
Mutative tools disabled by default - pass
--allow-mutative-toolsto opt inMutative action gating - high-impact operations (close_connection, rebalance_queues, set_permissions) require the mutative tool group to be loaded
TLS by default - connections use
use_tls=Trueand port 5671 unless overriddenTLS warnings - non-TLS connections emit a warning in the response so agents can inform users
SSRF protection - hostname validation blocks connections to private/reserved IP ranges and localhost
Credential stripping - definition exports automatically strip passwords and sensitive keys before returning to the agent
URL encoding - all user-supplied names (queues, exchanges, vhosts) are URL-encoded before API calls to prevent injection
JWKS HTTPS enforcement - the
--http-auth-jwks-uriflag rejects non-HTTPS URIs to prevent token validation bypassOAuth support - connect with access tokens instead of username/password
HTTP transport with JWKS auth - run as a remote server with Bearer token validation via configurable IdP
License
Apache-2.0 - see LICENSE for details.
Available Tools
39 toolsrabbitmq_broker_check_certificate_expirationB
Check if any TLS certificates expire within the given timeframe.
unit: days, weeks, or months
Inputs: unit, within.
rabbitmq_broker_check_local_alarmsA
Check for local alarms on the active broker.
Inputs: no named parameters.
rabbitmq_broker_check_migration_readinessB
Pre-flight check for blue-green migration. Verifies both brokers connected, no alarms, and topology match.
Inputs: source_alias (required), target_alias (required).
rabbitmq_broker_check_protocol_listenerC
Check if a protocol listener is active.
protocol: amqp091, amqp10, mqtt, stomp, web-mqtt, web-stomp, http, https
Inputs: protocol (required).
rabbitmq_broker_check_virtual_hostsA
Check health of all virtual hosts on the active broker.
Inputs: no named parameters.
rabbitmq_broker_compare_definitionsA
Compare definitions between two connected brokers. Returns missing/extra items per section (queues, exchanges, bindings, policies, vhosts).
Inputs: source_alias (required), target_alias (required).
rabbitmq_broker_find_queues_by_thresholdB
Find queues exceeding threshold criteria.
min_depth: minimum message count
min_idle_seconds: minimum seconds since last activity
no_consumers: only queues with zero consumers
min_unacked: minimum unacknowledged message count
Inputs: vhost, min_depth, min_unacked, no_consumers, +1 more. Returns: result
rabbitmq_broker_get_bindingsA
Get bindings, optionally filtered by queue or exchange. If neither is specified, returns all bindings in the vhost.
Inputs: queue, vhost, exchange. Returns: result
rabbitmq_broker_get_broker_definitionA
Get the RabbitMQ definitions: exchanges, queues, bindings, users, virtual hosts, permissions, topic permissions, and parameters. Everything apart from messages.
Inputs: no named parameters.
rabbitmq_broker_get_cluster_nodes_infoB
Get the list of nodes and their info in the cluster.
Inputs: no named parameters. Returns: result
rabbitmq_broker_get_connection_churnB
Connection and channel churn rates.
Inputs: no named parameters.
rabbitmq_broker_get_exchange_infoC
Get detailed information about a specific exchange.
Inputs: exchange (required), vhost.
rabbitmq_broker_get_guidelineA
Get the general best practices for deploying RabbitMQ on Amazon MQ.
- guideline_name: It can take the following value:
- rabbitmq_broker_sizing_guide: this guide tells the customer what instance size to pick for production workload
- rabbitmq_broker_setup_best_practices_guide: this guide tells the customer what are the best practices in setting up the RabbitMQ broker
- rabbitmq_quorum_queue_migration_guide: this guide tells the customer how to migrate from classic mirror queue to quorum queue
- rabbitmq_client_performance_optimization_guide: this guide tells the customer how to optimize their application to get performance gain of using RabbitMQ
- rabbitmq_production_deployment_guidelines: this guide covers production deployment requirements including hardware, storage, security, and networking
Inputs: guideline_name (required). Returns: result
rabbitmq_broker_get_messagesA
Peek at messages in a queue without consuming them. Messages are requeued by default.
ackmode: ack_requeue_true (peek, default), ack_requeue_false (consume)
Inputs: queue (required), count, vhost, ackmode. Returns: result
rabbitmq_broker_get_node_informationB
Get detailed information about a specific node in the cluster including memory, disk, uptime, and runtime details.
Inputs: node_name (required).
rabbitmq_broker_get_overviewC
Broker version, totals, and rates.
Inputs: no named parameters.
rabbitmq_broker_get_permissionsC
Get permissions for a user in a virtual host.
Inputs: user (required), vhost (required).
rabbitmq_broker_get_policyC
Get a specific policy by name.
Inputs: name (required), vhost.
rabbitmq_broker_get_queue_infoC
Get detailed information about a specific queue.
Inputs: queue (required), vhost.
rabbitmq_broker_get_shovel_infoA
Get detailed information about specific shovel by name that is in a selected virtual host (vhost) in the RabbitMQ broker.
Inputs: name (required), vhost.
rabbitmq_broker_get_skillC
Get a workflow recipe. Available: pre_flight_migration_check, migrate_definitions, setup_federation, queue_metrics_analysis, node_resource_analysis, export_topology_graph, trace_message_route, find_orphaned_queues, find_unbound_exchanges, trace_dead_letter_chain, inspect_dead_letters, dlq_summary, broker_recommendations, queue_health_assessment, resource_headroom_check, policy_conflict_detection
Inputs: skill_name (required). Returns: result
rabbitmq_broker_initialize_connectionC
Connect to a new RabbitMQ broker which authentication strategy is SIMPLE.
broker_hostname: The hostname of the broker.
username: The username of user
password: The password of user
alias: Optional name for this connection (default: hostname). Use to manage multiple brokers, e.g. 'blue', 'green', 'prod'.
Inputs: password (required), username (required), broker_hostname (required), port, +2 more. Returns: result
rabbitmq_broker_initialize_connection_with_oauthB
Connect to a new RabbitMQ broker using OAuth.
broker_hostname: The hostname of the broker.
oauth_token: A valid access token
alias: Optional name for this connection (default: hostname).
Inputs: oauth_token (required), broker_hostname (required), alias. Returns: result
rabbitmq_broker_is_in_alarmB
Check if the RabbitMQ broker is in alarm.
Inputs: no named parameters. Returns: result
rabbitmq_broker_is_quorum_criticalA
Check if there are quorum queues with minimum online quorum.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_channelsA
List all open channels on the broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_connectionsB
List all connections on the RabbitMQ broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_consumersA
List all consumers on the RabbitMQ broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_deprecated_featuresA
List deprecated features currently in use. Useful for upgrade planning.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_exchangesB
List all the exchanges in the broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_feature_flagsA
List all feature flags and their status.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_policiesC
List all policies in a virtual host.
Inputs: vhost. Returns: result
rabbitmq_broker_list_queuesB
List all the queues in the broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_registered_brokersA
List all registered broker connections and which is active.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_shovelsB
Get detailed information about shovels in the RabbitMQ broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_usersB
List all users on the RabbitMQ broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_list_vhostsA
List all the virtual hosts (vhosts) in the broker.
Inputs: no named parameters. Returns: result
rabbitmq_broker_selectA
Switch the active broker by alias. All subsequent tool calls will target this broker.
Inputs: alias (required). Returns: result
rabbitmq_broker_whoamiA
Get the current authenticated user on the active broker.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 39 tools
Most tools have distinct purposes due to descriptive naming (e.g., check vs list vs get). However, a few pairs like 'check_local_alarms' and 'is_in_alarm' are very similar, and the sheer number of tools increases the chance of misselection. Overall, an agent can generally distinguish them.
All tools follow the consistent 'rabbitmq_broker_verb_noun' pattern in snake_case. Verbs like check, list, get, is, find, compare, initialize are used uniformly. Multi-word nouns are consistently hyphenated or underscore-separated. No mixed conventions.
39 tools exceed the 'too many' threshold of 25 for typical MCP servers. While the domain is broad, the toolset could be consolidated (e.g., combining multiple check tools into parameterized ones). This high count burdens discovery and selection.
For a monitoring/diagnostics and migration assist tool, the coverage is strong: health checks, listings, details, comparisons, guidelines, and skills. Notable read-only bias means no create/update/delete tools, but that appears intentional. Minor gaps like missing per-exchange message rates don't hinder core workflows.
Maintenance
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
Connect AI agents to 1000+ apps with managed authentication and tool-calling.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server for RabbitMQ that exposes the RabbitMQ HTTP API as tools, enabling natural language interaction with RabbitMQ management.100212 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM agents to manage RabbitMQ queues, exchanges, and shovels via MCP tools, with restricted mode for production environments.Apache 2.0
- FlicenseCqualityDmaintenanceEnables management of RabbitMQ clusters, queues, exchanges, bindings, users, and messages through natural language in chat interfaces, using the MCP protocol.201-
- AlicenseCqualityDmaintenanceEnables AI assistants to manage ActiveMQ message brokers through MCP tools, supporting queue and topic operations, dynamic connection management, message browsing, and health monitoring.2218 npm1MIT