browserpilot-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@browserpilot-mcpshow me my pull requests on GitHub"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
š BrowserPilot
Control your local desktop browser directly from remote VPS AI Agents via Model Context Protocol (MCP)
š” Why BrowserPilot?
When building autonomous AI agents on a remote VPS, interacting with modern websites is challenging:
Traditional headless browsers (like standard Puppeteer/Playwright) get blocked by Cloudflare, reCAPTCHA, and bot-detection systems.
Authenticating into your personal accounts (Google, GitHub, banking, dashboards) on a headless VPS requires syncing cookies and session tokens.
Remote debugging ports (
--remote-debugging-port=9222) trigger Chrome's prominent yellow "Browser is being controlled by automated software" banner.
BrowserPilot solves this by establishing a secure, persistent outbound WebSocket bridge directly from your local Chrome/Brave/Edge browser to your VPS MCP server. Your VPS AI agent can interact with your real, authenticated browser tabs using realistic DOM events while keeping the connection ultra-lightweight and invisible.
Related MCP server: MCP Chrome Bridge
šļø Architecture
sequenceDiagram
autonumber
actor User as You (Local PC)
participant Ext as Chrome Extension (MV3)
participant Relay as Offscreen Document (Persistent WS)
participant MCP as VPS MCP Server
actor Agent as AI Agent (Claude/Cursor/AGY)
User->>Ext: Loads Extension & Enters VPS Endpoint
Ext->>Relay: Initializes Background Offscreen Relay
Relay->>MCP: Outbound WebSocket Connect (ws://<your-vps-ip>:8765?token=...)
MCP-->>Relay: Auth Verified (200 OK)
rect rgb(30, 41, 59)
note right of Agent: AI Agent executes browser action
Agent->>MCP: Call Tool: browser_click({ selector: "#submit" })
MCP->>Relay: Send JSON Command (ID: cmd_101)
Relay->>Ext: Dispatch to Content Script
Ext->>Ext: Highlight element & dispatch native mouse events
Ext-->>Relay: Action Succeeded
Relay-->>MCP: Return Result (ID: cmd_101)
MCP-->>Agent: Tool Response: "Clicked #submit successfully"
endš ļø MCP Tools Reference
BrowserPilot exposes 12 specialized tools directly to any MCP-compatible AI agent:
MCP Tool | Description | Key Parameters |
| Checks if local browser extension is connected and reports latency. | None |
| Lists all open tabs across your browser windows with titles & URLs. | None |
| Navigates the current tab (or opens a new tab) to a given URL. |
|
| Switches focus and brings a specific tab to the foreground. |
|
| Closes a specific tab. |
|
| Extracts readable text, clean markdown, or interactive element catalog. |
|
| Clicks an element by CSS selector or human-readable text label. |
|
| Types into an input/textarea with realistic input events. |
|
| Dispatches keyboard events ( |
|
| Scrolls the page in any direction or scrolls an element into view. |
|
| Captures the active viewport and returns base64 image data to the agent. |
|
| Runs custom JavaScript expression in the page and returns the result. |
|
š¦ Project Structure
browserpilot/
āāā mcp-server/ # Model Context Protocol Server (VPS side)
ā āāā src/
ā ā āāā index.ts # Stdio MCP Server & lifecycle entry
ā ā āāā websocket-hub.ts # WebSocket server & command dispatcher
ā ā āāā tools.ts # MCP tool definitions & schema validation
ā ā āāā types.ts # Protocol message interfaces
ā āāā test/ # Automated bridge integration tests
ā āāā package.json
ā
āāā extension/ # Manifest V3 Chrome Extension (Local side)
ā āāā manifest.json # Extension configuration & permissions
ā āāā background.js # Service worker & tab router
ā āāā offscreen.html/js # Offscreen document (unbreakable WebSocket keep-alive)
ā āāā content.js # In-page DOM engine & element highlighter
ā āāā popup.html/css/js # Settings popup UI
ā āāā icons/ # Extension icons
ā
āāā package.json # Root pnpm workspaceš Quickstart Guide
Step 1: Start the MCP Server on your VPS
Clone or copy the repository to your VPS:
cd /root/browserpilot pnpm installConfigure environment variables in
mcp-server/.env:WS_PORT=8765 SECRET_TOKEN=my-secure-browserpilot-tokenBuild and test the MCP server:
pnpm build pnpm --filter browserpilot-mcp exec tsx test/test-bridge.ts
š Best Practice: Zero-Config Deployment with Fire PM Tunnels
Instead of manually opening firewall ports or wrestling with SSL certificates, you can supervise BrowserPilot 24/7 and expose an encrypted HTTPS / WSS tunnel using Fire PM ā the native Linux process supervisor & tunnel ecosystem.
Install Fire PM (if not already installed): Visit the Fire PM Repository or run the installer:
git clone https://github.com/Fire-Package/fire-pm.git /root/fire-pm cd /root/fire-pm && sudo ./install.shStart BrowserPilot as a Persistent System Service:
fire start /root/browserpilot/mcp-server/dist/index.js --name browserpilot --env WS_PORT=8770 --env SECRET_TOKEN=my-secure-tokenOpen a Public Secure Tunnel (Automatic SSL/WSS):
fire tunnel open 8770 # Output: ā Custom Tunnel established for localhost:8770 # š URL: https://<hash>-tunnel.yourdomain.comConnect from Chrome Extension: In the extension popup, enter:
VPS WebSocket Endpoint:
wss://<hash>-tunnel.yourdomain.comSecret Token:
my-secure-token
Manage Your Tunnel & Service:
fire list # View service health and memory usage fire tunnel list # View active tunnels and uptime fire logs browserpilot # Tail live service logs
š”ļø Manual Firewall Configuration (Alternative)
If you are not using Fire PM tunnels and are connecting directly over raw TCP, make sure port 8770 (or your custom WS_PORT) is open:
1. Ubuntu / Debian (UFW)
sudo ufw allow 8770/tcp comment "BrowserPilot WebSocket"
sudo ufw reload2. RHEL / CentOS / AlmaLinux / Rocky (firewalld)
sudo firewall-cmd --permanent --add-port=8770/tcp
sudo firewall-cmd --reload3. Raw iptables
sudo iptables -A INPUT -p tcp --dport 8770 -j ACCEPTStep 2: Install the Chrome Extension on your Local Computer
Copy or download the
extension/folder from your VPS to your local PC.In your local browser (Chrome, Brave, Edge):
Navigate to
chrome://extensionsEnable Developer mode in the top-right toggle.
Click Load unpacked and select the
extensionfolder.
Click the BrowserPilot icon in your browser toolbar:
VPS WebSocket Endpoint:
ws://<your-vps-ip>:8765(orwss://tunnel.yourdomain.com)Secret Token:
my-secure-browserpilot-tokenClick Connect.
The badge will turn š¢ ON and status will display "Connected to VPS".
Step 3: Connect your AI Agent to the MCP Server
Add BrowserPilot to your agent's MCP configuration:
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"browserpilot": {
"command": "node",
"args": ["/path/to/browserpilot/mcp-server/dist/index.js"],
"env": {
"WS_PORT": "8765",
"SECRET_TOKEN": "my-secure-browserpilot-token"
}
}
}
}Antigravity CLI (agy) or Custom Agent
{
"mcpServers": {
"browserpilot": {
"command": "node",
"args": ["/root/browserpilot/mcp-server/dist/index.js"],
"env": {
"WS_PORT": "8765",
"SECRET_TOKEN": "my-secure-browserpilot-token"
}
}
}
}š Security & Privacy
The WebSocket bridge allows arbitrary command execution inside your browser session. Always protect your connection:
Pre-Shared Secret: Set a strong
SECRET_TOKENin your environment.Encryption: When running over public networks, route through an encrypted tunnel (Cloudflare Tunnel, Tailscale, or Nginx with Let's Encrypt
wss://).Visual Feedback: When an AI agent clicks or interacts with elements, BrowserPilot highlights them with green/blue halos in real-time so you always see what the agent is doing.
This server cannot be deployed
Maintenance
Related MCP Connectors
Browser MCP for logged-in tasks. Uses your Chrome ā credentials stay local. Zero-token replay.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Live browser debugging for AI assistants ā DOM, console, network via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to control the Google Chrome browser through a Node.js WebSocket bridge and a dedicated browser extension. It provides tools for capturing screenshots, executing JavaScript, managing tabs, and extracting page content via the MCP protocol.2-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Chrome browser actions like navigation, clicking, form filling, screenshots, and console/network logging via an MCP server and Chrome extension.821 npmMIT
- AlicenseNot gradedqualityAmaintenanceConnects AI agents to your Chrome browser via MCP, enabling real-time control of existing tabs, sessions, and application state for development workflows.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control your existing Chrome browser via MCP, using your logged-in sessions for automation on authenticated sites. Provides high-level browser tools plus raw CDP and Chrome API access.MIT