You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@different-ai/opencode-browser

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@different-ai/opencode-browser

Browser automation for OpenCode via Chrome extension + Native Messaging. Inspired by Claude in Chrome.

Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
308
-52.62%
Maintainers
2
Weekly downloads
 
Created
Source

OpenCode Browser

Browser automation for OpenCode via Chrome extension + Native Messaging.

Inspired by Claude in Chrome - Anthropic's browser extension that lets Claude Code test code directly in the browser and see client-side errors via console logs. This project brings similar capabilities to OpenCode.

Why?

Get access to your fully credentialed chrome instance to perform privileged web operations.

Chrome 136+ blocks --remote-debugging-port on your default profile for security reasons. This means DevTools-based automation (like Playwright or chrome-devtools-mcp) triggers a security prompt every time.

OpenCode Browser bypasses this entirely using Chrome's Native Messaging API - the same approach Claude uses. Your automation works with your existing browser session, logins, and bookmarks. No prompts. No separate profiles.

Installation

npx opencode-browser install

The installer will:

  • Copy the extension to ~/.opencode-browser/extension/
  • Open Chrome for you to load the extension
  • Register the native messaging host
  • Optionally update your opencode.json

Manual Setup

If you prefer manual installation:

  • Load the extension

    • Go to chrome://extensions
    • Enable "Developer mode"
    • Click "Load unpacked" and select ~/.opencode-browser/extension/
    • Copy the extension ID
  • Run the installer to register the native host:

    npx opencode-browser install
    
  • Add to opencode.json:

    {
      "mcp": {
        "browser": {
          "type": "local",
          "command": ["npx", "opencode-browser", "start"],
          "enabled": true
        }
      }
    }
    

Available Tools

ToolDescription
browser_navigateNavigate to a URL
browser_clickClick an element by CSS selector
browser_typeType text into an input field
browser_screenshotCapture the visible page
browser_snapshotGet accessibility tree with selectors
browser_get_tabsList all open tabs
browser_scrollScroll page or element into view
browser_waitWait for a duration
browser_executeRun JavaScript in page context

Architecture

OpenCode ──MCP──> server.js ──Unix Socket──> host.js ──Native Messaging──> Chrome Extension
                                                                                  │
                                                                                  ▼
                                                                            chrome.tabs
                                                                            chrome.scripting
  • server.js - MCP server that OpenCode connects to
  • host.js - Native messaging host launched by Chrome
  • extension/ - Chrome extension with browser automation tools

No DevTools Protocol = No security prompts.

Uninstall

npx opencode-browser uninstall

Then remove the extension from Chrome and delete ~/.opencode-browser/ if desired.

Logs

Logs are written to ~/.opencode-browser/logs/browser-mcp-host.log

Platform Support

  • macOS ✓
  • Linux ✓
  • Windows (not yet supported)

License

MIT

Credits

Inspired by Claude in Chrome by Anthropic.

Keywords

opencode

FAQs

Package last updated on 05 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts