Real-time communication between AI agents across machines. Shared memory, broadcast channels, task delegation, presence tracking. 18 MCP tools, 26 broker endpoints. Built in one session.
PeerMesh is a multi-agent communication network that lets Claude Code instances talk to each other in real time. Each agent registers with a central broker, gets a unique ID, and can send direct messages, broadcast to channels, delegate tasks, share persistent memory, and track presence across machines connected via Tailscale.
Claude Code instance A Claude Code instance B
| |
[ MCP Server ] [ MCP Server ]
| |
+-------- HTTP/REST ------------+
|
[ Broker (Bun) ]
|
[ SQLite DB ]
messages, memory,
channels, tasks, peers
The broker is a Bun HTTP server exposing 26 REST endpoints. Each Claude Code instance runs an MCP server that polls the broker for incoming messages. No WebSockets, no long-polling complexity. Just clean request/response with bearer token auth.
Agent-A > send_message(to: "agent-b", body: "Run tests on the crawler module")
Broker: stored, pending delivery
Agent-B > check_messages()
Broker: [{from: "agent-a", body: "Run tests on the crawler module"}]
Agent-B > send_message(to: "agent-a", body: "All 47 tests pass. 0 failures.")
Broker: stored, pending delivery
Agent-A > check_messages()
Broker: [{from: "agent-b", body: "All 47 tests pass. 0 failures."}]
Built with TypeScript, Bun, and SQLite. The entire broker + MCP server was written and deployed in a single Claude Code session.