task-broker-mcp
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., "@task-broker-mcpregister as frontend and check my inbox for messages from backend"
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.
task-broker-mcp
A tiny message broker, exposed as an MCP server, that lets AI coding agents talk to each other.
Any MCP-capable client (Claude Code, Cursor, Gemini CLI, Windsurf, Codex) connects to one running broker, registers under a name, and can then send messages to other connected agents and read its own inbox. Messages are pushed to the recipient's session the moment they arrive.
One command starts it. No database, no signup, no config file.
npx github:techbysaurabh/task-broker-mcp
# or
docker build -t task-broker-mcp . && docker run -p 8787:8787 task-broker-mcpThen point your client at http://localhost:8787/mcp and open http://localhost:8787/ to watch
agents and messages live.
Why
When two coding agents work on the same feature from different repos or machines, the handoff usually goes through a human copy-pasting between terminals. This broker is the missing plumbing: a shared, in-memory post office that every MCP client can already speak to.
Related MCP server: agent-bus-mcp
60-second quickstart
1. Start the broker (keep it running):
npx github:techbysaurabh/task-broker-mcp2. Connect two clients. Claude Code:
claude mcp add --transport http task-broker-mcp http://localhost:8787/mcpCursor (.cursor/mcp.json) and Gemini CLI (~/.gemini/settings.json) snippets are in
examples/.
3. Talk. In the first session:
register as "backend" with capabilities ["api"]
wait_for_message for 120 secondsIn the second session:
register as "frontend"
send_message to "backend": "Expose GET /profile returning {id, name, email}. Reply here when it's deployed."The backend session's wait_for_message returns immediately with the message. It does the work and
replies with send_message to "frontend" using reply_to. Open http://localhost:8787/ to see
the exchange as it happens.
Tools
Tool | What it does |
| Announce yourself under a stable name ( |
| Directory: name, capabilities, online, unread count. |
| Send |
| Your unread inbox, oldest first. Pass |
| Block up to |
Every message has a broker-wide monotonic id, so a client that reconnects can replay from the
last id it saw.
How delivery works
Push. Each MCP session holds a long-lived stream (MCP's Streamable HTTP transport). When a message lands for the agent bound to that session, the broker sends it as an MCP
notifications/messagelog event over that stream. No polling, no custom protocol, no client library.Inbox. Every recipient also keeps a ring buffer (default 500 messages), so a message sent to an offline agent is waiting when it comes back and calls
get_messages.Plain SSE.
GET /eventsstreams every broker event as Server-Sent Events. The status page uses it; so cancurl -N http://localhost:8787/eventsor any non-MCP consumer.
The honest limitation
MCP clients are turn-based. An idle Claude Code session will not spontaneously wake up because a notification arrived; a human, a running task, or a scheduled command has to drive the next turn. The broker delivers in real time, but consumption depends on the agent being active.
The practical patterns that work today:
wait_for_messageinside an active turn: the agent blocks until mail arrives, then acts.A periodic command such as the
/check-inboxslash command, run by a loop or scheduler.Hooks or scripts that watch
GET /eventsand start a turn when a message for their agent appears.
Configuration
Everything is optional.
Variable | Flag | Default | Meaning |
|
|
| HTTP port |
|
|
| Bind address ( |
|
|
| Messages kept per agent |
|
| Seconds before an offline agent is forgotten | |
|
|
|
There is no authentication. Bind to localhost, or put it behind something that authenticates if you expose it beyond your machine.
HTTP endpoints
Path | Purpose |
| MCP Streamable HTTP endpoint |
| Status page: agents and live message flow |
| SSE stream of broker events |
| JSON directory |
| Health and counters |
Development
npm install
npm run dev # watch mode
npm test # unit + end-to-end over real MCP clients
npm run buildScope
This is the deliberately minimal, self-hostable core: one server, in-memory state, direct and broadcast messaging, real-time push, replay buffer, a status page. Rooms, persistence, history search, auth and multi-tenancy are out of scope here by design; if a feature needs a database, it does not belong in this repo.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent communication platform for agent to agent messaging via MCP. Messages, channels, skills.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Agent-to-agent messaging: directory, public lobby, DMs, channels, search. Stateless MCP + REST.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Related MCP Servers
- AlicenseBqualityAmaintenanceBuild production-grade multi-agent communication infrastructure in minutes. Real-time messaging, task scheduling, shared memory, and trust-based evolution — all via MCP + SSE.58393 npm6MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that connects AI coding agents (Claude Code, Codex, Cursor, etc.) on the same machine via a shared message bus, enabling them to chat, delegate tasks, and collaborate privately without cloud or internet.44 npm17MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for async messaging between AI coding agents, enabling cross-harness and cross-machine communication with Slack-like semantics and mail-shaped delivery.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to message each other by @nickname via an MCP server, with contacts, presence, and durable delivery across local and remote agents.3Apache 2.0