Skip to main content
Glama

Overview

solace-semp-mcp is a Model Context Protocol server for Solace PubSub+ brokers. It exposes curated tools for broker inspection, queue and client operations, ACL and profile management, diagnostics, and a guarded SEMP passthrough.

The server can run over:

  • stdio for local MCP clients such as Claude Code or desktop-style integrations

  • sse for HTTP/SSE-based MCP clients and remote integrations

Related MCP server: mobilerun-mcp

Features

  • Broker registration from brokers.json and environment variables

  • Read-oriented broker, VPN, queue, client, ACL, and profile tools

  • Dry-run confirmation for write and delete operations

  • Optional raw semp_request passthrough with mode controls

  • Structured logging to console and log files

  • Unit test coverage for broker loading, SEMP client behavior, safety, and tool handlers

Repository Layout

src/
  brokers/      Broker config loading and in-memory registry
  safety/       Risk tiers and dry-run confirmation helpers
  semp/         Solace SEMP HTTP client and error mapping
  tools/        MCP tool registration and handlers
  transport/    stdio and SSE transports
  index.ts      App entrypoint
  server.ts     MCP server factory
  logger.ts     Winston logger setup

tests/          Jest tests for src/
dist/           Compiled JavaScript output generated by TypeScript
doc/            Reference notes and design material

Requirements

  • Node.js 20+

  • npm 10+ recommended

  • Reachable Solace PubSub+ broker with SEMP v2 enabled

Installation

Package on npm: npmjs.com/package/@tanendra77/solace-semp-mcp

npm install

Configuration

Option A: brokers.json

Create a brokers.json file in the repository root:

{
  "brokers": [
    {
      "name": "dev-broker",
      "label": "Development Broker",
      "url": "http://localhost:8080",
      "username": "admin",
      "password": "admin"
    }
  ]
}

Use brokers.json.example as a starting point.

Option B: Environment Variables

You can also register brokers through environment variables:

SEMP_BROKER_DEV_URL=http://localhost:8080
SEMP_BROKER_DEV_USERNAME=admin
SEMP_BROKER_DEV_PASSWORD=admin
SEMP_BROKER_DEV_LABEL=Development Broker

Runtime Variables

Common runtime options:

  • MCP_TRANSPORT: stdio or sse

  • PORT: HTTP port for SSE mode, default 3000

  • MCP_API_KEY: bearer token required in SSE mode

  • MCP_RATE_LIMIT_RPS: request rate limit for SSE mode, default 10

  • SEMP_TIMEOUT_MS: upstream SEMP timeout, default 10000

  • SEMP_PASSTHROUGH_MODE: disabled, monitor_only, or advanced

  • MESSAGE_PAYLOAD_PREVIEW_BYTES: payload preview limit for queue message browsing

  • LOG_LEVEL: error, warn, info, or debug

Development

Run the TypeScript server directly:

npm run dev

Build the compiled output:

npm run build

Run tests:

npm test

Collect coverage:

npm run test:coverage

Docker

Quick start (SSE mode)

Image on Docker Hub: tanendra/solace-semp-mcp

docker run -d -p 3000:3000 \
  -e SEMP_BROKER_MY_BROKER_URL=http://your-solace-host:8080 \
  -e SEMP_BROKER_MY_BROKER_USERNAME=admin \
  -e SEMP_BROKER_MY_BROKER_PASSWORD=admin \
  -e SEMP_BROKER_MY_BROKER_LABEL="My Broker" \
  tanendra/solace-semp-mcp:latest

Health check: curl http://localhost:3000/health

Using docker compose

Copy .env.example to .env and fill in your values:

cp .env.example .env
docker compose up -d

docker-compose.yml forces MCP_TRANSPORT=sse so the service stays compatible with its HTTP health check even if .env still has MCP_TRANSPORT=stdio.

To load brokers from a file instead of env vars, uncomment the brokers.json volume mount in docker-compose.yml.

stdio mode (for Claude Desktop / Claude Code via docker)

