Laptop Browser Bridge
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., "@Laptop Browser BridgeOpen Hacker News on the laptop browser and summarize the top article"
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.
Laptop Browser Bridge — MCP server + Chrome extension
Yes — a Chrome extension is the right approach (and fully possible). This repo lets an AI coding agent running on your VPS control any website in your laptop's Chrome.
[Laptop Chrome + Extension] --outbound WSS--> [VPS: Bridge :3001 + MCP :3000] --MCP--> [AI agent on VPS]Laptop is behind NAT, so the extension dials out to the VPS. No port-forwarding on the laptop. The MCP server runs next to the agent on the VPS.
Repo layout
src/
index.ts # starts WS bridge (:3001) + MCP Streamable HTTP (:3000)
bridge.ts # tracks connected laptops, request/response correlation
mcp.ts # MCP tools: tabs_*, page_snapshot/click/type/press/scroll/...
protocol.ts # WS message types
extension/
manifest.json
popup.html / popup.js # configure VPS URL + token
background/service-worker.js # WS client, tab APIs
content/content.js # DOM snapshot/click/typeRelated MCP server: MCP Chrome Bridge
MCP tools (what the VPS agent gets)
Tool | What it does |
| list connected laptops — call first |
| manage laptop tabs |
| go to URL |
| see page as |
| act on refs |
| scroll, read text |
| run custom JS (sparingly) |
Typical agent loop: bridge_status → tabs_create/page_navigate → page_snapshot → page_click/page_type → repeat.
1. VPS setup
git clone <this-repo> && cd browser-bridge-mcp
cp .env.example .env # set BRIDGE_TOKEN to a long random secret
npm install
npm run build
BRIDGE_TOKEN=your-secret npm start
# → WS ws://0.0.0.0:3001/bridge
# → MCP http://0.0.0.0:3000/mcp
# → health http://0.0.0.0:3000/healthProduction: put wss:// in front via Caddy/Nginx (TLS terminates there, proxies to :3001). Keep :3000 on localhost — the agent runs on the same VPS.
Connect your agent (same VPS) to http://localhost:3000/mcp. Examples:
opencode / Claude Code / generic MCP client:
{ "mcpServers": { "laptop-browser": { "url": "http://localhost:3000/mcp" } } }2. Laptop setup (Chrome)
chrome://extensions→ enable Developer mode → Load unpacked → selectextension/.Click the extension icon → set:
Bridge URL:
wss://your-vps-domain(orws://<vps-ip>:3001for testing)Token: same
BRIDGE_TOKENClient ID:
laptop-1
Save + Connect → status turns green. Keep Chrome open; laptop must stay awake.
3. Verify end-to-end
On VPS: curl localhost:3000/health should list laptop-1. Then in the agent: call bridge_status, then tabs_list, then page_snapshot.
Security notes
BRIDGE_TOKENis mandatory in production — bridge rejects bad tokens (code 4401).Extension uses
<all_urls>+tabs/scriptingbecause the point is "any website". It only acts when the VPS sends a command.page_evaluateis powerful — only connect agents you trust. For hardening: bind MCP to127.0.0.1, add IP allowlist, rotate token.MV3 service workers sleep — the extension reconnects with backoff +
alarmsheartbeat (~20s).
Dev
npm run typecheck
npm run build
npm run dev # tsx watchThis server cannot be deployed
Maintenance
Related MCP Connectors
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
Live browser debugging for AI assistants — DOM, console, network via MCP.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
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 gradedqualityAmaintenanceEnables AI assistants to control your webpage via MCP, allowing navigation, screenshots, clicks, content reading, and more through a Chrome extension.20MIT
- FlicenseNot gradedqualityCmaintenanceA local MCP server that connects to a Chrome extension to enable AI agents to control browser tabs, execute automation, and interact with web pages via tools.-