Skip to content

MCP server ​

Rahdar speaks the Model Context Protocol, so an assistant can answer "why is ORDERS.DLQ backed up" against your real clusters instead of guessing.

The surface is intent-shaped tools — diagnose, message_action, artemis_config_change — not a mirror of the REST API. A mirror would spend the model's context on plumbing and leave it to assemble the diagnosis; the tools are shaped like the questions instead (ADR-0045).

Get a key ​

Sign in → avatar menu → Account → API keys → New key → choose when it expires, the scope and permissions it carries, and optionally the MCP tools it may call → copy the value. It is shown once.

  • Expiry. Every key expires, at most the installation's maximum lifetime after it was minted (90 days by default, Settings → API tokens → Maximum lifetime). Lowering the maximum shortens existing keys at once.
  • Tools. A key restricted to named tools is offered only those, plus rahdar_help. The other tools are not listed or described to it, and calling one answers exactly as a tool that does not exist.
  • Rotation. Rotate issues a new secret and keeps the old one working for the rotation overlap (24 hours by default), so an assistant's configuration can be updated without an outage. The key keeps its permissions and its expiry.
  • Limits. A key may make 600 requests a minute with 8 in flight, and one user 1,200 a minute across all their keys. Every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset, and an excess request gets 429 with Retry-After.
  • Usage shows each key's requests per day, with how many were denied, limited or failed. Administrators with See and revoke every user's API tokens see every key under Admin → API keys, where unused keys are flagged and any key can be revoked (ADR-0136).

Connect ​

POST /mcp, on the same origin as the UI, with the key as a bearer token.

json
{
  "mcpServers": {
    "rahdar": {
      "type": "http",
      "url": "https://rahdar.example.com/mcp",
      "headers": { "Authorization": "Bearer as_..." }
    }
  }
}

Smoke-test it without a client:

bash
curl -s https://rahdar.example.com/mcp \
  -H "Authorization: Bearer as_..." \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

scripts/mcp-config-e2e.sh drives the whole configuration loop over this wire — handshake, tools/list, declare, plan, refuse a stale plan, apply, converge, and every read kind — against the dev stack, and removes what it applied so it can be run again.

What is there ​

KindNameFor
Toolrahdar_helpthe catalogue itself: every tool, its posture and its parameters
Tooldiagnosea cluster (HA role per node, split-brain, replication lag, firing alerts) or one subscription end to end
Toollist_resourcesdestinations, subscriptions, routes, connections, channels, consumers and producers, by role, each with its id and kind
Toolmetric_seriesa bucketed timeseries for one metric
Toolartemis_config_diffevery node's configuration against the majority: the keys that drift and the nodes that differ
Toolartemis_configthe cluster's declaration, its drift per node, the broker.xml fragment, or past applies
Toolbrowse_messagesheaders of a subscription, or one body by id
Tooltrace_request_replyflows, latency and timeout statistics, configured expectations
Toolactivity_logbroker events, or Rahdar's own audit trail
Toolmessage_actionmove / retry / delete / expire / purge
Toolresource_lifecyclecreate, update, pause, resume or destroy a subscription or destination
Toolartemis_divert_lifecyclecreate or delete a divert
Toolartemis_config_changedeclare a configuration, or apply it canary-first with hazards acknowledged by id
Toolconnection_actionclose a connection, channel, consumer or a destination's consumers
Toolsend_messageenqueue one message
Toolkafka_describe_clusterthe cluster as the screen shows it: brokers, the quorum, co-replication and the same totals; needs cluster:read
Toolkafka_list_groups, kafka_describe_groupconsumer groups with state, members and lag, and one group's partitions and members
Toolkafka_preview_offset_reset, kafka_reset_offsetswhat a reset would move, and the reset itself, run against the preview
Toolkafka_topic_config, kafka_set_topic_configa topic's settings and where each comes from, and changing them
Toolkafka_list_aclsthe cluster's ACLs
Toolkafka_list_transactionsthe coordinator's open transactional ids; hangingOnly finds what is a problem, the open ones it has missed and the hanging transactions on partitions (topic narrows the search)
Toolkafka_abort_transactionabort a transaction the coordinator has missed, or a hanging transaction by the id the list returns, after its preview
Toolsetup_reviewthe latest configuration review of a cluster
Toolalert_rule / rahdar_settingalert rules; operational settings
Resourcerahdar://clusters, rahdar://permissions, rahdar://toolswhat this key can see and do
Resourcecluster://{id}/topology, cluster://{id}/capabilities, cluster://{id}/nodes/{nodeId}/settingsnodes; what the connection supports, with the broker.xml to enable what it does not; one node's effective settings
Prompttriage_cluster, investigate_subscription, before_you_purge, tune_scrape_loadrunbooks

Resources, roles and systems ​

A tool names a resource by its canonical id, such as artemis.queue/orders, the id that list_resources returns on every row, with the kind and kindLabel the system gives it. The arguments are named for what the resource is: subscription, destination, resource (a lifecycle target) and target. list_resources takes the role to list, one of destination, subscription, route, connection, channel, consumer and producer, and optionally one kind of it.

A tool that exists for one broker system carries that system's id as a prefix: artemis_config, artemis_config_change, artemis_config_diff, artemis_divert_lifecycle, the kafka_* tools, and setup_review. It is offered only to a key that can read a cluster of that system, and a call that names a cluster of another system is a tool error that says which system the cluster runs.

The safety contract ​

An assistant with a management API is exactly where a safety model needs to be boring and explicit. This one is:

  • A key never exceeds its owner. Grants are intersected with the owner's live grants on every call, so narrowing a person narrows their keys at once (ADR-0046).
  • Mutations dry-run by default. A real destructive run additionally requires confirm to equal the subscription's or destination's own name — separate from the bulk-cap override, which answers a different question and is never satisfied by confirm.
  • A Kafka change is previewed first, and held. kafka_preview_offset_reset returns what each partition would skip or read again, who still holds the group and an etag; kafka_reset_offsets, kafka_set_topic_config and kafka_abort_transaction run only against the etag of their preview, are refused as stale if the state moved, and are held for approval wherever the approval gate is on. A real run also needs confirm equal to the group, the topic or the transactional id, and kafka_set_topic_config and kafka_abort_transaction preview by default (dryRun). Like every mutating tool they are hidden when the installation is read-only.
  • A configuration apply is the same contract at cluster scale. The dry run returns the plan, its hazards and the exact acknowledge ids a real run must echo; the real run needs confirm to equal the cluster's name and expectedPlanHash to equal the hash it previewed, goes canary first and halts at the first failure. See Broker configuration.
  • Every call is audited, reads included, as MCP_TOOL_CALL under the owner with the key's name attached (ada [token: laptop-agent]), naming the tool, the cluster and the outcome. The rows a mutation writes, dry runs included, hang under it (ADR-0137).
  • The installation can be made read-only. Settings → MCP server → Read-only hides every mutating tool and refuses it for every key, whatever its confirm. A single read-only key is simply a key granted only read permissions.
  • A cluster the key holds no grant on comes back as "no such cluster, or this key has no grant on it" — naming no permission and confirming no id.

Discovery ​

rahdar_help is a tool, not an optional resource, and one catalogue generates the schemas, the help text, the resource and the server instructions — so they cannot disagree (ADR-0054).

Apache-2.0. Apache Kafka, Apache ActiveMQ and Apache ActiveMQ Artemis are trademarks of the Apache Software Foundation. RabbitMQ is a trademark of its owner. Rahdar is an independent project, not produced by, endorsed by, or affiliated with the ASF or the owner of RabbitMQ.