OpenCode in Chrome
OpenCode in Chrome
あなたのローカルなopencodeエージェントにブラウザの表示と操作をさせましょう — タブ、クリック、JS、スクリーンショット。
Anton Petnitsky · github.com/Mukller · LinkedIn
opencode向けClaude-in-Chromeの代替: Chrome拡張 + MCPインターフェースを備えたローカルブリッジ。エージェントは、ログイン済みセッションを持つあなたの実際のブラウザを完全に制御できます — --remote-debugging-portもクラウドも不要。すべてlocalhost経由。
┌──────────────────┐ WebSocket ┌─────────────────┐ stdio/MCP ┌──────────┐
│ Chrome extension │◄──────────────►│ bridge (Node) │◄───────────────►│ opencode │
│ chrome.debugger │ 127.0.0.1 │ ws + mcp │ │ │
└──────────────────┘ └─────────────────┘ └──────────┘キーとなる仕掛け: 拡張機能がchrome.debugger経由でCDPセッションを自ら立ち上げるため、ブラウザの起動フラグは不要で、すべてのプロファイルとクッキーが通常どおり機能します。
機能
MCPツール | 機能 |
| 開いているタブの一覧 |
| タブを開く/移動/閉じる |
| ページの読み込み完了を待つ |
| ページ上でJavaScriptを実行し、結果を取得 |
| CSSセレクタでクリック |
| フィールドに入力 (React対応、ネイティブsetter経由) |
| フォーカスされた要素にキーを送信 |
| タイトル + URL + ページの表示テキスト |
| タブのPNGスクリーンショット (imageブロックとして返される) |
| ページの最新のconsole.log / 例外 |
Related MCP server: @nimbus21.ai/chrome-devtools-mcp
インストール
1. ブリッジ
git clone https://github.com/Mukller/opencode-chrome.git
cd opencode-chrome
npm install
node bridge/bridge.mjs初回起動時にブリッジがトークンを表示し、~/.opencode-chrome/tokenに保存します。
2. 拡張機能
chrome://extensionsを開く → デベロッパーモードを有効にする展開した拡張機能を読み込む →
extension/フォルダを選択拡張機能のアイコンをクリック → Settings → 手順1のトークンを貼り付ける → Save & reconnect
アイコンのバッジが緑のONになればOK
3. opencodeに接続
~/.config/opencode/opencode.json (またはプロジェクト内のファイル) に:
{
"mcp": {
"chrome": {
"type": "local",
"command": ["node", "<путь до репо>/bridge/bridge.mjs"],
"enabled": true
}
}
}opencodeを再起動すると、エージェントにchrome_*ツールが表示されます。
ブリッジの環境変数: OPENCODE_CHROME_PORT (デフォルトは8766)、OPENCODE_CHROME_TOKEN (ファイルの代わりに固定トークン)。
セキュリティ
WSサーバーは127.0.0.1のみをリッスンし、外部からの接続は拒否されます。
ハンドシェイクにはトークンが必要です。トークンが正しくない場合、接続は閉じられます。
拡張機能は接続されたブリッジからのコマンドのみを実行します。アクティブな操作中は、黄色いバナー「デバッグが開始されました」にすべてが表示されます。
既知の制限
タブでCDPセッションがアクティブな間、Chromeは「拡張機能がこのブラウザのデバッグを開始しました」というインフォバーを表示します — これはdevtoolsフラグなしでアクセスするための代償です。
Chromeがアイドル状態のとき、拡張機能のService workerはスリープします。ブリッジは単に再接続を待ちます (自動再接続)。
テスト
npm test # E2E: фейковое расширение + MCP-клиент против реального мостаライセンス
MIT © Anton Petnitsky
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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 gradedqualityBmaintenanceLets AI coding agents control and inspect a live Chrome browser via MCP, providing Chrome DevTools capabilities for automation, debugging, and performance analysis.11Apache 2.0
- AlicenseNot gradedqualityCmaintenanceGives coding agents full control over a real Chrome browser, enabling navigation, clicking, typing, screenshotting, and more via an MCP server and Chrome extension.132MIT
- AlicenseNot gradedqualityBmaintenanceLets coding agents control and inspect a live Chrome browser via MCP, providing Chrome DevTools capabilities for automation, debugging, and performance analysis.2,211,104Apache 2.0
Related MCP Connectors
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.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mukller/opencode-chrome'
If you have feedback or need assistance with the MCP directory API, please join our Discord server