Claude Code Bridge
MCP bridge connecting Claude Desktop, Claude Code CLI, and Chrome Extension. Skills, hooks, autonomous dev loops, and inter-agent communication.
Ask AI about Claude Code Bridge
Powered by Claude Β· Grounded in docs
I know everything about Claude Code Bridge. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Claude Code Bridge
Connect Claude Desktop, Claude Code CLI, and Chrome Extension into a unified agentic workflow.
The Claude Code Bridge is an MCP (Model Context Protocol) server that enables communication between Claude Desktop (Windows/Mac), Claude Code CLI (WSL/Linux/Mac), and the Claude Chrome Extension. It provides 7 tools for task delegation, inter-agent messaging, system management, and skill discovery.
Windows / Mac Host
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Claude Desktop App β
β (claude_desktop_config.json) β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β MCP Protocol (stdio)
β wsl.exe -e bash start.sh
ββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
βΌ
WSL2 / Linux / Mac
ββββββββββββββββββββββββββββββββββββββββββββββββ
β bridge/server.js (stdio MCP) β
β bridge/server-http.js (HTTP/SSE MCP) β
ββββββββ¬βββββββββββββββββββββ¬βββββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββ ββββββββββββββββββββββββ
β claude CLI β β agent-comms/ β
β (headless) β β - messages/ β
ββββββββββββββββ β - tasks/ β
ββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Chrome Extension (port 3899) β
β - Streamable HTTP (/mcp) β
β - Legacy SSE (/sse + /messages) β
β - Health (/health) β
ββββββββββββββββββββββββββββββββββββββββββββββββ
Features
- 7 MCP Tools: Task delegation, agent messaging, command execution, file reading, system status, skills inventory
- Dual Transport: stdio for Claude Desktop + HTTP/SSE for Chrome Extension
- Agent Message Board: Async JSON message passing between any Claude instance
- Ralph Autonomous Loop: Run Claude Code in a continuous development loop until task completion
- Custom Skills System: Extend Claude with markdown-based skill definitions
- Hooks System: Auto-sync memory to Weaviate RAG, session indexing, autonomous loop control
- Security: Command blocking, path sanitization, timeouts, buffer limits
Quick Start
Prerequisites
- Claude Code CLI installed (
npm install -g @anthropic-ai/claude-code) - Node.js 18+
- Claude Desktop (for stdio bridge) and/or Chrome Extension (for HTTP bridge)
1. Install the Bridge
git clone https://github.com/YOUR_USER/claude-code-bridge.git
cd claude-code-bridge/bridge
npm install
2. Configure Claude Desktop (stdio)
Edit your Claude Desktop config:
Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"claude-code-bridge": {
"command": "wsl.exe",
"args": ["-e", "bash", "/path/to/claude-code-bridge/bridge/start.sh"]
}
}
}
Mac/Linux (no WSL needed):
{ "mcpServers": { "claude-code-bridge": { "command": "node", "args": ["/path/to/claude-code-bridge/bridge/server.js"] } } }
Restart Claude Desktop.
3. Start HTTP Server (Chrome Extension)
# Foreground
bash bridge/start-http.sh
# Or as daemon
bash bridge/start-http-daemon.sh
Then configure the Chrome Extension MCP to connect to http://localhost:3899/sse (legacy) or http://localhost:3899/mcp (Streamable HTTP).
4. Test
From Claude Desktop, try:
Use the system_status tool to check WSL status
From Chrome Extension, check health:
curl http://localhost:3899/health
Tools Reference
| Tool | Description |
|---|---|
claude_code_task | Send a task to Claude Code CLI (headless mode). Supports workdir and max_turns. |
agent_post | Post a message to the shared agent message board. |
agent_read | Read recent messages with filtering by type and time. |
wsl_command | Execute a shell command (with security blocks). |
wsl_read_file | Read a file (with sensitive path blocking). |
system_status | Check memory, Docker, disk, and service status. |
list_installed_skills | Inventory of all installed skills, commands, agents, and plugins. |
Project Structure
claude-code-bridge/
βββ bridge/ # Core MCP servers
β βββ server.js # stdio transport (Claude Desktop)
β βββ server-http.js # HTTP/SSE transport (Chrome Extension)
β βββ package.json
β βββ start.sh # Launcher for stdio
β βββ start-http.sh # Launcher for HTTP
β βββ start-http-daemon.sh # Background daemon launcher
βββ skills/ # Custom skill system
β βββ README.md # How to create skills
β βββ examples/ # Example skill definitions
β βββ qa-webapp.md
β βββ sandbox.md
βββ hooks/ # Claude Code hooks
β βββ README.md # How hooks work
β βββ examples/
β βββ sync-memory-to-weaviate.py
β βββ session-end-hook.sh
β βββ ralph-stop-hook.sh
βββ ralph/ # Autonomous dev loop
β βββ ralph # CLI controller
β βββ PROMPT.template.md # Task prompt template
βββ config/ # Configuration templates
β βββ examples/
β βββ claude-desktop-config.json
β βββ settings.json
β βββ mcp.json
βββ docs/ # Documentation
β βββ SETUP.md # Full setup guide
β βββ TOOLS.md # Tool reference
β βββ ARCHITECTURE.md # Architecture deep dive
βββ README.md
175 Skills + 42 Commands Included
This repo ships with 175 open-source skills and 42 commands from the community:
| Collection | Count | Description |
|---|---|---|
Toolkit Skills (tk-*) | 35 | Expert knowledge: React, TypeScript, Docker, K8s, Security, etc. |
Agile Skills (ln-*) | 98 | Full Agile SDLC: planning, execution, QA, auditing, bootstrap |
Toolkit Commands (tk-*) | 42 | Git workflows, architecture, testing, security, DevOps |
| Example Skills | 2 | QA testing + Sandbox exploration |
# Install all at once
bash install-skills.sh
# Or selectively
bash install-skills.sh --toolkit
bash install-skills.sh --agile
bash install-skills.sh --commands
See the full Skills Catalog for descriptions of every skill.
Create your own skills
Skills are markdown files in ~/.claude/skills/. See skills/README.md.
# My Skill Name
## Trigger
- /my-skill
## Instructions
You are a specialist in [domain]. When triggered...
Ralph - Autonomous Dev Loop
Ralph enables Claude Code to work autonomously in a loop until a task is complete:
# Activate Ralph mode
./ralph/ralph start
# Run with a prompt
./ralph/ralph run "Fix all TypeScript errors in src/"
# Check status
./ralph/ralph status
# Stop manually
./ralph/ralph stop
See ralph/README.md for details.
Hooks
Hooks are scripts that run in response to Claude Code events:
| Hook | Trigger | Purpose |
|---|---|---|
sync-memory-to-weaviate.py | PostToolUse (Write/Edit) | Auto-sync memory files to Weaviate RAG |
session-end-hook.sh | Stop | Index session data |
ralph-stop-hook.sh | Stop | Control autonomous loop continuation |
Configure in ~/.claude/settings.json. See hooks/README.md.
Security
- Blocked commands:
rm -rf /,mkfs,dd, fork bombs,shutdown,reboot - Blocked file paths:
.ssh/,shadow,.env,credentials,secrets - Timeouts: Commands 120s max, Claude tasks 5min max
- Buffer limits: 5MB max output
- CORS: Enabled for Chrome Extension on HTTP server
Customization
Add your own tools
Edit bridge/server.js or bridge/server-http.js to add custom tools. Follow the existing patterns.
Environment-specific paths
The bridge uses /root/ paths by default. Update these for your environment:
WORKSPACEin server.js/server-http.js- Skill paths in
list_installed_skills - Start scripts
Installing on Another PC
For a step-by-step guide to set everything up on a new machine, see docs/INSTALL-ON-ANOTHER-PC.md (in Spanish).
License
MIT
Credits
- Claude Code by Anthropic
- MCP SDK for the protocol layer
- Ralph concept inspired by Geoffrey Huntley's autonomous loop technique