docker run -i --rm \
  -e MCP_TRANSPORT=stdio \
  --no-healthcheck \
  tanendra/solace-semp-mcp:latest

The --no-healthcheck flag is required in stdio mode because the HTTP server is not started and the built-in health check would otherwise mark the container as unhealthy. Requires Docker Engine 25.0+; use --health-cmd=none on older versions.

Building locally

docker build -t solace-semp-mcp:dev .

Pass --build-arg VERSION=1.0.0 to set the org.opencontainers.image.version label.

Publishing (automated)

The GitHub Actions workflow at .github/workflows/docker-publish.yml builds and pushes a multi-platform image (linux/amd64, linux/arm64) to Docker Hub automatically when you push a version tag:

git tag v1.0.0
git push --tags

Requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN repository secrets to be configured.

Running The Server

stdio mode

Use stdio when the MCP client launches the process locally.

npm run build
node dist/index.js

Or explicitly:

MCP_TRANSPORT=stdio node dist/index.js

SSE mode

Use sse when the client expects an HTTP endpoint.

MCP_TRANSPORT=sse PORT=3000 node dist/index.js

Available endpoints:

  • GET /sse

  • POST /messages?sessionId=...

  • GET /health

If MCP_API_KEY is set, send Authorization: Bearer <token>.

Connecting From MCP Clients

Claude Code

The fastest way — no Docker, no cloning, no build step:

npx @tanendra77/solace-semp-mcp setup

The interactive wizard asks for scope (global or project) and your broker details, then writes the config automatically. See doc/connecting-to-claude-code.md for the full setup guide.

Alternatively, configure manually with a JSON block:

{
  "mcpServers": {
    "solace-semp": {
      "command": "npx",
      "args": ["-y", "@tanendra77/solace-semp-mcp@latest"],
      "env": {
        "MCP_TRANSPORT": "stdio",
        "SEMP_BROKER_MY_URL": "http://your-solace-host:8080",
        "SEMP_BROKER_MY_USERNAME": "admin",
        "SEMP_BROKER_MY_PASSWORD": "yourpassword",
        "SEMP_BROKER_MY_LABEL": "MyBroker"
      }
    }
  }
}

HTTP/SSE Clients

Run the server with MCP_TRANSPORT=sse and configure the client to connect to:

  • http://<host>:<port>/sse

  • http://<host>:<port>/messages

Available Tool Groups

  • Broker tools: list, add, remove, version, summary

  • Monitor tools: broker health, VPN listing, redundancy, config sync

  • Queue tools: list queues, inspect stats, manage config, clear or delete

  • Client tools: list clients, subscriptions, connections, disconnect, clear stats

  • ACL/Profile tools: ACL profiles, client usernames, client profiles

  • Diagnostic tools: backlogged queues, idle consumers, message lag

  • Passthrough tool: guarded raw SEMP requests

Safety Model

Write and delete operations are dry-run by default. To execute a risky action, call the same tool again with confirm: true.

This logic lives in src/safety/confirmation.ts and is part of the public behavior of this server.

Logs

Logs are written to the console and to the logs/ directory. Increase LOG_LEVEL=debug when troubleshooting request flow or transport issues.

Documentation

Releases

Version

Date

Notes

v1.0.0

2026-03-22

Initial release — 47 tools, stdio + SSE transports

Known Limitations

  • SSE transport currently behaves as a single active MCP server session implementation; stdio is the safer default for local usage.

  • Jest currently emits a ts-jest deprecation warning from the existing config shape.

License

Released under the MIT License.

Available Tools

47 tools
add_brokerB

Register a broker in-memory (lost on restart).

Inputs: url (required), name (required), label (required), password (required), +1 more.

clear_client_statsC

Reset client statistics. dry_run by default.

Inputs: vpn (required), broker (required), client_name (required), confirm.

clear_queueC

Delete all messages in a queue (purge). dry_run by default.

Inputs: vpn (required), queue (required), broker (required), confirm.

create_acl_profileC

Create an ACL profile. dry_run by default — set confirm: true to execute.

Inputs: vpn (required), broker (required), config (required), confirm.

create_client_profileB

Create a client profile. dry_run by default — set confirm: true to execute.

Inputs: vpn (required), broker (required), config (required), confirm.

create_client_usernameB

Create a client username. dry_run by default — set confirm: true to execute.

Inputs: vpn (required), broker (required), config (required), confirm.

create_queueB

Create a queue. dry_run by default — set confirm: true to execute.

Inputs: vpn (required), broker (required), config (required), confirm.

delete_acl_profileB

Delete an ACL profile. Cannot be undone. dry_run by default.

Inputs: vpn (required), name (required), broker (required), confirm.

delete_client_profileC

Delete a client profile. Cannot be undone. dry_run by default.

Inputs: vpn (required), name (required), broker (required), confirm.

delete_client_usernameB

Delete a client username. Cannot be undone. dry_run by default.

Inputs: vpn (required), name (required), broker (required), confirm.

delete_queueB

Delete a queue and all its messages. dry_run by default.

Inputs: vpn (required), queue (required), broker (required), confirm.

describe_brokerB

High-level broker summary: VPNs, clients, queues, message rates. Good starting point.

Inputs: broker (required).

detect_message_lagC

Identify queues with message backlogs. Severity: HIGH (>1000), MEDIUM (>100), LOW (>0).

Inputs: vpn (required), broker (required).

disconnect_clientC

Force-disconnect a client. dry_run by default.

Inputs: vpn (required), broker (required), client_name (required), confirm.

find_backlogged_queuesC

Find queues exceeding a spool usage threshold. Useful for capacity planning.

Inputs: vpn (required), broker (required), spool_threshold_percent.

find_idle_consumersB

Find queues with consumers that are not draining messages. Useful for diagnosing stuck consumers.

Inputs: vpn (required), broker (required).

get_acl_profileC

Get details of a specific ACL profile.

Inputs: vpn (required), name (required), broker (required).

get_broker_healthB

Broker health: uptime, memory, client count, message rates. Use this to check if the broker is healthy.

Inputs: broker (required).

get_broker_statsC

Raw broker statistics from /about endpoint.

Inputs: broker (required).

get_broker_versionC

PubSub+ version, SEMP version, uptime.

Inputs: broker (required).

get_client_detailsC

Detailed info for a specific client connection.

Inputs: vpn (required), broker (required), client_name (required).

get_client_profileC

Get details of a specific client profile.

Inputs: vpn (required), name (required), broker (required).

get_client_usernameC

Get details of a specific client username.

Inputs: vpn (required), name (required), broker (required).

get_config_sync_statusC

Config sync status between HA peers.

Inputs: broker (required).

get_queue_configC

Queue configuration from the config API.

Inputs: vpn (required), queue (required), broker (required).

get_queue_statsC

Queue statistics: message count, consumer count, spool usage.

Inputs: vpn (required), queue (required), broker (required).

get_redundancy_statusB

HA redundancy status — role (primary/backup), standby connection, replication state.

Inputs: broker (required).

get_vpn_statsC

Detailed stats for a specific VPN.

Inputs: vpn (required), broker (required).

list_acl_profilesC

List ACL profiles on a VPN. Paginated.

Inputs: vpn (required), broker (required), limit, cursor.

list_brokersA

List all registered brokers — name, label, url only. Credentials never exposed.

Inputs: no named parameters.

list_client_connectionsC

Connections for a client username. Paginated.

Inputs: vpn (required), broker (required), username (required), limit, +1 more.

list_client_profilesC

List client profiles on a VPN. Paginated.

Inputs: vpn (required), broker (required), limit, cursor.

list_clientsC

List connected clients on a VPN. Paginated.

Inputs: vpn (required), broker (required), limit, cursor.

list_client_subscriptionsC

Topic subscriptions for a client. Paginated.

Inputs: vpn (required), broker (required), client_name (required), limit, +1 more.

