claude-nexus

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.

Category
Visit Server

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.

CI Platforms Runtime License

</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-nexus is a revived, privately-maintained fork of the (now unmaintained) claude-peers project, focused on fixing the reliability and cross-platform bugs the original left open. See ROADMAP.md for the full plan and what's shipped.


โœจ Highlights

  • โšก Instant delivery โ€” messages are pushed into a peer's session via the claude/channel protocol, not polled by hand.
  • ๐Ÿ“ก Scoped discovery & broadcast โ€” reach one peer or all peers in a machine, directory, or repo scope (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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured