D3OXY/chrome-pilot
If you are the rightful owner of chrome-pilot and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Chrome MCP Server is a Model Context Protocol server that facilitates AI assistants like Claude to control Chrome browsers through a Chrome extension and WebSocket communication, ideal for cross-platform automation.
Chrome MCP Server
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.
๐ Features
- 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
๐๏ธ Architecture
โโโโโโโโโโโโโโโ WebSocket โโโโโโโโโโโโโโโ MCP/stdio โโโโโโโโโโโโโโโ
โ Windows โ โโโโโโโโโโโโโโโ โ WSL โ โโโโโโโโโโโโโโโ โ Claude Code โ
โ Chrome โ ws://IP:9222 โ Server โ โ โ
โ + Extension โ โ โ โ โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
๐ฆ Installation
Prerequisites
- Node.js >= 18.0.0
- Chrome/Chromium browser
- TypeScript (for development)
Quick Setup
-
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
extension
folder
- Open
-
Configure extension
- Click extension icon
- Enter WebSocket URL:
ws://YOUR_IP:9222/ws
- Click "Save Configuration" and "Reconnect"
๐ง Configuration
For Claude Code (WSL)
Add to ~/.claude/settings.json
:
{
"mcpServers": {
"chrome-pilot": {
"command": "node",
"args": ["/path/to/chrome-pilot/server/dist/index.js", "--websocket"],
"env": {}
}
}
}
For Claude Desktop
Add to Claude Desktop settings:
{
"mcpServers": {
"chrome-pilot": {
"command": "node",
"args": ["/path/to/chrome-pilot/server/dist/index.js"]
}
}
}
๐ ๏ธ Available Tools
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? |
๐ Network Setup (WSL/Windows)
1. Find WSL IP
ip route | grep default
2. Configure Windows Firewall
# Run as Administrator
New-NetFirewallRule -DisplayName "Chrome MCP Server" -Direction Inbound -Port 9222 -Protocol TCP -Action Allow
3. Extension Setup
- Access extension via
\\wsl$\Ubuntu\path\to\chrome-pilot\extension
- Load in Windows Chrome
- Configure WebSocket URL in popup
- Test connection
๐งช Testing
Test WebSocket Server
curl http://localhost:9222/info
curl -X POST http://localhost:9222/command \
-H "Content-Type: application/json" \
-d '{"action": "get_tabs", "params": {}}'
Test with Claude
Can you navigate to google.com and take a screenshot?
๐ Project Structure
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
๐ Troubleshooting
Extension Not Connecting
- Verify WebSocket URL in extension popup
- Check WSL IP address hasn't changed
- Ensure server is running on correct port
- Check Windows firewall settings
MCP Tools Not Working
- Restart Chrome extension
- Verify "Connected" status in popup
- Check server logs for errors
- Ensure extension has necessary permissions
Performance Issues
- Use ethernet connection for best performance
- Monitor network latency between WSL and Windows
- Consider running on fixed IP
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
๐ License
MIT License - see file for details.
๐ Acknowledgments
- Built with MCP SDK by Anthropic
- Uses Chrome Extension APIs for browser automation
- WebSocket communication for cross-platform support
๐ Support
- Create an issue for bug reports
- Check for detailed guides
- See for WSL/Windows configuration