opencode-browser-control
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., "@opencode-browser-control Navigate to https://www.wikipedia.org and take a snapshot"
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.
opencode-browser-control
Playwright-powered browser automation MCP server for OpenCode.
Controls Chrome/Edge with ARIA accessibility snapshots and numbered element refs — no CSS selectors, no guessing.
Quick Start
1. Install dependencies
npm install -g playwright-core
npx playwright install chromium2. Configure OpenCode
Add to ~/.config/opencode/opencode.json:
{
"mcp": {
"browser-control": {
"type": "local",
"command": ["npx", "-y", "opencode-browser-control"],
"enabled": true
}
}
}3. Restart OpenCode
The browser, browser_snapshot, browser_click, and browser_type tools will be available.
Related MCP server: Pilot
Tools
browser(action, ...) — Multiplexed Tool
Action | Description | Key Params |
| Launch browser |
|
| Close browser | — |
| Open URL |
|
| ARIA snapshot with element refs |
|
| Click element by ref |
|
| Type into input by ref |
|
| Execute JavaScript |
|
| Full-page screenshot |
|
| List all tabs | — |
| Close a tab |
|
| Navigate history | — |
Shortcut Tools
Tool | Description |
| Get ARIA snapshot with |
| Click element by snapshot ref |
| Type into element by snapshot ref |
Typical Workflow
1. browser(action="navigate", url="https://example.com")
2. browser_snapshot() → returns e1: button "Login", e2: textbox "Email", ...
3. browser_type(ref="e2", text="user@example.com")
4. browser_click(ref="e1")
5. browser_snapshot() → verify resultBrowser Support
Auto-detects in priority order:
OS | Priority |
Windows | Edge → Chrome |
macOS | Chrome → Edge |
Linux | Chrome → Edge → Chromium |
Falls back to Playwright's bundled Chromium if no system browser is found.
Persistent Profile
A persistent profile is stored at ~/.opencode/browser-profile/{browser}/. Login state, cookies, and local storage persist across sessions. The profile is isolated from your normal browser — it won't interfere with your daily browsing.
Architecture
OpenCode ──MCP(stdio)──▶ index.mjs ──Playwright──▶ Edge/ChromeSingle-file Node.js MCP server. No HTTP middle layer, no browser extensions, no CDP port configuration. Playwright manages the browser lifecycle automatically.
Troubleshooting
Problem | Solution |
"playwright-core not found" |
|
Browser doesn't launch | Install Chromium: |
SPA navigation breaks refs | Re-run |
Elements not clickable | The snapshot only finds visible elements. Use |
License
MIT
Available Tools
4 toolsbrowserC
浏览器控制主工具。通过 action 参数选择操作。首次使用自动启动浏览器。
Inputs: action (required), url, ref, text, +5 more.
browser_clickA
通过 ARIA 快照引用(如 e42)点击页面元素。需先调用 browser_snapshot 获取引用。
Inputs: ref (required), page_id.
browser_snapshotA
获取页面 ARIA 可访问性快照,返回带编号引用(e1, e2...)的交互元素列表。使用 browser_click(ref) 点击这些元素。
Inputs: page_id.
browser_typeA
通过 ARIA 快照引用在输入框中输入文本。需先调用 browser_snapshot 获取引用。
Inputs: ref (required), text (required), submit, page_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: browser for general control, snapshot for getting ARIA references, click for clicking elements, and type for typing text. No overlap in functionality.
All tools use the 'browser_' prefix, providing a consistent pattern. The main tool is simply 'browser', which deviates slightly from the verb_noun pattern but is still clear and predictable.
With 4 tools covering core browser control (navigation, snapshot, click, type), the count is well-scoped and appropriate for the domain.
The tool set covers essential browser interactions, but lacks explicit support for scrolling, keyboard actions, or file handling. Minor gaps that can be worked around.
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceA server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots without requiring screenshots or vision models.221Apache 2.0
- AlicenseAqualityDmaintenanceA high-performance browser automation MCP server that provides AI agents with a fast, persistent Chromium instance via Playwright. It features reference-based element interaction, snapshot diffing, and manual handoff capabilities to handle complex tasks like CAPTCHAs.6111 npm32MIT
- AlicenseAqualityCmaintenanceMCP server for browser automation that lets LLMs interact with web pages through structured accessibility snapshots, bypassing the need for screenshots.2310,706,557 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceAn MCP server that lets LLM agents control all Chrome browser tabs via accessibility snapshots, element references, and a virtual cursor, supporting operations like click, type, navigate, screenshot, and video recording.MIT