claude-bridge-mcp
claude-bridge-mcp
Use your Claude Code MAX/PRO subscription from anywhere.
An MCP server that exposes your local Claude Code CLI over HTTP+SSE, so any MCP-compatible client — OpenClaw, Claude Desktop, or your own agents — can use your Claude Code subscription remotely.
Your PC (Claude MAX/PRO) Remote Machine
┌──────────────────────┐ ┌──────────────────┐
│ claude-bridge-mcp │◄────────────►│ OpenClaw Agent │
│ :3100/sse │ HTTP+SSE │ Claude Desktop │
│ │ (Tailscale │ Custom MCP app │
│ Spawns Claude CLI ──┤ or VPN) └──────────────────┘
│ Uses YOUR sub ─────┤
└──────────────────────┘
Your $100/mo MAX or $200/mo PRO → accessible from any machineRequirements
Node.js 18+
Claude Code CLI installed and authenticated (
claudecommand in PATH) — install guideAn active Claude Code MAX ($100/mo) or PRO ($200/mo) subscription
Quick Start
# Run directly (no install needed)
npx claude-bridge-mcp
# Or install globally
npm install -g claude-bridge-mcp
claude-bridge-mcpThe server starts on http://0.0.0.0:3100. Verify:
curl http://localhost:3100/healthConnect from OpenClaw
Add the bridge as an MCP server in your ~/.openclaw/openclaw.json:
{
"mcpServers": {
"claude-bridge": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://<your-pc-ip>:3100/sse"]
}
}
}Replace <your-pc-ip> with your PC's IP address. If using Tailscale, use your Tailscale IP (tailscale ip -4).
Now your OpenClaw agent can use claude_execute, claude_query, claude_read_file, and claude_git_status — all powered by your Claude Code subscription.
Connect from Claude Desktop
Add to your Claude Desktop MCP config (claude_desktop_config.json):
{
"mcpServers": {
"claude-bridge": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://<your-pc-ip>:3100/sse"]
}
}
}Available Tools
Tool | Description |
| Execute a task using Claude Code. Full coding capabilities: read/write files, run commands, git operations. |
| Ask Claude Code a question (read-only, fast). Great for code analysis and explanations. |
| Read a file from the PC filesystem. |
| Get git status: branch, changes, and recent commits. |
Configuration
All configuration is via environment variables. Copy .env.example to .env:
cp .env.example .envVariable | Default | Description |
|
| Bind address |
|
| Server port |
| (none) | Bearer token for authentication. If set, all requests (except |
| (empty = all) | Comma-separated IP allowlist. Empty means all IPs allowed. Localhost is always allowed. |
| (empty = cwd) | Comma-separated directory allowlist. Empty defaults to the current working directory. |
|
| Execution timeout in ms |
|
| Max concurrent Claude CLI executions |
|
| Queue wait timeout in ms |
Security
The bridge includes multiple security layers:
IP Allowlist — Restrict access to specific IPs (e.g., your Tailscale network). Localhost always allowed.
Bearer Token Auth — Set
BRIDGE_API_TOKENfor token-based authentication.Directory Allowlist — Claude CLI can only access directories you explicitly allow.
Symlink Protection — Paths are resolved via
realpath()before checking the allowlist, preventing symlink traversal.Execution Queue — FIFO queue with configurable concurrency limits and timeout to prevent resource exhaustion.
Recommended setup for remote access:
# Use Tailscale for encrypted networking
BRIDGE_ALLOWED_IPS=100.x.y.z # Your remote machine's Tailscale IP
BRIDGE_API_TOKEN=your-secret # Additional auth layer
BRIDGE_ALLOWED_DIRS=/path/to/project1,/path/to/project2Endpoints
Endpoint | Method | Description |
| GET | SSE connection for MCP clients |
| POST | JSON-RPC message endpoint |
| GET | Health check (no auth required) |
| GET | Server metrics |
How It Works
Remote MCP client connects to
/sse(Server-Sent Events)Client sends tool calls via
/messages(JSON-RPC over HTTP)Bridge spawns
claudeCLI locally with your authenticated sessionResults stream back over SSE
The bridge uses the Model Context Protocol — the open standard for AI tool communication.
Supported Platforms
Runs anywhere Claude Code CLI and Node.js are available:
Platform | Notes |
Windows 10/11 | Full support |
macOS (Intel & Apple Silicon) | Full support |
Linux (Ubuntu, Debian, etc.) | Full support |
Linux VPS (AWS, DigitalOcean, etc.) | Run the bridge on any cloud VM |
Docker |
|
Mac Mini (headless server) | Great as an always-on bridge |
Termux (Android) | Set |
WSL2 | Full support |
Same-machine use: The bridge also works locally — useful for apps that only speak MCP but need Claude Code capabilities. Just connect to http://localhost:3100/sse.
Development
git clone https://github.com/0motionguy/claude-bridge-mcp.git
cd claude-bridge-mcp
npm install
npm run dev # Hot-reload development server
npm run build # Production buildLicense
MIT - see LICENSE
Built by ICM Motion for the OpenClaw community.