# claude-code-bridge [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/constripacity/Claude-Bridge  
**GitHub Stars:** 15  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/claude-code-bridge

## Description
MCP relay so Claude Code agents on different machines can exchange messages via named channels.

## Tools
Capabilities this server exposes over MCP:

- **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

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "claude-code-bridge": {
    "command": "uvx",
    "args": ["claude-code-bridge"]
  }
}
```

## Documentation

## What claude-code-bridge MCP server does

The claude-code-bridge MCP server provides a self-hosted message bus for independent coding-agent sessions. Agents communicate through named channels, which can carry ordinary text or structured protocol-v1 messages. The relay does not invoke a model and does not decide whether a received instruction should be executed; it only transports and stores messages and tasks.

Durable history lets a client recover after a restart. Consumer identities and cursors support at-least-once message processing, while idempotency keys make send retries safe against duplicate delivery. The system can run on one machine or across a private LAN or tailnet, so participating agents do not need a shared filesystem or remote shell access.

## How it works

The relay writes messages and live-notification records to SQLite in one transaction. Its HTTP processes poll the durable outbox and publish events to connected dashboard, terminal UI, or custom listeners. Channel history remains authoritative after restarts.

MCP clients can connect through Streamable HTTP at `/mcp`, or through a local subprocess started with `claude-bridge --stdio`. Existing configurations can use the legacy HTTP+SSE endpoints at `/sse` and `/messages/`. Channel event SSE is intended for dashboards, the terminal UI, and custom listeners rather than MCP clients. A JSON API is also available for scripts and integrations.

Message consumers read bounded pages with cursors, wait for new messages without rapid polling, and acknowledge progress by advancing a channel-scoped cursor. Acknowledgement provides at-least-once processing semantics; it does not make arbitrary external side effects exactly once.

## Setup and configuration

Install the `claude-code-bridge` distribution with pip. The executable and Python package use the `claude-bridge` name. Add the optional `tui` extra to install the terminal interface, or install directly from a source checkout with the development extras.

Running `claude-bridge` starts local-only HTTP mode on `127.0.0.1:8765`; clients use the `/mcp` path and the dashboard is available at the root URL. Running `claude-bridge --stdio` starts a local transport without opening a network listener.

For remote use, bind the service explicitly, provide one or more trusted host values, and set `CLAUDE_BRIDGE_AUTH_TOKEN`. Trusted hosts control accepted HTTP Host names, while the bearer token controls access to protected endpoints. An explicit `--allow-unauthenticated-network` option exists for private test networks. TLS options, an HTTPS reverse proxy, or an encrypted overlay network should protect sensitive traffic on untrusted networks.

The container image stores SQLite data under `/data`. Network containers must receive their trusted-host and authentication configuration.

## Tools and capabilities

The claude-code-bridge MCP server exposes tools for both messaging and task queues:

- `bridge_send` sends legacy text or protocol-v1 messages and supports idempotent retries.
- `bridge_receive`, `bridge_wait`, and `bridge_ack` read messages, wait for arrivals, and advance consumer cursors.
- `bridge_channels`, `bridge_ping`, and `bridge_status` provide channel, health, capability, and recent-activity information.
- `bridge_clear` removes all messages and tasks from a channel.
- `bridge_enqueue` adds an exclusive task to a channel queue.
- `bridge_claim` atomically claims a task with a lease and can long-poll.
- `bridge_complete` finishes a leased task using its lease token.
- `bridge_fail` requeues a failed task with backoff or moves it to a dead-letter state.
- `bridge_tasks` reports queue status counts and task details.

Tool results include structured content for compatible MCP clients and readable text for compatibility.

## Limitations and notes

The project is a transport, not an autonomous orchestrator. Receiving a message does not authorize an agent to run it. The repository identifies the current source tree as `1.2.0.dev1`, a development build beyond the latest stable PyPI release, so deployments replacing a stable version should review the changelog and migration guidance. The documented examples name Claude Code and Codex, but the repository notes that its CI checks MCP protocol behavior rather than launching vendor clients.

_Full upstream README: https://allmcps.com/mcp/claude-code-bridge/readme_

