browser-tools-mcp
Persistence, headed Chromium browser control for MCP clients like OpenCode and Claude Code, enabling navigation, inspection, clicking, filling, and human-gated actions on JavaScript-heavy or login-walled pages.
README
browser-tools-mcp
Persistent, headed Chromium browser control for OpenCode/Claude Code, in the
style of Claude Code's browser tool. Built 2026-08-05 because OpenCode had no
native browser tool and custom-scraper (plain HTTP) can't read JS-heavy or
login-walled pages.
Architecture
The MCP server process is the singleton browser manager. Because OpenCode
keeps the stdio server alive for the whole CLI session, the browser survives
across agent turns. If the browser crashes or the window is closed, the next
tool call transparently relaunches it (server/browser.js).
Launch config: headless: false, slowMo: 100, viewport 1280x800, desktop
Chrome UA, --disable-blink-features=AutomationControlled.
Files
server/server.js— MCP entrypoint, registers the five tools + schemas.server/browser.js— singleton browser/context/page manager + relaunch logic.server/tools.js— the operations (interactable tree, targeting, highlight, screenshots).server/_self_verify.js— standalone scenario test:npm run verify.shots/— screenshots frombrowser_inspect.USAGE.md— agent-facing rules (wired into OpenCodeinstructions).
Tools
| Tool | Purpose |
|---|---|
browser_navigate(url) |
Load a URL; returns final URL + title. |
browser_inspect() |
Screenshot + interactable element tree with numeric targets. |
browser_click(target) |
Click by inspect number, CSS selector, or visible text. |
browser_fill(target, value) |
Type into a field by number/selector/text. |
browser_request_human(message) |
Pause flow and surface a question to the human. |
Element targeting matches the Claude Code convention: browser_inspect assigns
each interactable element a numeric target, tagged in the DOM as
data-bt-target so later actions resolve the exact same element (visible-
filtered indices would drift against unfiltered .nth() on pages with hidden
inputs). Elements are highlighted briefly before clicking so the user sees the
action.
Verification
npm run verify # navigate -> inspect -> click -> fill -> crash-recovery
Verified 2026-08-05: example.com navigate/inspect/click, Google fill by target, and relaunch-after-kill all pass; all five tools registered and responded over the real MCP stdio protocol.
Operational notes
- Headed means a desktop. The Chromium window needs an interactive session to launch; on a headless/disconnected box the launch fails — report that rather than pretending.
- Isolated browser. This is NOT Luigi's logged-in Chrome (that's
chrome-bridge). No logged-in sessions, no extensions, full write access. - Human-gated. No logins/orders/sends without explicit instruction;
browser_request_humanmeans STOP until the human answers. - Registered in
~/.config/opencode/opencode.jsoncas thebrowser-toolsMCP server; usage rules wired intoinstructionsviaUSAGE.md.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.