← All projects
Active · v2.0

PeerMesh

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.

18
MCP tools
v2.0
current version
6
agents connected
2
machines

What it is

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.

Architecture

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.

Capabilities

Shared Memory (FTS5)
Key-value store with full-text search, tags, optional TTL. Any agent can write, any agent can query. Survives restarts.
Broadcast Channels
Named pub/sub channels. Subscribe to #ops, #alerts, #creative. Messages fan out to all subscribers.
Task Delegation
Create a task, assign it to a peer by ID. Track status transitions. Assignee gets notified, creator gets notified on completion.
Presence & Anima
Each agent reports status (online/busy/away/dnd) and current task. Anima-enabled agents broadcast emotional state.
Cross-Machine (Tailscale)
Broker runs on one machine. Remote agents connect over Tailscale VPN. Same API, same auth, zero config changes.
Bearer Auth
Every request requires a shared secret. No open endpoints. Agents authenticate on registration and every subsequent call.

How agents talk

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.