ARTEMIS-6118 Add a Model Context Protocol (MCP) server for Artemis#6519
ARTEMIS-6118 Add a Model Context Protocol (MCP) server for Artemis#6519k-krawczyk wants to merge 1 commit into
Conversation
New artemis-mcp-server reactor module exposing broker operations as MCP tools over the STDIO transport, so AI agents can inspect, monitor and administer a broker through a standard protocol. Read-only mode is the default; admin tools are registered only when mode=admin and destructive operations require confirm=true (enforced by both the tool input schema and the handler). Monitoring/management uses Artemis management messages; messaging uses the Core/JMS client. Uses the MCP Java SDK (MIT).
|
I'm not convinced adding a new module to the Artemis code-base is actually necessary given the availability of https://github.com/jolokia/jolokia-mcp-server. What benefits would this module have over the Jolokia solution? |
|
Thanks Justin — fair question. jolokia-mcp-server is a solid generic JMX→MCP
That said, your underlying question — does this belong in the Artemis codebase? — |
For what it's worth, it can also write MBean attributes and execute MBean operations (https://github.com/jolokia/jolokia-mcp-server#features).
A default broker starts with Jolokia listening on port
There are, in fact, management operations to send a message as well as browse messages. That's how the web console is able to offer this functionality.
In my opinion, this tight coupling can be a weakness rather than a strength because when the management API changes those changes ripple out to other layers (like this one), increasing the maintenance burden.
At this point I'd say, "no," but I'm willing to discuss further. |
|
Thanks Justin — that's all fair, and you're right on the specifics:
The piece I still think has value is a curated, safety-gated tool surface for autonomous agents — read-only by default, destructive ops behind an explicit confirm — rather than a generic execute-any-MBean-operation bridge. But I agree that doesn't need to live in the Artemis codebase. I'll take this out of tree and develop it as a standalone addon (the way jolokia-mcp-server is), and close this PR on that basis. Thanks for taking the time to look at it. |
What
Adds a new
artemis-mcp-serverreactor module: a Model Context Protocol (MCP)server that exposes broker operations as MCP tools over the STDIO transport, so
AI agents can inspect, monitor and administer an Artemis broker through a
standard protocol.
JIRA: https://issues.apache.org/jira/browse/ARTEMIS-6118
Tools (15)
Read-only (always available):
list_queues,list_addresses,get_broker_overview,get_queue_stats,browse_messagesAdmin (registered only when
mode=admin):create_queue,create_address,delete_queue,delete_address,purge_queue,delete_messages,move_messages,retry_dlq,send_message,consume_message*(*) destructive — require
confirm=true, enforced by both the tool input schema and the handler.Design
mode=admin.activemq.management(single broker connection, no open JMX required).
QueueBrowser, send = producer,consume = consumer).
Testing
mvn install.JSON-RPC
tools/call(create/list/stats/browse/send/consume/purge/move/delete),including confirm-gating on destructive tools.
Open questions for dev@ (not yet discussed)
repo, in examples, or as a separate addon?
json-schema-validator, snakeyaml-engine and reactor-core (all ASF Category A).
docs/) and a binary-distribution LICENSE/NOTICE entryfor the MIT SDK to be settled once the direction is agreed.