Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Claude Peers Mcp

BSecurity

Enable multiple Claude Code instances to discover each other and exchange messages in real-time via a local broker daemon and MCP server.

81 stars
0 votes
0 copies
0 views
Added 9/19/2026
ai-agentsshellbashsqlrefactoringgitapidatabasefrontendbackend

Works with

claude codeterminalcliapimcp

Security Analysis

B75/100
criticalModifies startup scripts or system services for persistence
criticalModifies startup scripts or system services for persistence

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add reason-machines/trending-skills --skill claude-peers-mcp --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Claude Peers Mcp?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Claude Peers Mcp
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/reason-machines-claude-peers-mcp/badge)](https://www.skillsdirectory.com/skills/reason-machines-claude-peers-mcp)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: claude-peers-mcp
description: Enable multiple Claude Code instances to discover each other and exchange messages in real-time via a local broker daemon and MCP server.
triggers:
  - "set up claude peers"
  - "let my claude instances talk to each other"
  - "install claude-peers mcp"
  - "send messages between claude sessions"
  - "multi-agent claude communication"
  - "list all running claude instances"
  - "claude peers messaging setup"
  - "coordinate multiple claude code sessions"
---

# claude-peers-mcp

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.

claude-peers is an MCP server that lets multiple Claude Code instances running on the same machine discover each other and exchange messages in real-time. A local broker daemon (SQLite + HTTP on `localhost:7899`) handles peer registration and message routing; each session's MCP server pushes inbound messages directly into the Claude channel so they appear instantly.

## Installation

### 1. Clone and install dependencies

```bash
git clone https://github.com/louislva/claude-peers-mcp.git ~/claude-peers-mcp
cd ~/claude-peers-mcp
bun install
```

### 2. Register as a global MCP server

```bash
claude mcp add --scope user --transport stdio claude-peers -- bun ~/claude-peers-mcp/server.ts
```

Adjust the path if you cloned elsewhere.

### 3. Launch Claude Code with the channel enabled

```bash
claude --dangerously-skip-permissions --dangerously-load-development-channels server:claude-peers
```

Add a shell alias to avoid typing it every time:

```bash
# ~/.bashrc or ~/.zshrc
alias claudepeers='claude --dangerously-load-development-channels server:claude-peers'
```

The broker daemon starts automatically on first use. No manual daemon management needed.

## Requirements

- [Bun](https://bun.sh) runtime
- Claude Code v2.1.80+
- claude.ai login (channels require it — API key auth does **not** work)

## Architecture

```
                    ┌───────────────────────────┐
                    │  broker daemon            │
                    │  localhost:7899 + SQLite  │
                    └──────┬───────────────┬────┘
                           │               │
                      MCP server A    MCP server B
                      (stdio)         (stdio)
                           │               │
                      Claude A         Claude B
```

- Each Claude Code session spawns its own `server.ts` MCP process over stdio
- MCP servers register with the broker and poll every second
- Inbound messages are pushed via the `claude/channel` protocol for instant delivery
- The broker auto-cleans dead peers and is localhost-only

## MCP Tools Reference

| Tool | Description |
|---|---|
| `list_peers` | Discover other Claude Code instances; scope: `machine`, `directory`, or `repo` |
| `send_message` | Send a message to a peer by ID — delivered instantly via channel push |
| `set_summary` | Set a description of what this instance is working on |
| `check_messages` | Manually poll for messages (fallback without channel mode) |

### Example prompts to Claude

```
List all peers on this machine
```

```
Send 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 peers
```

## CLI Usage

Inspect and interact with the broker directly from the terminal:

```bash
cd ~/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
```

## Configuration

Set these environment variables before starting Claude Code:

| Variable | Default | Description |
|---|---|---|
| `CLAUDE_PEERS_PORT` | `7899` | Port the broker listens on |
| `CLAUDE_PEERS_DB` | `~/.claude-peers.db` | Path to the SQLite database |
| `OPENAI_API_KEY` | — | Enables auto-summary via `gpt-4o-mini` on startup |

```bash
export CLAUDE_PEERS_PORT=7899
export CLAUDE_PEERS_DB=~/.claude-peers.db
export OPENAI_API_KEY=$OPENAI_API_KEY  # optional — enables auto-summary
```

## Auto-Summary Feature

With `OPENAI_API_KEY` set, each instance generates a brief summary on startup describing what you're likely working on (based on working directory, git branch, recent files). Other peers see this in `list_peers` output. Without the key, Claude sets its own summary via `set_summary`.

## Common Patterns

### Cross-project coordination

Start two sessions in different project directories:

```bash
# Terminal 1 — in ~/projects/backend
claudepeers

# Terminal 2 — in ~/projects/frontend
claudepeers
```

Ask Claude in Terminal 1:
```
List peers scoped to machine, then ask the peer in the frontend project what API endpoints it needs
```

### Scope-filtered peer discovery

```
List peers scoped to repo
```
Shows only instances running in the same git repository — useful when you have worktrees or split terminals on the same codebase.

### Scripted message injection via CLI

```bash
# 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"
```

### Polling fallback (no channel mode)

If you launch without `--dangerously-load-development-channels`, Claude can still receive messages by calling `check_messages` explicitly:

```
Check for any new peer messages
```

## Troubleshooting

**Broker not starting**
```bash
# 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 Code
```

**Peers not appearing in `list_peers`**
- Ensure both sessions were started with `--dangerously-load-development-channels server:claude-peers`
- Confirm both use the same `CLAUDE_PEERS_PORT` (default `7899`)
- Run `bun cli.ts status` to verify the broker sees both registrations

**Messages not arriving instantly**
- Channel push requires claude.ai login; API key auth won't work
- Fall back to `check_messages` tool if channels are unavailable

**Auto-summary not generating**
- Verify `OPENAI_API_KEY` is exported in the shell where Claude Code was launched: `echo $OPENAI_API_KEY`
- The feature uses `gpt-4o-mini`; confirm your key has access

**Database issues**
```bash
# Reset the database entirely (all peers/messages lost)
rm ~/.claude-peers.db
bun ~/claude-peers-mcp/cli.ts kill-broker
```

**MCP server not found after registration**
```bash
# Verify registration
claude mcp list

# Re-register if missing
claude mcp add --scope user --transport stdio claude-peers -- bun ~/claude-peers-mcp/server.ts
```

Attribution

reason-machinesreason-machines
View sourceMore from reason-machines →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3331 votes

catchup

Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.

611 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →