SuperAPI AI Directory

opencode-browser

Agents & models

View repository

Updated 10-16 00:20

About this skill

OpenCode extras pack: install browser control (extras, not the main workshop track)

What will this quick-start pack do for you?

Let OpenCode control browsers and desktop applications:

  • Install Playwright MCP (web control)
  • Install open-computer-use (desktop automation)
  • Write the opencode.json configuration
  • Verify the connection

Prerequisites

  • Node.js 18+ is installed
  • The computer has internet access

Ask OpenCode to run the following steps for me

Step 1: Write the Playwright MCP configuration

Edit ~/.config/opencode/opencode.json, add:

{
  "mcp": {
    "playwright": {
      "type": "local",
      "command": ["npx", "-y", "@playwright/mcp"],
      "enabled": true
    }
  }
}

Step 2: Install open-computer-use

npm install -g open-computer-use

Confirm the command is available:

open-computer-use --version

Step 3: Write the open-computer-use MCP configuration

⚠️ Windows note:npx open-computer-use install-opencode-mcp will prompt requires a POSIX shell. On Windows, edit the configuration file manually.

Edit ~/.config/opencode/opencode.json, add:

{
  "mcp": {
    "open-computer-use": {
      "type": "local",
      "command": ["open-computer-use", "mcp"],
      "enabled": true
    }
  }
}

💡 Why not use npx? The MCP server of open-computer-use needs to be started with the open-computer-use mcp subcommand. Using npx -y open-computer-use will not correctly expose the MCP tools.


Step 3: Verify Playwright

Reopen OpenCode, then ask it:

請開啟 https://example.com 並告訴我頁面標題是什麼。

Step 4: Verify open-computer-use

請截圖我的桌面(或特定視窗)。

Completion report format

## 瀏覽器控制安裝完成

- Playwright MCP:已設定 / 已啟用
- open-computer-use:已設定 / 已啟用
- 瀏覽器導航測試:成功 / 失敗
- 桌面截圖測試:成功 / 失敗

Lightweight alternative: CLI-Anything Browser CLI

If you only need simple web operations (navigation, screenshots, content extraction) and do not need full Playwright or desktop automation, you can use CLI-Anything's Browser CLI:

Installation

pip install cli-anything-hub
cli-hub install browser

Usage example

cli-anything-browser navigate https://example.com
cli-anything-browser screenshot --output page.png
cli-anything-browser extract --selector "main"

💡 Playwright MCP (the default option in this quick-start pack) is suitable for full browser automation and form filling; Browser CLI is suitable for fast, lightweight web data extraction. The two can coexist.


FAQ

Problem Solution
Playwright is very slow when downloading the browser on first run Wait for the download to finish; it is only needed once
open-computer-use cannot find the window Confirm the target application is running
npx open-computer-use tools do not appear Switch to command: ["open-computer-use", "mcp"]
Windows install-opencode-mcp reports an error Manually edit opencode.json; do not run the automatic installation