OpenCode in Chrome
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
OpenCode in Chrome
Let your local opencode agent see and control the browser — tabs, clicks, JS, screenshots.
Anton Petnitsky · github.com/Mukller · LinkedIn
An alternative to Claude-in-Chrome for opencode: a Chrome extension + a local bridge with an MCP interface. The agent gets full control over your live browser — with logged-in sessions, no --remote-debugging-port, and no clouds. Everything goes through localhost.
┌──────────────────┐ WebSocket ┌─────────────────┐ stdio/MCP ┌──────────┐
│ Chrome extension │◄──────────────►│ bridge (Node) │◄───────────────►│ opencode │
│ chrome.debugger │ 127.0.0.1 │ ws + mcp │ │ │
└──────────────────┘ └─────────────────┘ └──────────┘The key trick: the extension itself starts a CDP session via chrome.debugger — so no browser launch flags are needed, and all profiles and cookies work as usual.
Features
MCP tool | What it does |
| list of open tabs |
| open / navigate / close a tab |
| wait for the page to load |
| run JavaScript on the page, get the result |
| click a CSS selector |
| fill in a field (React-friendly, via native setter) |
| send a key to the focused element |
| title + URL + visible page text |
| PNG screenshot of the tab (returned as an image block) |
| latest console.log / page exceptions |
Related MCP server: chrome-devtools-mcp
Installation
1. Bridge
git clone https://github.com/Mukller/opencode-chrome.git
cd opencode-chrome
npm install
node bridge/bridge.mjsOn first start, the bridge prints a token and saves it to ~/.opencode-chrome/token.
2. Extension
Open
chrome://extensions→ enable Developer modeLoad unpacked extension → select the
extension/folderClick the extension icon → Settings → paste the token from step 1 → Save & reconnect
The icon badge should turn green ON
3. Connect to opencode
In ~/.config/opencode/opencode.json (or in the project one):
{
"mcp": {
"chrome": {
"type": "local",
"command": ["node", "<путь до репо>/bridge/bridge.mjs"],
"enabled": true
}
}
}Restart opencode — the chrome_* tools will appear for the agent.
Bridge environment variables: OPENCODE_CHROME_PORT (default 8766), OPENCODE_CHROME_TOKEN (fixed token instead of a file).
Security
The WS server listens only on 127.0.0.1, foreign connections are rejected.
The handshake requires a token; an invalid token = the connection is closed.
The extension only executes commands from the connected bridge; everything is visible in the yellow "debugging started" banner during active operations.
Known limitations
While a CDP session is active on a tab, Chrome shows the infobar "An extension started debugging this browser" — that's the price for access without devtools flags.
The extension's service worker sleeps when Chrome is idle; the bridge just waits for reconnection (auto-reconnect).
Tests
npm test # E2E: фейковое расширение + MCP-клиент против реального мостаLicense
MIT © Anton Petnitsky
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLets AI coding agents control and inspect a live Chrome browser via MCP, providing Chrome DevTools capabilities for automation, debugging, and performance analysis.25 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceLets coding agents control and inspect a live Chrome browser via MCP, providing Chrome DevTools capabilities for automation, debugging, and performance analysis.1,829,241 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to control and inspect a live Chrome browser via MCP, providing Chrome DevTools capabilities for automation, debugging, and performance analysis.1,829,241 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to control and inspect a live Chrome browser via MCP, including performance tracing, network and console debugging, screenshots, and reliable Puppeteer-based automation.1,829,241 npmApache 2.0