MCP relay so Claude Code agents on different machines can exchange messages via named channels.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A local-first, cross-machine message bus for independent coding agents.
Claude Bridge lets coding-agent sessions on different machines exchange ordered messages through named channels. The relay is self-hosted, uses SQLite by default, and exposes MCP, a small JSON API, a dashboard, and a terminal UI.
It does not call a model API and does not require agents to share a filesystem or process. Claude Code motivated the project, but the core is MCP-based and is not coupled to Anthropic.
Forward-build notice: this source tree identifies as
1.2.0.dev1. It is a development build beyond the latest stable PyPI release. Review the changelog and 0.9-to-1.2 migration guide before replacing a stable deployment.
Claude Bridge is a transport, not an autonomous orchestrator. Receiving a message never authorizes an agent to execute it.
| Interface | Path or command | Purpose |
|---|---|---|
| MCP Streamable HTTP | /mcp | Recommended remote MCP transport |
| MCP stdio | claude-bridge --stdio | Local subprocess transport |
| Legacy MCP HTTP+SSE | /sse and /messages/ | Existing configurations during migration |
| Channel event SSE | /events/channel/<channel> | Dashboard, TUI, and custom listeners; not MCP |
| JSON API | /api/* | Browser, scripts, and integrations |
The automated suite performs a real MCP SDK handshake against /mcp. Vendor
clients are not launched in CI. See the evidence-based
compatibility matrix.
Messages and live-notification records are committed to SQLite in one transaction. HTTP processes poll that durable outbox (500 ms by default), so a write from a separate stdio process is propagated to connected dashboard/TUI event streams. Durable channel history remains authoritative across restarts.
Install the terminal UI as well:
The PyPI distribution is named claude-code-bridge because claude-bridge
was already assigned to an unrelated project. The command and Python package
remain claude-bridge and claude_bridge.
From a source checkout:
Local-only HTTP mode is the default:
This listens on 127.0.0.1:8765. Open http://127.0.0.1:8765/ for the
dashboard or connect an MCP client to http://127.0.0.1:8765/mcp.
Local stdio mode does not open a network listener:
Network binding is deliberately fail-closed. Supply the address clients put in their URL as a trusted host and require a token:
Here 100.64.0.10 might be the server's tailnet address. A DNS deployment
would use a value such as bridge.example.internal. --trusted-host values
are hostnames or IP addresses, without a URL scheme or path, and the option is
repeatable.
Two independent checks are required:
--trusted-host controls which HTTP Host names are accepted; andFor a deliberately unauthenticated private test network, replace the token
with --allow-unauthenticated-network. That is an explicit risk acceptance,
not the recommended production setup.
Use --tls-cert and --tls-key, an HTTPS reverse proxy, or an encrypted
overlay network before sending sensitive content across an untrusted network.
See the security policy
for the complete trust model.
The official image also fails closed. A network deployment must provide its trusted host and authentication policy:
The SQLite database is stored in /data. Release images use exact and
major/minor tags; edge tracks main.
Remote Streamable HTTP:
Local stdio:
For a protected remote endpoint, attach the matching Authorization header
using the option supported by the installed Claude Code version. Legacy
configurations can continue to target /sse with --transport sse while they
migrate.
Local stdio in ~/.codex/config.toml:
Remote Streamable HTTP:
These examples follow the transports each client documents. The repository's CI verifies MCP protocol behavior, not a full vendor-client launch. See compatibility matrix before making support claims.
| Tool | Purpose |
|---|---|
bridge_send | Send legacy text or a protocol-v1 message; supports idempotent retries |
bridge_receive | Read a bounded page using a message cursor or durable consumer cursor |
bridge_wait | Wait up to 55 seconds for new messages without rapid polling |
bridge_ack | Monotonically advance a consumer's channel-scoped cursor |
bridge_channels | List active channels and counts |
bridge_ping | Check bridge health and capabilities |
bridge_status | Summarize recent activity across channels |
bridge_clear | Delete every message (and task) in one channel |
bridge_enqueue | Add a task to a channel's work queue (exclusive; claimed once) |
bridge_claim | Atomically claim the next task with a lease; long-poll with wait_seconds |
bridge_complete | Mark a claimed task done, fenced by its lease_token |
bridge_fail | Fail a claimed task β requeue with backoff, or dead-letter |
bridge_tasks | Inspect a channel's queue: per-status counts and a task list |
Tool results include structured data for clients that support MCP structured content and a readable text representation for compatibility.
The orchestrator sends a structured task with a stable retry key:
The worker waits using its persisted consumer identity:
After applying the task successfully, it advances its cursor:
It can then send a result to a return channel using the same thread_id and
correlation_id. Acknowledgement supplies at-least-once processing semantics;
it does not make arbitrary external side effects exactly once.
The complete envelope, retry, cursor, and retention contract is documented in protocol reference.
Messages fan out β every consumer cursor sees every message. A task queue is the opposite: each task is claimed by exactly one worker. Point a fleet of worker agents at a channel and they share the work without ever double-processing it.
The orchestrator enqueues tasks (dedup-safe with an idempotency key):
Each worker claims the next task, holding a lease (a visibility timeout). Two
workers never get the same task; wait_seconds long-polls an empty queue:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/claude-code-bridge)<a href="https://allmcps.com/mcp/claude-code-bridge"><img src="https://allmcps.com/api/badge/claude-code-bridge?style=directory" alt="Claude Code Bridge on AllMCPs" /></a>