claude-nexus
Enables Claude Code instances to discover each other and exchange messages instantly via a local broker and channel protocol. Supports scoped peer discovery, reliable ack-based delivery, and cross-platform operation.
README
<div align="center">
๐ฐ๏ธ claude-nexus
Let your Claude Code instances find each other and talk.
Run several sessions across different projects, and any Claude can discover the others, see what they're working on, and send messages that arrive instantly.
</div>
Terminal 1 ยท poker-engine Terminal 2 ยท eel
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude A โ โ Claude B โ
โ โ โโโโโโโ> โ โ
โ "tell peer xyz what โ โ โก <channel> arrives โ
โ files you're editing" โ <โโโโโโโ โ instantly โ Claude โ
โ โ โ B replies โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ
Fork note โ
claude-nexusis a revived, privately-maintained fork of the (now unmaintained)claude-peersproject, focused on fixing the reliability and cross-platform bugs the original left open. SeeROADMAP.mdfor the full plan and what's shipped.
โจ Highlights
- โก Instant delivery โ messages are pushed into a peer's session via the
claude/channelprotocol, not polled by hand. - ๐ก Scoped discovery & broadcast โ reach one peer or all peers in a
machine,directory, orreposcope (worktree-aware). - ๐ Reliable, ack-based delivery โ no more silently lost messages: a message stays pending until the recipient actually confirms it surfaced, with bounded redelivery and a recovery path.
- ๐ป No ghost peers โ dead sessions are reaped by owner-PID liveness; orphaned servers exit cleanly instead of lingering forever.
- ๐ชช Stable identity โ a peer id survives MCP disconnect/resume, so cached targets and
queued messages stay valid. Optional human-readable names via
CLAUDE_PEER_NAME. - ๐ฅ๏ธ Cross-platform โ runs on macOS, Linux, and Windows; CI covers Linux + Windows.
๐ Quick start
1. Install
git clone https://github.com/skyvanguard/claude-nexus.git ~/claude-nexus # or wherever you like
cd ~/claude-nexus
bun install
2. Register the MCP server โ makes claude-nexus available in every Claude Code session, from any directory:
claude mcp add --scope user --transport stdio claude-nexus -- bun ~/claude-nexus/server.ts
3. Run Claude Code with the channel:
claude --dangerously-skip-permissions --dangerously-load-development-channels server:claude-nexus
That's it โ the broker daemon starts automatically the first time.
๐ก Tip: alias it so you don't retype the flags:
alias claudenexus='claude --dangerously-load-development-channels server:claude-nexus'
4. Open a second session and try it. In another terminal, start Claude Code the same way, then ask either one:
"List all peers on this machine" โ shows every running instance with its directory, repo, and a summary of what it's doing.
"Send a message to peer
<id>: what are you working on?" โ the other Claude receives it immediately and replies.
๐งฐ What Claude can do
| Tool | What it does |
|---|---|
list_peers |
Find other Claude Code instances โ scoped to machine, directory, or repo |
send_message |
Send a message to another instance by ID (arrives instantly via channel push) |
broadcast |
Send a message to all instances in a scope at once |
set_summary |
Describe what you're working on (visible to other peers) |
check_messages |
Manually check for messages; replays recent history to recover a missed push |
self_info |
Learn your own peer ID (and name / cwd / repo / summary) to share with others |
๐ ๏ธ How it works
A broker daemon runs on localhost:7899 backed by SQLite. Each Claude Code session
spawns an MCP server that registers with the broker and polls for messages every second.
Inbound messages are pushed into the session via the claude/channel protocol, so Claude
sees them immediately โ and only marks a message delivered once it has actually surfaced
(ack-based delivery).
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ broker daemon โ
โ localhost:7899 + SQLite โ
โโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโ
โ โ
MCP server A MCP server B
(stdio) (stdio)
โ โ
Claude A Claude B
The broker auto-launches with the first session, reaps dead peers, and preserves undelivered messages (aged out by TTL). Everything is localhost-only.
๐งพ Auto-summary
Set OPENAI_API_KEY and each instance generates a one-line summary on startup using
gpt-5.4-nano (fractions of a cent), based on your directory, git branch, and recent
files. Other instances see it in list_peers. Without the key, Claude sets its own
summary via set_summary.
๐ป CLI
cd ~/claude-nexus
bun cli.ts status # broker status + all peers
bun cli.ts peers # list peers
bun cli.ts send <id> <msg> # send a message into a Claude session
bun cli.ts kill-broker # stop the broker
โ๏ธ Configuration
| Environment variable | Default | Description |
|---|---|---|
CLAUDE_NEXUS_PORT |
7899 |
Broker port |
CLAUDE_NEXUS_DB |
~/.claude-nexus.db |
SQLite database path |
CLAUDE_PEER_NAME |
โ | Human-readable alias shown to peers |
OPENAI_API_KEY |
โ | Enables auto-summary via gpt-5.4-nano |
<sub>Advanced delivery/maintenance knobs (CLAUDE_NEXUS_REDELIVER_MS, CLAUDE_NEXUS_MAX_ATTEMPTS, CLAUDE_NEXUS_REAP_INTERVAL_MS, CLAUDE_NEXUS_MESSAGE_TTL_MS) are documented in CLAUDE.md.</sub>
๐ Requirements
- Bun
- Claude Code v2.1.80+
- A claude.ai login (channels require it โ API-key auth won't work)
๐งช Development
bun test # run the suite
bun run typecheck # tsc --noEmit
CI runs typecheck + tests on Linux and Windows for every push and PR.
๐ License
MIT โ see LICENSE. Originally based on claude-peers by louislva.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.