A Model Context Protocol (MCP) server that enables AI assistants like Claude to control Chrome browsers through a Chrome extension and WebSocket communication. Perfect for cross-platform automation, especially WSL/Windows setups.
- Browser Automation: Navigate, click, scroll, fill forms, take screenshots
- Cross-Platform: Works across WSL/Windows network boundaries
- Dual Communication: Native messaging (local) + WebSocket (network)
- Claude Integration: Direct integration with Claude Code and Claude Desktop
- Real-time Control: Live browser interaction through MCP tools
- Chrome Extension: Easy-to-install browser extension with popup controls
βββββββββββββββ WebSocket βββββββββββββββ MCP/stdio βββββββββββββββ
β Windows β βββββββββββββββ β WSL β βββββββββββββββ β Claude Code β
β Chrome β ws://IP:9222 β Server β β β
β + Extension β β β β β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
- Node.js >= 18.0.0
- Chrome/Chromium browser
- TypeScript (for development)
-
Clone the repository
git clone https://github.com/deoxy/chrome-pilot.git cd chrome-pilot -
Install dependencies
cd server npm install npm run build -
Start the WebSocket server
node dist/index.js --websocket
-
Load Chrome extension
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
extensionfolder
- Open
-
Configure extension
- Click extension icon
- Enter WebSocket URL:
ws://YOUR_IP:9222/ws - Click "Save Configuration" and "Reconnect"
Add to ~/.claude/settings.json:
{
"mcpServers": {
"chrome-pilot": {
"command": "node",
"args": ["/path/to/chrome-pilot/server/dist/index.js", "--websocket"],
"env": {}
}
}
}Add to Claude Desktop settings:
{
"mcpServers": {
"chrome-pilot": {
"command": "node",
"args": ["/path/to/chrome-pilot/server/dist/index.js"]
}
}
}| Tool | Description | Parameters |
|---|---|---|
navigate |
Navigate to a URL | url, tabId? |
get_tabs |
Get all open browser tabs | - |
get_current_tab |
Get currently active tab | - |
close_tab |
Close a browser tab | tabId |
click |
Click on an element | selector, tabId? |
type |
Type text into an input | selector, text, tabId? |
scroll |
Scroll the page | direction, amount?, tabId? |
screenshot |
Take a screenshot | tabId? |
get_content |
Extract page content | selector?, tabId? |
get_interactive_elements |
Find clickable elements | tabId? |
wait_for_element |
Wait for element to appear | selector, timeout?, tabId? |
ip route | grep default# Run as Administrator
New-NetFirewallRule -DisplayName "Chrome MCP Server" -Direction Inbound -Port 9222 -Protocol TCP -Action Allow- Access extension via
\\wsl$\Ubuntu\path\to\chrome-pilot\extension - Load in Windows Chrome
- Configure WebSocket URL in popup
- Test connection
curl http://localhost:9222/info
curl -X POST http://localhost:9222/command \
-H "Content-Type: application/json" \
-d '{"action": "get_tabs", "params": {}}'Can you navigate to google.com and take a screenshot?
chrome-pilot/
βββ server/ # MCP Server (TypeScript)
β βββ src/
β β βββ index.ts # Main server entry
β β βββ websocket-server.ts # WebSocket server
β β βββ native-host.ts # Native messaging
β β βββ tools/ # Browser automation tools
β βββ package.json
β βββ tsconfig.json
βββ extension/ # Chrome Extension
β βββ manifest.json # Extension config
β βββ background-websocket.js # Service worker
β βββ content.js # Content script
β βββ popup.html # Extension popup
β βββ popup.js
βββ native-host/ # Native messaging setup
β βββ install.sh # Installation script
β βββ com.chrome_mcp.host.json.template
βββ docs/ # Documentation
- Verify WebSocket URL in extension popup
- Check WSL IP address hasn't changed
- Ensure server is running on correct port
- Check Windows firewall settings
- Restart Chrome extension
- Verify "Connected" status in popup
- Check server logs for errors
- Ensure extension has necessary permissions
- Use ethernet connection for best performance
- Monitor network latency between WSL and Windows
- Consider running on fixed IP
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
- Built with MCP SDK by Anthropic
- Uses Chrome Extension APIs for browser automation
- WebSocket communication for cross-platform support
- Create an issue for bug reports
- Check documentation for detailed guides
- See network setup guide for WSL/Windows configuration