MsgMesh MCP Server
Let AI agents publish, consume, and watch durable event streams through MCP.
What this repository is
This is the public installation and discovery repository for@msgmesh/mcp-server.It contains the files MCP directories and automated installers need: verified setup instructions, aDockerfile, and reusable brand assets.
The server implementation is distributed as a public MIT-licensed npm package. It is deliberatelynot copied here: one published package remains the executable source of truth, while this repositorystays a small, auditable entry point.
Install in an MCP client
You need Node.js 18 or newer and a MsgMesh API key. Create an account in theMsgMesh panel, then issue a key from the Keys page.
Add this to Claude Desktop, Cursor, or another client that accepts MCP JSON configuration:
{
"mcpServers": {
"msgmesh": {
"command": "npx",
"args": ["-y", "@msgmesh/mcp-server"],
"env": {
"MQ_API_KEY": "mk_xxxxxxxx"
}
}
}
}
Replace mk_xxxxxxxx with your real key. Do not commit the resulting configuration when it containsa secret. The hosted API URLs are built in; self-hosters can override them as documented below.
The command follows the newest published release. MsgMesh keeps npm and the official MCP Registryaligned as part of the upstream release workflow.
What agents can do
The server exposes tools for:
- publishing, consuming, and waiting for events with
watch_topic; - managing topics, schemas, webhooks, functions, and API keys;
- inspecting usage, audit events, plans, billing, presence, and connection snippets;
- inspecting and replaying dead-lettered webhook deliveries.
watch_topic long-polls until events arrive, allowing an agent to follow awatch → react → watch again loop without periodic polling.
consume_messages,watch_topic, anddlq_peekadvance a consumer-group position. They areat-most-once operations, not side-effect-free reads.
Most management tools require an admin-scope key. A producer or consumer key can only use thedata-plane operations granted to it. If a client returns 401 or 403, issue the appropriate key in thepanel instead of asking the agent to call create_key—creating a key also requires admin scope.
Run with Docker
Build an image from the newest published MCP server:
docker build -t msgmesh-mcp .
For a reproducible build, pass an exact published version:
version=$(npm view @msgmesh/mcp-server version)
docker build --build-arg "MSGMESH_MCP_VERSION=$version" -t "msgmesh-mcp:$version" .
MCP over stdio needs an interactive stdin stream:
docker run --rm -i \
-e MQ_API_KEY \
msgmesh-mcp
Pass secrets at runtime; never bake them into the image. MCP directories such as Glama can build thesame Dockerfile and inject MQ_API_KEY through their secret configuration.
Configuration
| Variable | Required | Default | Purpose |
|---|---|---|---|
MQ_API_KEY |
Yes | — | MsgMesh API key. An admin-scope key enables all management tools. |
MQ_CONTROL_PLANE_URL |
No | https://msgmesh-api.alderflux.com |
Topics, keys, usage, and other management APIs. |
MQ_GATEWAY_URL |
No | https://msgmesh-api.alderflux.com |
Publish, consume, and DLQ APIs. |
MQ_REALTIME_URL |
No | https://msgmesh-api.alderflux.com |
Realtime presence API. |
For a self-hosted deployment, override all three URLs. See examples/mcp-config.example.jsonfor a complete configuration shape.
For AI coding agents
llms-install.md contains a short, safety-aware installation procedure intendedfor coding agents. It explicitly separates actions an agent may perform from the step where the usermust supply a secret.
Verification
CI verifies that:
- npm and the official MCP Registry agree on the latest version;
- the versionless Dockerfile and examples continue to resolve through the public npm package;
- the 400×400 PNG directory logo has the required dimensions;
- the container refuses to start without
MQ_API_KEY; - the container completes an MCP
initializehandshake without contacting a tenant account.
The check runs on every change and daily. CI reads the current npm release, verifies the officialRegistry has the same version, then passes that exact version into the Docker build for a reproducibletest. This repository therefore does not need a commit for ordinary package releases.
Security and support
- Never commit
MQ_API_KEYor paste it into an issue. - Use the minimum capabilities needed when an agent only publishes or consumes data.
- Report security concerns privately as described in
SECURITY.md. - For setup questions, open a GitHub issue or email
[email protected].
License
MIT. See LICENSE.