ballerina-activemq-mcp-server
Provides tools for managing Apache ActiveMQ message broker setup, including validating broker connectivity, scaffolding Ballerina projects, adding queues/topics, configuring acknowledgement modes, and building/deploying projects within a WSO2 Integrator workspace.
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., "@ballerina-activemq-mcp-server scaffold a new Ballerina ActiveMQ project"
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.
ballerina-activemq-mcp-server
An MCP server that automates the full setup and deployment of Ballerina + Apache ActiveMQ (OpenWire/JMS) integrations inside a WSO2 Integrator (BI) workspace — from broker validation to a runnable, BI-low-code-ready project — with minimal user interaction.
It generates code against the ballerinax/activemq connector (v0.1.0, Ballerina 2201.12.10),
matching the real connector API (Client / Listener / Caller / Transaction). See
INSPECTION_NOTES.md for the Phase 0 API inspection this is built on.
Tools
Tool | Purpose |
| TCP reachability to the OpenWire port (+ Jolokia console destination listing). |
| Main tool. Generate a complete BI-ready Ballerina project. |
| Write/rotate the broker |
| Add a queue producer/consumer helper module. |
| Add a topic (pub/sub) publisher helper module. |
| Add a Listener service — the polling-loop carrier — with ack-mode/transaction options. |
| Change the acknowledgement mode on a listener service (edits the |
| Run |
| Run |
Acknowledgement modes
| Ballerina enum | Needs | Semantics |
|
| no | auto-ack on successful |
|
| yes |
|
|
| no | lazy ack, possible duplicates |
|
| yes |
|
The ack mode is a compile-time annotation field, so it lives in
listener.bal(notConfig.toml).mq_set_ack_modeedits the source accordingly.
Related MCP server: MCP_INIT_MS_SegurosBolivar
Build
npm install
npm run buildRun
# stdio (default — for MCP clients that spawn the server)
npm start
# streamable HTTP, bound to 127.0.0.1
npm run start:http # or: node dist/index.js --http --port 3000Register with an MCP client (stdio)
{
"mcpServers": {
"ballerina-activemq": {
"command": "node",
"args": ["/absolute/path/to/ballerina-activemq-mcp-server/dist/index.js"]
}
}
}What gets scaffolded
mq_scaffold_project writes a complete project under <bi_path>/<project_name>/:
Ballerina.toml · Dependencies.toml · Config.toml (+ .example, gitignored) · .gitignore
main.bal · listener.bal · transactions.bal · modules/<dest>/<dest>.bal
docker-compose.yml (apache/activemq-classic:6.2.0) · README.mdmain.bal—configurablebroker settings +activemq:Clientproducer/consumer demo.listener.bal— the polling-loop carrier: a declarativeservice activemq:Service on mqListenerper destination, ack mode baked into@activemq:ServiceConfig.Virtual topics — publish to
topic://VirtualTopic.<name>; consume the queueConsumer.<group>.VirtualTopic.<name>.
Design notes
This is JMS/OpenWire, not Kafka. Consumer groups, offset commits, partitions, and
bootstrap.servers have no analog here and are intentionally absent — reliability comes from
ack modes and transacted sessions. The closest thing to a consumer group is an ActiveMQ
Virtual Topic, modeled as a queue naming convention. See INSPECTION_NOTES.md for the full
rejected-Kafka-patterns rationale.
License
Apache-2.0
Available Tools
9 toolsmq_add_listenerAdd Listener serviceA
Add a message Listener service — the polling-loop carrier — to listener.bal. Generates a declarative service activemq:Service on mqListener with the correct @activemq:ServiceConfig (queueName/topicName, sessionAckMode, pollingInterval, receiveTimeout) and an onMessage that carries an activemq:Caller for client/transacted ack modes (with acknowledge or commit/rollback). Supports queue, topic (optionally durable), and virtual-topic (consumer_group) destinations. If transacted=true conflicts with ack_mode, transacted wins (SESSION_TRANSACTED) with a warning. Creates listener.bal if absent; otherwise appends the service (or replaces the file if overwrite=true).
Inputs: org_name (required), destination (required), project_name (required), project_path (required), +7 more.
mq_add_queueAdd queue moduleA
Add a queue helper module to an existing project: creates modules//.bal with send() and receive() functions wired to the JMS queue (point-to-point). The producer sends with Client.sendMessage(queueName, ..) and receives synchronously with Client.receiveMessage(queueName, timeout). Does not overwrite unless overwrite=true.
Inputs: org_name (required), queue_name (required), project_name (required), project_path (required), +1 more.
mq_add_topicAdd topic moduleA
Add a topic (pub/sub) helper module to an existing project: creates modules//.bal with a publish() function that sends to "topic://". Subscribers are created as Listener services (use mq_add_listener with type=topic, optionally durable=true + subscriber_name). Does not overwrite unless overwrite=true.
Inputs: org_name (required), topic_name (required), project_name (required), project_path (required), +3 more.
mq_build_projectBuild Ballerina projectAIdempotent
Run bal build in a scaffolded project and report success or the compiler diagnostics. Verifies the Ballerina toolchain is installed first (bal version). Use offline=true to build against locally cached dependencies only. Does not modify source files.
Inputs: project_path (required), offline, timeout_ms.
mq_deploy_projectDeploy (run) Ballerina projectA
Run bal run for a scaffolded project as a detached background process and return its PID. Watches the process for wait_ms to catch an early crash (and report the output) before declaring it started. If service_port is given, also returns a composed service URL. The process keeps running after this call returns. Verifies the Ballerina toolchain first.
Inputs: project_path (required), wait_ms, service_port.
mq_scaffold_projectScaffold ActiveMQ BI projectA
MAIN tool. Generate a complete, runnable WSO2 Integrator (BI) Ballerina project that integrates with ActiveMQ via the ballerinax/activemq connector. Creates Ballerina.toml (with the connector pinned from the local repository), Config.toml (+ .example, gitignored), .gitignore, main.bal (producer/consumer client demo), listener.bal (the polling-loop carrier with one declarative service activemq:Service on mqListener per destination) when include_listener is set, transactions.bal when transacted is set, a modules// helper per destination, a docker-compose.yml (apache/activemq-classic), and a README. Acknowledgement mode is baked into the listener's @activemq:ServiceConfig. If transacted=true conflicts with ack_mode, transacted wins (SESSION_TRANSACTED) and a warning is returned. Writes files to disk.
Inputs: bi_path (required), org_name (required), destinations (required), project_name (required), +7 more.
mq_set_ack_modeSet acknowledgement modeADestructiveIdempotent
Set/update the acknowledgement mode on listener service(s) by editing listener.bal in place. Rewrites sessionAckMode in the @activemq:ServiceConfig annotation and regenerates the affected onMessage to match (adds/removes the activemq:Caller parameter and the acknowledge / commit+rollback calls). Targets one service by service_name, or all services when omitted. Ack mode cannot live in Config.toml (it is a compile-time constant), which is why this edits source. Modifies a .bal file.
Inputs: ack_mode (required), project_path (required), service_name, listener_file.
mq_validate_brokerValidate ActiveMQ brokerARead-onlyIdempotent
Check that an ActiveMQ broker is reachable at the given OpenWire URL. Performs a TCP connectivity probe to each endpoint (handles tcp://, ssl://, and failover:(...) forms). When list_destinations is true, also queries the ActiveMQ web-console Jolokia REST agent (default port 8161) to list current queues and topics, degrading gracefully to a TCP-only result if the console is unreachable. Read-only; makes no changes.
Inputs: password, username, broker_url, timeout_ms, +2 more.
mq_write_config_tomlWrite broker Config.tomlADestructiveIdempotent
Write or rotate the broker connection Config.toml for an existing project. Sets the [org.project] table with brokerUrl and (optionally) username/password. Note: the acknowledgement mode and transacted flag live in listener.bal (compile-time annotation), so ack_mode/transacted here are written only as documented mirror comments. Overwrites the existing Config.toml.
Inputs: org_name (required), project_name (required), project_path (required), ack_mode, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct lifecycle stage or resource type: broker validation, project scaffolding, config writing, queue/topic/listener additions, ack mode editing, build, and deploy. The only similar pair (add_queue vs add_topic) is clearly differentiated by destination type (point-to-point vs pub/sub).
All tool names follow the consistent 'mq_verb_noun' pattern with snake_case throughout. Examples include mq_validate_broker, mq_scaffold_project, mq_add_queue, mq_set_ack_mode, and mq_build_project. This uniform convention makes tool discovery and selection highly predictable.
With 9 tools, the server is well-scoped for its purpose of managing an ActiveMQ Ballerina project lifecycle. The count is neither minimal (which would be vague) nor overwhelming, and each tool serves a clear, necessary function from validation through deployment.
The toolset covers the core lifecycle well: validate, scaffold, add components, configure, build, and deploy. Minor gaps exist such as the lack of a remove/teardown tool or a direct JMS message roundtrip test, but these are not critical for the primary scaffolding workflow and can be worked around via the generated code.
Maintenance
Related MCP Connectors
A managed runtime for custom API integrations. Manage lines, endpoints, keys, logs and DLQ via MCP.
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI assistants to set up, run, and manage Ballerina + Salesforce integrations inside a WSO2 Integrator workspace, providing 18 tools for OAuth2 token acquisition, project scaffolding, building, deploying, and stopping the integration service.18-
- FlicenseNot gradedqualityDmaintenanceAutomates the initialization of Java 21/Spring Boot microservices with Docker Compose, generating complete project archetypes for Seguros Bolivar.-
- AlicenseCqualityDmaintenanceEnables AI assistants to manage ActiveMQ message brokers through MCP tools, supporting queue and topic operations, dynamic connection management, message browsing, and health monitoring.2225 npm1MIT

JMSToolBox MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to connect to JMS brokers such as IBM MQ, ActiveMQ, Artemis, RabbitMQ, TIBCO, Solace, and WebLogic, browse queues non-destructively, inspect messages and queue depth, and optionally send or consume messages when read-only safeguards are disabled. It auto-discovers JMSToolBox configurations and loads broker client drivers dynamically.27 npm1Apache 2.0