OpenCode 에디터 내에서 Chrome 또는 Edge를 사용하여 웹사이트 탐색, 양식 작성 및 데이터 스크래핑을 수행하는 AI 기반 브라우저 자동화를 지원합니다.
다른 이름 michaljach/opencode-browser
- 스타
- 119
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 15일
- 라이선스
- MIT
opencode-browser MCP란?
opencode-browser은(는) MCP server입니다. OpenCode 에디터 내에서 Chrome 또는 Edge를 사용하여 웹사이트 탐색, 양식 작성 및 데이터 스크래핑을 수행하는 AI 기반 브라우저 자동화를 지원합니다.
프로젝트 README에서 생성된 요약
opencode-browser MCP server 정보
opencode-browser를 사용하면 에디터에서 직접 웹 작업을 자동화할 수 있으며, OpenCode 사용자에게 브라우저 제어 기능을 제공합니다. 이 플러그인은 AI가 Chrome 또는 Edge 브라우저를 제어하여 웹사이트를 탐색하고, 양식과 상호작용하며, 데이터를 스크래핑할 수 있도록 합니다. OpenCode 1(버전 1.18.29 이상) 또는 OpenCode 2를 사용하는 개발자가 코딩 환경과 실제 웹 콘텐츠 사이의 간극을 메울 수 있도록 설계되었습니다.
이 도구를 사용하려면 Node.js가 설치되어 있어야 하며 브라우저에 Browser MCP 확장이 활성화되어 있어야 합니다. 설정 과정에서는 npx를 통해 로컬 MCP server를 실행하도록 opencode.json 파일을 구성해야 합니다. 이 플러그인은 모델 프롬프트에 속도 중심의 가이드를 주입하여, AI가 직접 탐색을 사용하고 스크린샷이나 전체 페이지 스냅샷과 같이 비용이 많이 드는 작업을 최소화하도록 유도한다는 점이 특징입니다. 또한 브라우저 연결이 중단되었을 때 인위적인 지연을 피하는 빠른 재시도 동작을 지원합니다.
활용 사례
- 1자동 웹 스크래핑뉴스 헤드라인이나 제품 목록과 같은 웹사이트의 특정 정보를 추출합니다.
- 2웹 양식 자동화AI에게 연락처 페이지로 이동하여 특정 사용자 세부 정보를 제출하도록 지시합니다.
- 3복잡한 워크플로 실행계정 로그인 및 대시보드의 시각적 증거 캡처를 포함한 다단계 시퀀스를 수행합니다.
- 4대상 사이트 탐색수동 클릭 없이 검색을 수행할 수 있도록 AI를 특정 URL로 안내합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
opencode-browser MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 opencode-browser MCP 설치
$ claude mcp add opencode-browser -- npx -y opencode-browserCursor에 opencode-browser MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"opencode-browser": {
"command": "npx",
"args": [
"-y",
"opencode-browser"
]
}
}
}VS Code에 opencode-browser MCP 설치
.vscode/mcp.json
{
"servers": {
"opencode-browser": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"opencode-browser"
]
}
}
}VS Code CLI에 opencode-browser MCP 설치
$ code --add-mcp '{"name":"opencode-browser","type":"stdio","command":"npx","args":["-y","opencode-browser"]}'Claude Desktop에 opencode-browser MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"opencode-browser": {
"command": "npx",
"args": [
"-y",
"opencode-browser"
]
}
}
}Codex에 opencode-browser MCP 설치
$ codex mcp add opencode-browser -- npx -y opencode-browserCodex config.toml에 opencode-browser MCP 설치
~/.codex/config.toml
[mcp_servers.opencode-browser] command = "npx" args = ["-y", "opencode-browser"]
Gemini CLI에 opencode-browser MCP 설치
$ gemini mcp add -s user opencode-browser npx -- -y opencode-browserGemini settings.json에 opencode-browser MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"opencode-browser": {
"command": "npx",
"args": [
"-y",
"opencode-browser"
]
}
}
}구성
BROWSER_MCP_DEBUG
| 이름 | 설명 | 유형 |
|---|---|---|
| BROWSER_MCP_DEBUG | — |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
README
GitHub에서 보기OpenCode Browser MCP Plugin
An OpenCode plugin that integrates Browser MCP to enable browser automation capabilities within OpenCode. This plugin allows the AI to control a browser, navigate websites, fill forms, click elements, and perform other browser automation tasks.
Works with both OpenCode 1 (1.18.29+) and OpenCode 2.
Demo

