Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

C2C

БесплатноНе проверен

LAN-based Claude Code agent collaboration via mDNS discovery and WebSocket messaging.

GitHubEmbed

Описание

LAN-based Claude Code agent collaboration via mDNS discovery and WebSocket messaging.

README

c2c

npm version license

Connect your Claude Code instances. Let them talk to each other.

c2c is an MCP server that connects multiple Claude Code sessions over your local network. When one agent changes an API, the other one knows. When one agent has a question, it can ask.

No cloud. No config server. Just mDNS discovery and WebSocket on your LAN.

Quick Start | Tools | How It Works | 中文


Quick Start

npx c2c-mcp init

That's it. Run this in each project directory where you use Claude Code. The two instances will discover each other automatically.


What Happens Next

Once two c2c nodes find each other on the network, you'll see a pairing prompt:

A device named "backend-bob" wants to pair with your Claude instance.
If approved, it will be able to read your current task, see your recent
file changes, and exchange messages with you.
Only approve devices you recognize and trust.

Approve it, and your agents are connected. Trusted peers are remembered -- they'll auto-connect next time.


What Your Agents Can Do

Share Intent

Each agent broadcasts what it's working on. Before your frontend agent changes a fetch call, it can check what the backend agent is doing to that endpoint.

See File Changes

File modifications are tracked in real time. When the backend agent refactors a route, the frontend agent sees the diff -- without pulling from git.

Send Messages

Agents can ask each other questions asynchronously:

"Hey, are you changing the /users response schema? I'm about to update the TypeScript interface on my end."

The other agent picks it up on its next turn and responds.


Tools Reference

Once c2c is active, Claude Code gets these tools:

Tool What it does
set_plan Broadcast your current task to all peers
ask_peer Send a message to another agent
check_messages Read incoming messages
sync_with_peer Pull a peer's current plan and recent file changes
list_peers See who's connected
approve_peer Accept a pairing request
reject_peer Decline a pairing request
list_trusted See all auto-trusted peers
untrust_peer Revoke trust and disconnect a peer

Setup Options

The One-Liner (Recommended)

npx c2c-mcp init

Detects your project directory, picks an available port, and registers the MCP server with Claude Code. Run it once per project.

Manual Setup

If you need more control:

claude mcp add c2c -s project -- npx c2c-mcp serve \
  --project /path/to/your/project \
  --name "frontend-alice" \
  --port 9100
Flag Description Default
--project Project directory to watch for file changes Current directory
--name Human-readable name for this node Directory name
--port WebSocket port for peer connections 9100
--ignore Extra glob patterns to ignore (repeatable) --

Remove

npx c2c-mcp remove

Collaboration Skill (Optional)

Copy skill/c2c-protocol.md to your Claude Code skills directory. This teaches Claude to automatically check messages at the start of each turn, announce its plan before working, and sync before modifying shared APIs.


How It Works

Machine A                              Machine B
┌──────────────┐                       ┌──────────────┐
│  Claude Code │                       │  Claude Code │
│      ▲       │                       │      ▲       │
│      │ stdio │                       │      │ stdio │
│      ▼       │                       │      ▼       │
│  ┌────────┐  │    mDNS discovery     │  ┌────────┐  │
│  │  c2c   │◄─┼───────────────────────┼─►│  c2c   │  │
│  │ server │  │    WebSocket link     │  │ server │  │
│  └────────┘  │                       │  └────────┘  │
└──────────────┘                       └──────────────┘
  1. Each c2c server broadcasts itself via mDNS (_c2c._tcp.local)
  2. When a peer appears, a WebSocket connection is established
  3. First-time peers go through a pairing approval flow
  4. Approved peers are saved to ~/.c2c/trusted_peers.json for auto-reconnect
  5. State is shared on demand -- pull-based, not continuous sync

Works across machines on the same network, or between two terminals on the same machine (just use different ports).


Security

  • First-connect approval: New peers always require explicit user confirmation
  • Trust persistence: Approved peers are remembered; revoke anytime with untrust_peer
  • LAN only: mDNS discovery is limited to your local network
  • No cloud relay: All traffic stays on your network

Development

git clone https://github.com/CLCK0622/c2c-mcp.git
cd c2c-mcp
pnpm install
pnpm build
pnpm test

License

MIT

from github.com/clck0622/c2c-mcp

Установить C2C в Claude Desktop, Claude Code, Cursor

Рекомендуется · одна команда, все IDE
unyly install c2c

Ставит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.

Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh

Или настроить вручную

Выполни в терминале:

claude mcp add c2c -- npx -y c2c-mcp

Пошаговые гайды: как установить C2C

FAQ

C2C MCP бесплатный?

Да, C2C MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для C2C?

Нет, C2C работает без API-ключей и переменных окружения.

C2C — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить C2C в Claude Desktop, Claude Code или Cursor?

Открой C2C на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare C2C with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development