Use Browserbase cloud browsers with Claude Code instead of local Chrome.
This plugin intercepts Claude Code's browser automation commands (mcp__claude-in-chrome__*) and forwards them to Browserbase's cloud browser infrastructure. This gives you:
- Sandboxed, secure browser execution - Run browser automation in isolated cloud environments
- Session recording and debugging - Watch Claude browse in real-time via debug URLs
- Scalable browser automation - Cloud browsers with built-in proxy and stealth capabilities
- Claude Code CLI
- Claude in Chrome extension installed
- Browserbase account with API key
- Node.js 18+
In Claude Code, add the plugin marketplace and install:
/plugin marketplace add browserbase/claude-code-plugin
/plugin install browserbase@claude-code-plugin
Then restart Claude Code for the changes to take effect.
-
Clone this repository:
git clone https://github.com/browserbase/claude-code-plugin.git
-
Copy to your Claude plugins directory:
cp -r claude-code-plugin ~/.claude/plugins/browserbase -
Install dependencies:
cd ~/.claude/plugins/browserbase npm install
Run the setup script to configure your Browserbase credentials:
~/.claude/plugins/browserbase/scripts/setup.shYou'll be prompted for:
- Browserbase API Key - Get this from browserbase.com/settings
- Project ID - Find this in your Browserbase dashboard
Credentials are stored in ~/.browserbase/credentials.
You can also set credentials via environment variables:
export BROWSERBASE_API_KEY="your-api-key"
export BROWSERBASE_PROJECT_ID="your-project-id"Once installed and configured, just use Claude Code normally. The plugin automatically:
- On session start: Launches a cloud browser and starts the forwarding server
- On browser commands: Forwards all
mcp__claude-in-chrome__*commands to Browserbase - On navigation: Shows you the live debug URL to watch the browser
- On session end: Cleans up the browser session
$ claude
> Navigate to github.com and take a screenshot
[Browserbase] Cloud browser ready (server PID: 12345)
[Browserbase] Watch live at: https://www.browserbase.com/sessions/abc123/debug
I'll navigate to GitHub and capture a screenshot...
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Claude Code │────▶│ Forwarding Server│────▶│ Browserbase │
│ │ │ (Unix Socket) │ │ Cloud Browser │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │
│ ┌──────────────────┐ │
└─────────────▶│ Claude in Chrome │◀─────────────┘
│ Extension │ (CDP over WebSocket)
└──────────────────┘
- Claude Code sends browser commands via the MCP browser bridge socket
- The forwarding server intercepts these commands
- Commands are translated to CDP (Chrome DevTools Protocol) and sent to Browserbase
- Browserbase executes commands on a cloud browser
- Results are returned through the same path
browserbase/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── hooks/
│ └── hooks.json # Hook configuration
├── scripts/
│ ├── setup.sh # Credential setup
│ ├── session-start.sh # Starts forwarding server
│ ├── session-stop.sh # Cleanup on session end
│ └── browser-tool-log.sh # Shows debug URL on navigate
├── index.js # Entry point
├── forwarding-server.js # Socket interception & forwarding
├── browserbase-client.js # Browserbase API & CDP client
└── package.json
The plugin requires the Claude in Chrome extension to be installed, even though commands are forwarded to Browserbase. Install it from the Chrome Web Store.
Run the setup script again:
~/.claude/plugins/browserbase/scripts/setup.shCheck the server logs:
cat ~/.browserbase/state/server.logCheck the hook debug log:
cat ~/.browserbase/state/hook-debug.logTo test the plugin during development:
claude --plugin-dir /path/to/browserbase-pluginMIT