Remote Chrome DevTools Protocol tunnel for headless server development.
Developing web applications on a remote server using Claude Code? You've probably hit this wall: Claude Code can't debug your UI because there's no desktop environment to run Chrome.
remote-cdp forwards your local Chrome's debugging port to a remote server via SSH. This allows Claude Code (or any CDP-based tool) on the remote server to control your local browser for UI debugging, testing, and automation.
┌─────────────────┐ SSH Tunnel ┌─────────────────┐
│ Local PC │ ◄──────────────────────────►│ Remote Server │
│ │ │ │
│ Chrome:9224 │ ◄─── Remote Port Forward ───│ localhost:9222 │
│ │ │ │
│ │ │ Claude Code │
│ │ │ + Playwright │
│ │ │ MCP Server │
└─────────────────┘ └─────────────────┘
- Starts Chrome with remote debugging enabled on your local machine
- Establishes SSH connection to your remote server
- Creates a reverse tunnel: remote
localhost:9222→ local Chrome debug port - Claude Code on the remote server connects via Playwright MCP to control your browser
git clone https://github.com/yourusername/remote-cdp.git
cd remote-cdp
go build -o remote-cdp .# Linux
GOOS=linux GOARCH=amd64 go build -o remote-cdp-linux .
# macOS
GOOS=darwin GOARCH=amd64 go build -o remote-cdp-macos .
# Windows
GOOS=windows GOARCH=amd64 go build -o remote-cdp.exe .remote-cdp create myserverFollow the prompts to enter SSH credentials and port configuration.
remote-cdp myserverOr explicitly:
remote-cdp run myserverremote-cdp myserver --no-chrome # Use existing Chrome instance
remote-cdp myserver --data-dir /path/to/chrome/profileremote-cdp list # List all profiles
remote-cdp delete myserver # Delete a profile
remote-cdp --help # Show help
remote-cdp --version # Show versionProfiles are stored as YAML files in:
./profiles/(relative to executable)~/remote-cdp/profiles/(user home directory)
host: example.com # SSH server hostname
port: 22 # SSH port (default: 22)
username: user # SSH username
password: secret # SSH password (optional if using key)
key_path: ~/.ssh/id_rsa # Path to SSH private key (optional)
chrome_port: 9224 # Local Chrome debug port (default: 9224)
remote_port: 9222 # Remote port to expose (default: 9222)After running remote-cdp, it will check if Claude Code on the remote server is configured. If not, you'll see instructions like:
--- Claude Code MCP Configuration ---
✗ Playwright MCP server is NOT configured
To configure Claude Code on the remote server, add this to:
~/.claude.json
Or run this command on the remote server:
claude mcp add -s user playwright -- npx @anthropic-ai/mcp-server-playwright@latest --cdp-endpoint http://127.0.0.1:9222
--------------------------------------
- Pure Go implementation - No external dependencies like
sshorchromeCLI - Native SSH - Uses
golang.org/x/crypto/sshfor secure connections - Reverse port forwarding - Opens a listener on the remote server that tunnels back to local Chrome
- Cross-platform - Works on Windows, macOS, and Linux
- Profile files contain credentials - they are excluded from git by default
- SSH connections support both password and key-based authentication
- Chrome is started with
--remote-debugging-portwhich allows full browser control - The tunnel only binds to
127.0.0.1on the remote server (not exposed to network)
Chrome must be started with the --remote-debugging-port flag. On some systems, Chrome requires a separate user data directory when using remote debugging:
chrome --remote-debugging-port=9224 --user-data-dir=/path/to/profileThis tool handles Chrome startup automatically, but you can use --no-chrome if Chrome is already running.
| Port | Location | Purpose |
|---|---|---|
chrome_port (default: 9224) |
Local | Chrome DevTools Protocol endpoint |
remote_port (default: 9222) |
Remote | Exposed to Claude Code/Playwright |
golang.org/x/crypto # SSH client implementation
gopkg.in/yaml.v3 # YAML profile parsing
- Remote web development - Debug UI with Claude Code on headless servers
- CI/CD browser testing - Run browser tests from build servers
- Remote automation - Control a local browser from cloud instances
- Pair programming - Share browser control with remote developers
- Go 1.21+ (for building)
- Google Chrome or Chromium
- SSH access to remote server
- Node.js on remote server (for Playwright MCP)
MIT