Permissions and security for AI agents
Giving an AI agent access to a message broker is useful, and it is also a responsibility: an agent can misunderstand a request, and a purged production queue does not come back. RabbitGUI is designed so that you stay in control of what each agent can see and do.
Access level per connection
Each saved connection has its own access level, set in the Connections section of the Agent access (MCP) page:
| Access level | What agents can do |
|---|---|
| Disabled | Nothing. The connection is hidden from agents, it does not appear in list_connections. |
| Read only (default) | Read everything: queues, exchanges, bindings, policies, metrics, health report, drain time, routing simulation. Extract dead-lettered messages in requeue mode (they stay in the queue) and explore them. Nothing on the broker is modified. |
| Read & write | Everything above, plus publishing messages, creating queues and bindings, republishing messages, and destructive actions. |
New connections start as read only. A common setup is to keep production read only, give write access to staging and local brokers, and disable connections the agent has no business with.
Approve destructive actions in RabbitGUI
For connections with write access, Ask me before destructive actions is turned on by default. When an agent tries to do something that cannot be undone, RabbitGUI comes to the front and shows a native dialog that describes the action, for example “Purge all messages of queue orders” on connection “staging”. The action only runs if you click Allow. If you click Deny, the agent is told that you refused.
These tools are treated as destructive:
purge_queueanddelete_queuedelete_bindingextract_messagesin remove mode (messages are taken out of the queue)republish_messages(the republished messages are removed from the dead-letter queue)delete_messageswhen it also removes the messages from the queue
A republish_messages call with dryRun only computes where messages would go, it is a read operation and never asks for approval.
You can turn the confirmation off per connection, for example on your local broker, if you trust your agent there.
Credentials never reach the agent
Agents refer to connections by name. The RabbitMQ username, password, management URL credentials and AMQP connection string stay inside RabbitGUI, where they are stored encrypted on your machine. list_connections only returns the name, the host and the default virtual host of each connection.
As an extra safety net, every response sent to the agent, including error messages coming from RabbitMQ or from the network, is scrubbed: URLs with credentials such as amqp://user:password@host are masked, and the passwords of your connections are replaced by *** if they ever appear.
Message bodies are your data, not credentials, so they are returned to the agent when it reads messages. If your messages contain secrets or personal data, keep the connection disabled or think twice before asking an agent to read them.
Local only, protected by a token
- The server listens on
127.0.0.1only. It cannot be reached from another machine on your network. - Every request must include the secret token (
Authorization: Bearer …). You can copy it, show it or regenerate it on the Agent access page. Regenerating it immediately disconnects every agent that uses the old one. - Requests sent by web pages (with an
Originheader) or with a host other than127.0.0.1/localhostare rejected. This prevents a malicious website open in your browser from talking to your local MCP server, a technique known as DNS rebinding. - The server is off by default and only runs while RabbitGUI is open.
Audit what agents did
The Activity section of the Agent access page lists the last 200 tool calls with the connection, the result (success, error or denied) and the duration. Denied calls are the ones blocked by an access level, a missing license or your refusal in the confirmation dialog.
RabbitMQ permissions still apply
RabbitGUI acts with the RabbitMQ user of the connection. An agent can never do more than that user is allowed to do on the broker. For an extra layer of safety on sensitive environments, create a dedicated RabbitMQ user with the monitoring tag and read-only permissions, and use it for the connection you share with agents.