npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-browser-control

v0.1.0

Published

Browser control MCP server for OpenCode — Playwright-powered Chrome/Edge automation with ARIA snapshots

Readme

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 chromium

2. Configure OpenCode

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "browser-control": {
      "type": "local",
      "command": ["node", "D:\\browser-control-plugin\\index.mjs"],
      "enabled": true
    }
  }
}

Or use npx (after publishing):

{
  "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.

Tools

browser(action, ...) — Multiplexed Tool

| Action | Description | Key Params | |--------|-------------|------------| | start | Launch browser | headed (default: true) | | stop | Close browser | — | | navigate | Open URL | url, page_id | | snapshot | ARIA snapshot with element refs | page_id | | click | Click element by ref | ref (e.g. e42) | | type | Type into input by ref | ref, text, submit | | evaluate | Execute JavaScript | code | | screenshot | Full-page screenshot | page_id | | tabs | List all tabs | — | | close_tab | Close a tab | page_id | | back / forward | Navigate history | — |

Shortcut Tools

| Tool | Description | |------|-------------| | browser_snapshot | Get ARIA snapshot with e1, e2, e3... refs | | browser_click(ref) | Click element by snapshot ref | | browser_type(ref, text) | 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="[email protected]")
4. browser_click(ref="e1")
5. browser_snapshot()            → verify result

Browser 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/Chrome

Single-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" | npm install -g playwright-core | | Browser doesn't launch | Install Chromium: npx playwright install chromium | | SPA navigation breaks refs | Re-run browser_snapshot() after navigation — refs are invalidated on page change | | Elements not clickable | The snapshot only finds visible elements. Use browser_evaluate to scroll or interact with hidden elements |

License

MIT