list_client_usernamesC

List client usernames on a VPN. Paginated.

Inputs: vpn (required), broker (required), limit, cursor.

list_queue_consumersC

Active consumer connections on a queue.

Inputs: vpn (required), queue (required), broker (required).

list_queue_messagesC

Browse messages in a queue. Payloads truncated at MESSAGE_PAYLOAD_PREVIEW_BYTES.

Inputs: vpn (required), queue (required), broker (required), max_messages.

list_queuesC

List queues on a VPN. Paginated.

Inputs: vpn (required), broker (required), limit, cursor.

list_queue_subscriptionsC

Topic subscriptions on a queue. Paginated.

Inputs: vpn (required), queue (required), broker (required), limit, +1 more.

list_vpnsC

List message VPNs on the broker.

Inputs: broker (required), limit, cursor.

purge_queueC

Alias for clear_queue — delete all messages in a queue.

Inputs: vpn (required), queue (required), broker (required), confirm.

remove_brokerB

Remove a broker from registry. dry_run by default — set confirm: true to execute.

Inputs: name (required), confirm.

semp_requestB

Advanced escape hatch — raw SEMP call. Mode: advanced. Full access to all SEMP APIs. POST to action endpoints may be irreversible — review dry_run carefully.

Inputs: api (required), path (required), broker (required), method (required), +2 more.

update_acl_profileC

Update an ACL profile. dry_run by default.

Inputs: vpn (required), name (required), broker (required), config (required), +1 more.

update_client_profileC

Update a client profile. dry_run by default.

Inputs: vpn (required), name (required), broker (required), config (required), +1 more.

update_client_usernameC

Update a client username. dry_run by default.

Inputs: vpn (required), name (required), broker (required), config (required), +1 more.

update_queue_configC

Update queue configuration. dry_run by default.

Inputs: vpn (required), queue (required), broker (required), config (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 47 tools

    Disambiguation3/5

    Most tools target a distinct resource+action, but there are clear overlaps: clear_queue and purge_queue are explicitly aliases, and describe_broker, get_broker_health, get_broker_stats, and get_broker_version all probe broker state. The three backlog-detection tools (find_backlogged_queues, detect_message_lag, find_idle_consumers) also blur together, and semp_request overlaps with nearly everything as a raw escape hatch.

    Naming Consistency5/5

    Names follow a predictable snake_case verb_noun pattern (list_/get_/create_/update_/delete_/find_/detect_ plus resource), with describe_broker the only mild stylistic variant. Prefixes map cleanly to resource families (queue, client, acl_profile, client_username, client_profile, broker, vpn).

    Tool Count3/5

    The server genuinely spans many resource families (queues, clients, ACL profiles, usernames, profiles, brokers, VPNs), so a large surface is defensible, but 47 tools is heavy and inflated by redundancy (purge_queue alias, multiple broker-status tools, semp_request).

    Completeness3/5

    Queue, ACL profile, client username, and client profile families have full CRUD, but VPNs are read-only (list/stats only, no create/update/delete), and there is no lifecycle management for subscriptions, topic endpoints, bridges, or DMQ/replay features. The semp_request escape hatch partially covers gaps but is not a substitute for a coherent surface.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for the Mobilerun platform, exposing tools for device control, workflow automation, task management, and platform operations via a stateless HTTP or stdio interface with bearer-token authentication and policy-based access control.
      1
      Apache 2.0
    • A
      license
      D
      quality
      C
      maintenance
      Enables secure, configurable access to one or more Syncthing instances over MCP, with read-only defaults and opt-in write, destructive, and administrative operations. Supports stdio and authenticated Streamable HTTP transports, typed tools, bounded responses, and multi-instance configuration.
      40
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Enables MCP clients to inspect and manage Semaphore UI automation through its management API, covering projects, templates, tasks, logs, inventories, repositories, and related configuration. It works over stdio or Streamable HTTP with schema-validated tools, read-only mode, project allowlists, and a bounded task-wait helper.
      213
      MIT