browser-tools-mcp

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.

Category
Visit Server

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 from browser_inspect.
  • USAGE.md — agent-facing rules (wired into OpenCode instructions).

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_human means STOP until the human answers.
  • Registered in ~/.config/opencode/opencode.jsonc as the browser-tools MCP server; usage rules wired into instructions via USAGE.md.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured