claude-code-bridge

mcp
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 6 GitHub stars
Code Gecti
  • Code scan — Scanned 4 files during light audit, no dangerous patterns found
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Bridge Claude.ai to your local Claude Code CLI. Control your local claude code instance from your phone or any browser.

README.md

Claude Code Bridge

[!IMPORTANT]
Archived — superseded by Claude Code's own remote control.

Anthropic shipped this natively: Claude Code sessions can now be driven from
claude.ai and the mobile apps, without a tunnel, an MCP server or a machine of
your own to keep running. Use that instead.

The code here still works and stays up for reference, but it is not maintained.

License: MIT
Python 3.10+
MCP

Bridge Claude.ai to your local Claude Code CLI. Control your laptop from your phone or any browser.

How It Works

┌─────────────────┐
│   Claude.ai     │  "Create a Python script..."
│   (Browser)     │
└────────┬────────┘
         │ HTTPS
         ▼
┌─────────────────┐
│   Cloudflare    │  mcp.your-domain.com
│     Tunnel      │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│   This Server   │  FastMCP → Claude Code CLI
│   (Your PC)     │  Executes tasks locally
└─────────────────┘

Features

  • Remote Control - Run Claude Code from anywhere via browser
  • Secure - HTTPS via Cloudflare tunnel, no exposed ports
  • Full Access - All Claude Code capabilities available
  • Session Management - Continue multi-turn conversations
  • Auto-start - Optional systemd service for boot startup

Quick Start

git clone https://github.com/talpah/claude-code-bridge.git
cd claude-code-bridge
./setup.sh

The setup script will:

  1. Install dependencies (uv, claude, cloudflared)
  2. Configure Cloudflare tunnel
  3. Optionally set up auto-start

Available Tools

Tool Description
run_claude_code Execute tasks using Claude Code CLI
list_directory List files and directories
read_file Read file contents
write_file Write content to files
execute_command Run shell commands
list_sessions List Claude Code sessions

Requirements

  • Linux (Ubuntu/Debian)
  • Python 3.10+
  • Cloudflare account with a domain

Manual Setup

If you prefer manual setup over the wizard:

1. Install Dependencies

# uv package manager
curl -LsSf https://astral.sh/uv/install.sh | sh

# Claude Code CLI
curl -fsSL https://claude.ai/install.sh | bash

# cloudflared (Debian/Ubuntu)
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb -o /tmp/cloudflared.deb
sudo dpkg -i /tmp/cloudflared.deb

2. Configure Cloudflare Tunnel

# Login to Cloudflare
cloudflared tunnel login

# Create tunnel
cloudflared tunnel create claude-code-bridge
cloudflared tunnel route dns claude-code-bridge mcp.your-domain.com

Create ~/.cloudflare-tunnel/config.yml:

tunnel: YOUR_TUNNEL_ID
credentials-file: ~/.cloudflared/YOUR_TUNNEL_ID.json

ingress:
  - hostname: mcp.your-domain.com
    service: http://localhost:3000
  - service: http_status:404

3. Install Python Dependencies

uv sync

4. Start the Server

./start.sh

Connect from Claude.ai

  1. Go to claude.ai
  2. Settings → Developer → Model Context Protocol
  3. Add server: https://mcp.your-domain.com/mcp
  4. Click Connect

Usage

Once connected, ask Claude.ai things like:

"List files in ~/Projects"
"Read the README in my project"
"Use Claude Code to refactor this function"
"Run git status in ~/Projects/myapp"

Project Structure

claude-code-bridge/
├── server.py      # MCP server (FastMCP)
├── start.sh       # Start server + tunnel
├── setup.sh       # Setup wizard
├── pyproject.toml # Project config
└── LICENSE        # MIT license

Logs

  • Server: /tmp/claude-code-bridge.log
  • Tunnel: /tmp/tunnel.log

Stopping

# If running in foreground
Ctrl+C

# If running as service
sudo systemctl stop claude-code-bridge

# Manual stop
pkill -f server.py
pkill cloudflared

Security

  • Server binds to localhost:3000 only
  • External access through Cloudflare tunnel (HTTPS)
  • Claude Code runs with your user permissions
  • No authentication by default (tunnel URL is the secret)

License

MIT

Yorumlar (0)

Sonuc bulunamadi