Official MCP Server

Let agents publish, wait for, and govern events.

Skip the custom event-to-LLM bridge. An MCP client starts @msgmesh/mcp-server over stdio so the model can discover topic, message, Webhook, DLQ, usage, and audit tools.

Step 1

Add the Server to your MCP client.

This format fits clients using mcpServers. Replace the placeholder, including angle brackets, with the plaintext key shown once on the panel's Keys page.

{
  "mcpServers": {
    "msgmesh": {
      "command": "npx",
      "args": ["-y", "@msgmesh/mcp-server"],
      "env": {
        "MQ_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Do not expect $MQ_API_KEY to expand as a shell variable; most MCP clients pass it literally. Enter the real key and restart the client.

Step 2

Verify the first event flow with four tools.

get_plan

Verify credentials first. Success means the key is valid; governance tools also need admin scope.

create_topic

Create one topic, such as orders. A duplicate returns 409, so do this only once.

publish_message

Publish any JSON event. The publishing key needs publish access to that topic.

watch_topic

Wait with a stable consumer group. After processing, call again with the same group to form watch → react → watch.

watch_topic waits up to 55 seconds. An empty timeout asks you to call again; it does not mean the subscription expired.

Permission choice

Do not give every agent an admin key for convenience.

TaskRequired capabilityCaution
Publish or wait for eventspublish/subscribe on the relevant topicA capability key can narrow scope to selected topics; watch does not support room filtering.
Create/delete topics, keys, schemas, or Webhooksadmin scopeThese tools change state. Require human approval before execution.
Read usage and audit dataadmin scopeOn 401/403, do not let the agent automatically rotate keys. Return to the panel.

Side effects

A query-like name does not make a tool read-only.

01

watch_topic

It commits the consumer group offset and is at-most-once. If the response is lost, the same batch is not delivered again.

02

consume_messages

It returns messages or immediately returns empty, and still advances offsets. It is not a side-effect-free check.

03

dlq_peek

Inspecting dead letters also advances the group. Use explicit groups and an operator workflow for repeat inspection.

Keep reading

Create a key and verify get_plan.

Confirm credentials and scope before the agent creates topics or waits for events.

Create an account and get a key →