Loading...
Loading...
Enable multiple Claude Code instances to discover each other and exchange messages in real-time via a local broker daemon and MCP server.
npx skill4agent add aradotso/trending-skills claude-peers-mcpSkill by ara.so — Daily 2026 Skills collection.
localhost:7899git clone https://github.com/louislva/claude-peers-mcp.git ~/claude-peers-mcp
cd ~/claude-peers-mcp
bun installclaude mcp add --scope user --transport stdio claude-peers -- bun ~/claude-peers-mcp/server.tsclaude --dangerously-skip-permissions --dangerously-load-development-channels server:claude-peers# ~/.bashrc or ~/.zshrc
alias claudepeers='claude --dangerously-load-development-channels server:claude-peers' ┌───────────────────────────┐
│ broker daemon │
│ localhost:7899 + SQLite │
└──────┬───────────────┬────┘
│ │
MCP server A MCP server B
(stdio) (stdio)
│ │
Claude A Claude Bserver.tsclaude/channel| Tool | Description |
|---|---|
| Discover other Claude Code instances; scope: |
| Send a message to a peer by ID — delivered instantly via channel push |
| Set a description of what this instance is working on |
| Manually poll for messages (fallback without channel mode) |
List all peers on this machineSend a message to peer abc123: "what files are you editing right now?"Set your summary to: "refactoring the authentication module"Check for any new messages from peerscd ~/claude-peers-mcp
# Show broker status and all registered peers
bun cli.ts status
# List peers in a table
bun cli.ts peers
# Send a message into a specific Claude session
bun cli.ts send <peer-id> "your message here"
# Stop the broker daemon
bun cli.ts kill-broker| Variable | Default | Description |
|---|---|---|
| | Port the broker listens on |
| | Path to the SQLite database |
| — | Enables auto-summary via |
export CLAUDE_PEERS_PORT=7899
export CLAUDE_PEERS_DB=~/.claude-peers.db
export OPENAI_API_KEY=$OPENAI_API_KEY # optional — enables auto-summaryOPENAI_API_KEYlist_peersset_summary# Terminal 1 — in ~/projects/backend
claudepeers
# Terminal 2 — in ~/projects/frontend
claudepeersList peers scoped to machine, then ask the peer in the frontend project what API endpoints it needsList peers scoped to repo# Inject a task into a running Claude session from a shell script
PEER_ID=$(bun ~/claude-peers-mcp/cli.ts peers | grep 'backend' | awk '{print $1}')
bun ~/claude-peers-mcp/cli.ts send "$PEER_ID" "run the test suite and report failures"--dangerously-load-development-channelscheck_messagesCheck for any new peer messages# Check if something is already on port 7899
lsof -i :7899
# Kill a stuck broker and restart
bun ~/claude-peers-mcp/cli.ts kill-broker
# Then relaunch Claude Codelist_peers--dangerously-load-development-channels server:claude-peersCLAUDE_PEERS_PORT7899bun cli.ts statuscheck_messagesOPENAI_API_KEYecho $OPENAI_API_KEYgpt-4o-mini# Reset the database entirely (all peers/messages lost)
rm ~/.claude-peers.db
bun ~/claude-peers-mcp/cli.ts kill-broker# Verify registration
claude mcp list
# Re-register if missing
claude mcp add --scope user --transport stdio claude-peers -- bun ~/claude-peers-mcp/server.ts