Features
- Full browser automation support through Browser MCP
- OpenCode 1 and 2 support from one package
- Speed-oriented browser guidance injected into the model prompt
- Tool-specific performance hints for expensive browser actions
- Fast retry behavior with no artificial reconnect backoff in the plugin
- Automatic detection of browser-related tasks
- Context preservation for browser state across session compactions
- Seamless integration with OpenCode's existing tools
Prerequisites
Before using this plugin, you need:
- Node.js installed on your system
- OpenCode 1.18.29+ or OpenCode 2 installed and configured
- Browser MCP extension installed in your browser (Chrome/Edge)
Installation
Step 1: Install Browser MCP Extension
- Visit https://browsermcp.io/install
- Install the Browser MCP extension for your browser (Chrome or Edge)
- Follow the extension setup instructions
Step 2: Configure OpenCode
Fastest path:
npx opencode-browser init
This creates or updates ./opencode.json with the required plugin and mcp.browsermcp entries while preserving any unrelated config you already have.
For a global setup instead of a project-local one:
npx opencode-browser init --global
If you prefer to preview the generated config without writing it yet:
npx opencode-browser init --print
Or configure it by hand. Create or update your opencode.json configuration file. You can create this file in one of two locations:
- Global configuration (applies to all projects):
~/.config/opencode/opencode.json - Project-specific configuration (applies to current project only):
./opencode.json(in your project root)
Learn more about OpenCode configuration at https://opencode.ai/docs/config
Add this configuration to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-browser"],
"mcp": {
"browsermcp": {
"type": "local",
"command": ["npx", "-y", "@browsermcp/mcp@0.1.3"],
"enabled": true
}
}
}
This configuration does two things:
- Installs the plugin - OpenCode automatically downloads
opencode-browserfrom npm - Configures Browser MCP - Sets up the MCP server that actually controls the browser
That's it! No manual file copying required. OpenCode handles everything automatically.
The generated command pins the Browser MCP package version to avoid the extra @latest resolution step on startup and keep launches reproducible.
OpenCode 2
The plugin ships a single package that supports both OpenCode 1 and OpenCode 2. OpenCode 2 reads the plugin's V2 definition and registers the same guidance through its session, tool, and event APIs; existing plugin configuration keeps working because OpenCode 2 normalizes V1 configuration.
To use the native V2 configuration shape, move the entry from plugin to plugins and use the V2 MCP shape:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["opencode-browser"],
"mcp": {
"servers": {
"browsermcp": {
"type": "local",
"command": ["npx", "-y", "@browsermcp/mcp@0.1.3"],
"disabled": false
}
}
}
}
No runtime dependencies are required: the plugin's imports of the OpenCode plugin type packages are type-only, so it loads under both APIs without installing @opencode/plugin or @opencode-ai/plugin into the plugin folder.
If OpenCode 2 reports Plugin must export a default definition with an id and an effect or setup function, you are running a version older than 1.3.0. Update the plugin (opencode plugin update, or clear OpenCode's package cache) and restart.
Alternative: Install Locally (for development/testing)
If you want to modify the plugin or test changes:
OpenCode 2: point the config at your clone. The path must be the package directory, not src/index.ts:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["file:///absolute/path/to/opencode-browser"]
}
OpenCode 1, global installation:
mkdir -p ~/.config/opencode/plugins
cp src/index.ts ~/.config/opencode/plugins/browser-mcp.ts
OpenCode 1, project-specific installation:
mkdir -p .opencode/plugins
cp src/index.ts .opencode/plugins/browser-mcp.ts
The plugin will be automatically loaded on OpenCode startup.
Configuration
Basic Configuration
The minimal configuration requires only the MCP server setup:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"browsermcp": {
"type": "local",
"command": ["npx", "-y", "@browsermcp/mcp@0.1.3"],
"enabled": true
}
}
}
Advanced Configuration
For more control, you can disable Browser MCP tools globally and enable them per agent:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"browsermcp": {
"type": "local",
"command": ["npx", "-y", "@browsermcp/mcp@0.1.3"],
"enabled": true
}
},
"tools": {
"browsermcp_*": false
},
"agent": {
"browser-agent": {
"tools": {
"browsermcp_*": true
}
}
}
}
Performance Behavior
The plugin improves Browser MCP speed by shaping how the model uses browser tools:
- Adds system guidance that prefers direct navigation and fewer browser calls
- Annotates expensive tools like snapshots, screenshots, and waits with performance hints
- Preserves fast-resume guidance during session compaction
- Avoids plugin-side reconnect delays so you can retry immediately when the browser extension is ready
Environment Variables
If you need to pass environment variables to the Browser MCP server:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"browsermcp": {
"type": "local",
"command": ["npx", "-y", "@browsermcp/mcp@0.1.3"],
"enabled": true,
"environment": {
"BROWSER_MCP_DEBUG": "true"
}
}
}
}
Usage
Once installed and configured, you can use browser automation in your OpenCode prompts:
Basic Browser Navigation
Navigate to https://github.com and search for "opencode"
Form Filling
Go to the contact form at https://example.com/contact and fill in:
- Name: John Doe
- Email: john@example.com
- Message: Hello from OpenCode!
Then submit the form.
Web Scraping
Visit https://news.ycombinator.com and get the titles of the top 5 stories
Complex Automation
Go to https://example.com/login, log in with the test credentials,
navigate to the dashboard, and screenshot the main metrics panel
Prompt Tips
For best results when using browser automation:
- Be specific about URLs and actions
- Prefer direct URLs instead of clicking through intermediate pages
- Reuse page state instead of rechecking the same screen repeatedly
- Ask for verification only when needed because snapshots and screenshots are slower than targeted extraction
- Specify selectors when needed (CSS selectors, text content, etc.)
You can also add browser automation guidelines to your AGENTS.md file:
## Browser Automation
When performing browser automation tasks:
- Always confirm the page has loaded before interacting
- Use descriptive selectors (prefer text content over CSS selectors)
- Take screenshots when verification is needed
- Handle errors gracefully (page not found, element not visible, etc.)
- Close tabs when the task is complete
Plugin Features
Speed-Oriented Guidance
The plugin biases the model toward faster browser workflows:
- Prefers direct
navigatecalls when the destination URL is known - Reuses the current tab and page state instead of redoing navigation
- Minimizes
snapshot,screenshot, andwaitcalls unless they are actually needed - Encourages targeted extraction and direct actions over broad inspection
Lightweight Connection Recovery
The plugin still detects browser connection issues, but it no longer adds artificial retry sleeps:
- Detects common Browser MCP connection failures from tool output
- Adds immediate retry guidance to the result instead of pausing inside the plugin
- Marks the connection as restored after the next successful browser action
Automatic Browser Tool Detection
The plugin automatically detects when Browser MCP tools are being used and applies browser-specific guidance.
Session Context Preservation
During session compaction, the plugin preserves browser automation context, ensuring the AI remembers:
- Browser interactions that occurred
- Current browser state considerations
- Fast-resume guidance so it can avoid repeating navigation and inspection
Tool Definition Hints
The plugin annotates Browser MCP tool definitions with performance notes, especially for slower tools like snapshots, screenshots, and waits.
Troubleshooting
Browser MCP Connection Lost
If you see connection errors:
- Check extension status: Verify the Browser MCP extension is enabled in Chrome
- Re-enable extension: If you disabled it, simply re-enable it and retry the browser action immediately
- Check browser is running: Ensure Chrome/Edge is actually running
- Retry after readiness: The plugin does not add extra backoff delay, so the next attempt can run right away
- Restart only if needed: Restart OpenCode only if the browser stays unavailable after retrying
The plugin will display messages like:
[Browser MCP] The browser connection looks unavailable. Re-enable the Browser MCP extension or browser, then retry.[Browser MCP] Connection restored. Continuing without extra retry delay.
Browser MCP Not Working
- Check extension is installed: Open your browser and verify the Browser MCP extension is installed and enabled
- Verify MCP server config: Ensure your
opencode.jsonhas the correct MCP configuration - Check Node.js: Ensure Node.js is installed:
node --version - Test MCP connection: Restart OpenCode after adding the MCP configuration
Plugin Not Loading
- Check the version: OpenCode 2 needs
opencode-browser1.3.0 or newer - Check file location: Ensure the plugin file is in the correct directory. On OpenCode 2, a
file://plugin path must point to the package directory - Check file name: Plugin files should end in
.tsor.js - Check syntax: Ensure the TypeScript/JavaScript syntax is valid
- Check logs: Look for plugin initialization messages in OpenCode output
Tools Not Available
- Check MCP server status: Ensure the Browser MCP server started successfully
- Check tool configuration: Verify tools aren't disabled in your config
- Restart OpenCode: Try restarting OpenCode after configuration changes
Debug Mode
Enable debug logging by modifying the plugin or checking OpenCode logs:
# OpenCode 2: print server logs while running a prompt
opencode run --standalone --print-logs --log-level debug "your prompt"
# OpenCode 1
opencode --verbose
Development
Building from Source
If you want to modify the plugin:
- Clone the repository
- Make your changes to
src/index.ts - Run
npm run typecheckandnpm test(covers both the OpenCode 1 and OpenCode 2 entrypoints) - Test locally with a
file://plugin path (see Install Locally) - Submit a PR if you'd like to contribute!
Plugin Architecture
The package default-exports one definition with two entrypoints that share the same state and guidance text: id + setup() for OpenCode 2, and server() for OpenCode 1.
| Purpose | OpenCode 1 hook | OpenCode 2 API |
|---|---|---|
| Inject speed-oriented browser guidance | experimental.chat.system.transform |
ctx.session.hook("context") |
| Add performance hints to Browser MCP tools | tool.definition |
ctx.tool.transform |
| Post-process browser tool results | tool.execute.after |
ctx.tool.hook("execute.after") |
| Preserve browser context | experimental.session.compacting |
ctx.session.hook("compaction") |
| Clean up session state | event |
ctx.event.subscribe() |
On OpenCode 2, browser tools called from Code Mode are reported on the execute result's nested toolCalls, which the plugin also reads so connection recovery hints still work.
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Resources
License
MIT License - See LICENSE file for details
Support
For issues and questions:
- Browser MCP issues: Browser MCP GitHub
- OpenCode issues: OpenCode GitHub
- Plugin issues: Open an issue in this repository
Changelog
See CHANGELOG.md for a detailed list of changes in each version.
opencode-browser MCP 질문
opencode-browser MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add opencode-browser -- npx -y opencode-browser를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
opencode-browser MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
어떤 브라우저를 지원하나요?
Google Chrome과 Microsoft Edge를 지원합니다.
OpenCode에 플러그인을 어떻게 설치하나요?
npx opencode-browser init 명령어를 사용하여 설정 파일을 자동으로 생성하거나 업데이트할 수 있습니다.
OpenCode 2에서도 작동하나요?
네, 이 플러그인은 OpenCode 1과 OpenCode 2를 모두 지원하는 단일 패키지입니다.