
claude-peers-mcp-inter-instance-messaging
Enable Claude Code instances to discover and message each other across different terminal sessions and projects
- Installs
- 228
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/mcp-skills --skill claude-peers-mcp-inter-instance-messaging- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads claude-peers-mcp-inter-instance-messaging automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
claude-peers MCP Inter-Instance Messaging
Skill by ara.so — MCP Skills collection.
claude-peers is an MCP server that enables Claude Code instances to discover each other and exchange messages in real-time. When running multiple Claude sessions across different projects, any instance can find others, see what they're working on, and send messages that arrive instantly via the channel protocol.
Architecture
A broker daemon runs on localhost:7899 with SQLite storage. Each Claude Code session spawns an MCP server that:
- Registers with the broker on startup
- Polls for messages every second
- Pushes inbound messages to Claude via
claude/channelprotocol - Auto-cleans dead peers
┌───────────────────────────┐
│ Broker Daemon │
│ localhost:7899 + SQLite │
└──────┬───────────────┬────┘
│ │
MCP Server A MCP Server B
(stdio) (stdio)
│ │
Claude A Claude B
Installation
1. Clone and Install Dependencies
git clone https://github.com/louislva/claude-peers-mcp.git ~/claude-peers-mcp
cd ~/claude-peers-mcp
bun install
2. Register MCP Server (User Scope)
claude mcp add --scope user --transport stdio claude-peers -- bun ~/claude-peers-mcp/server.ts
This makes claude-peers available in every Claude Code session from any directory.
3. Start Claude Code with Channel Support
claude --dangerously-skip-permissions --dangerously-load-development-channels server:claude-peers
Recommended: Create a shell alias:
# Add to ~/.bashrc or ~/.zshrc
alias claudepeers='claude --dangerously-skip-permissions --dangerously-load-development-channels server:claude-peers'
4. Verify Installation
Open a second terminal with the same command. In either Claude session, ask:
List all peers on this machine
You should see both instances listed with their working directories, git repos, and summaries.
Core Tools
list_peers
Discover other Claude Code instances.
Parameters:
scope(required):"machine"|"directory"|"repo"machine: All peers on localhostdirectory: Only peers in current working directoryrepo: Only peers in the same git repository
Example usage:
// As Claude would call it
{
"name": "list_peers",
"arguments": {
"scope": "machine"
}
}
Returns:
{
"peers": [
{
"id": "abc123",
"cwd": "/Users/dev/poker-engine",
"gitRepo": "poker-engine",
"gitBranch": "feature/ai-opponent",
"summary": "Building AI poker opponent logic",
"lastSeen": "2026-05-16T12:34:56Z"
},
{
"id": "def456",
"cwd": "/Users/dev/eel",
"gitRepo": "eel",
"gitBranch": "main",
"summary": "Refactoring database layer",
"lastSeen": "2026-05-16T12:35:12Z"
}
]
}
send_message
Send a message to another instance by ID. The message arrives instantly via channel push.
Parameters:
targetPeerId(required): Peer ID fromlist_peersmessage(required): Message content (string)
Example usage:
{
"name": "send_message",
"arguments": {
"targetPeerId": "abc123",
"message": "What files are you currently editing? I need to avoid conflicts."
}
}
Returns:
{
"success": true,
"sentAt": "2026-05-16T12:36:00Z"
}
The recipient Claude immediately receives:
📨 Message from peer def456 (eel):
What files are you currently editing? I need to avoid conflicts.
set_summary
Describe what you're working on. This appears when other peers call list_peers.
Parameters:
summary(required): Brief description of current work (string)
Example usage:
{
"name": "set_summary",
"arguments": {
"summary": "Implementing OAuth2 authentication flow"
}
}
check_messages
Manually poll for messages. Usually unnecessary since channel protocol auto-delivers messages.
Parameters: None
Example usage:
{
"name": "check_messages",
"arguments": {}
}
Configuration
Set environment variables before starting Claude Code:
# Broker port (default: 7899)
export CLAUDE_PEERS_PORT=7899
# SQLite database path (default: ~/.claude-peers.db)
export CLAUDE_PEERS_DB="$HOME/.claude-peers.db"
# Enable auto-summary generation on startup (optional)
export OPENAI_API_KEY="your-api-key-here"
Auto-Summary Feature
If OPENAI_API_KEY is set, each instance generates a brief summary on startup using gpt-5.4-nano (costs <$0.01 per summary). The summary analyzes:
- Current working directory
- Git branch and recent commits
- Recently modified files
- Project type and structure
Without the API key, Claude must set summaries manually via set_summary.
CLI Usage
Interact with the broker from the command line:
cd ~/claude-peers-mcp
# Show broker status and all peers
bun cli.ts status
# List all peers
bun cli.ts peers
# Send a message to a specific peer
bun cli.ts send abc123 "Deploy to staging when ready"
# Stop the broker daemon
bun cli.ts kill-broker
Common Patterns
Cross-Project Coordination
Scenario: Working on frontend and backend in separate terminals.
[Terminal 1 - frontend]
User: "List peers in this repo"
Claude: [shows backend peer]
User: "Send a message to peer xyz: Has the /api/users endpoint schema changed?"
[Terminal 2 - backend]
Claude: "📨 Message from peer abc (frontend): Has the /api/users endpoint schema changed?"
Claude: "I'll check and respond..."
User: "Send back: Yes, added 'avatarUrl' field. Updated docs in PR #123"
Avoiding Merge Conflicts
User: "Before editing auth.ts, check if any peers are working on it"
Claude: [calls list_peers with scope "repo"]
Claude: "Found peer xyz working on 'Implementing OAuth2 authentication flow'"
Claude: [sends message] "Are you currently editing auth.ts?"
Status Broadcasting
User: "Set summary to: Deploying v2.1 to production - don't push to main"
Claude: [calls set_summary]
Claude: "Summary updated. Other peers will see this warning."
Debugging Across Services
[Terminal 1 - API server]
User: "List all peers"
Claude: [shows worker service peer]
User: "Send message: Can you check your logs around 12:30 PM? API got 500s from your service"
[Terminal 2 - worker service]
Claude: "📨 Received message about 500 errors"
Claude: [checks logs] "Found timeout exceptions at 12:31 PM"
User: "Send response with the stack trace"
Troubleshooting
Broker Won't Start
Symptom: MCP server fails to connect on startup.
Solution:
# Check if port is in use
lsof -i :7899
# Kill existing broker
bun ~/claude-peers-mcp/cli.ts kill-broker
# Manually start broker to see errors
cd ~/claude-peers-mcp
bun broker.ts
Peers Not Showing Up
Check registration:
bun ~/claude-peers-mcp/cli.ts status
Verify Claude Code version:
claude --version # Must be v2.1.80+
Ensure channel support is enabled:
# Must include both flags
claude --dangerously-skip-permissions --dangerously-load-development-channels server:claude-peers
Messages Not Arriving
Symptom: send_message succeeds but recipient doesn't see it.
Check authentication:
- Channels require
claude.ailogin (not API key auth) - Run
claude loginif needed
Manual fallback:
// Recipient can poll manually
{
"name": "check_messages",
"arguments": {}
}
Database Corruption
Reset the database:
rm ~/.claude-peers.db
# Broker will recreate on next startup
Port Conflicts
Change the port:
export CLAUDE_PEERS_PORT=8899
claude --dangerously-skip-permissions --dangerously-load-development-channels server:claude-peers
Requirements
- Bun: Install from bun.sh
- Claude Code: v2.1.80 or later
- Authentication: Must be logged in via
claude.ai(channels don't work with API key auth)
Security Notes
- Localhost only: Broker binds to
127.0.0.1— no external access - No authentication: Any local process can connect to the broker
- Message content: Not encrypted (relies on localhost security boundary)
- Auto-cleanup: Dead peers removed after 60 seconds of inactivity
Example: Multi-Service Development Workflow
// Terminal 1: API service
// Set context
{
"name": "set_summary",
"arguments": {
"summary": "API v3 migration - refactoring user endpoints"
}
}
// Find frontend peer
{
"name": "list_peers",
"arguments": {
"scope": "repo"
}
}
// Returns: peer "frontend-abc" in /web directory
// Coordinate breaking changes
{
"name": "send_message",
"arguments": {
"targetPeerId": "frontend-abc",
"message": "Breaking change incoming: /api/v3/users will require 'tenantId' in all requests. ETA 15 minutes."
}
}
// Terminal 2: Frontend
// Receives message via channel
// Response:
{
"name": "send_message",
"arguments": {
"targetPeerId": "api-xyz",
"message": "Acknowledged. I'll add tenantId to the auth context. Can you send example request body when ready?"
}
}
FAQ
What does the claude-peers-mcp-inter-instance-messaging skill do?
Enable Claude Code instances to discover and message each other across different terminal sessions and projects
How do I install claude-peers-mcp-inter-instance-messaging?
Run npx skills add https://github.com/reason-machines/mcp-skills --skill claude-peers-mcp-inter-instance-messaging in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/claude-peers-mcp-inter-instance-messaging/ (personal) or .claude/skills/claude-peers-mcp-inter-instance-messaging/ (project).
Which AI agents can use claude-peers-mcp-inter-instance-messaging?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is claude-peers-mcp-inter-instance-messaging safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains claude-peers-mcp-inter-instance-messaging?
It is published by reason-machines in reason-machines/mcp-skills. It has 228 recorded installs.
More from reason-machines/mcp-skills
codebase-memory-mcp-intelligence
reason-machines/mcp-skills
High-performance code intelligence MCP server that indexes codebases into knowledge graphs for structural queries, call traces, and architecture analysis
playwright-mcp-server
reason-machines/mcp-skills
Browser automation MCP server using Playwright's accessibility tree for LLM-friendly web interaction
tradingview-mcp-assistant
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
lanhu-mcp-collaboration
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
chrome-devtools-mcp-automation
reason-machines/mcp-skills
Expert guidance for Chrome DevTools MCP server - browser automation, debugging, and performance analysis for AI agents
github-mcp-server
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available