browser-tools-mcp
browser-tools-mcp
持久的、有头 Chromium 浏览器控制,用于 OpenCode/Claude Code,风格仿照 Claude Code 的浏览器工具。构建于 2026-08-05,因为 OpenCode 没有原生浏览器工具,而 custom-scraper(纯 HTTP)无法读取重 JS 或需要登录的页面。
架构
MCP 服务器进程就是单例浏览器管理器。由于 OpenCode 在整个 CLI 会话期间保持 stdio 服务器存活,浏览器会在各 agent 轮次之间持续存在。如果浏览器崩溃或窗口被关闭,下一次工具调用会透明地重新启动它(server/browser.js)。
启动配置:headless: false, slowMo: 100,视口 1280x800,桌面版 Chrome UA,--disable-blink-features=AutomationControlled。
Related MCP server: chrome-mcp
文件
server/server.js— MCP 入口点,注册五个工具 + 模式。server/browser.js— 单例浏览器/上下文/页面管理器 + 重启逻辑。server/tools.js— 操作实现(可交互元素树、目标定位、高亮、截图)。server/_self_verify.js— 独立场景测试:npm run verify。shots/— 来自browser_inspect的截图。USAGE.md— 面向 agent 的规则(接入 OpenCode 的instructions)。
工具
工具 | 用途 |
| 加载一个 URL;返回最终 URL 和标题。 |
| 截图 + 带数字目标的交互元素树。 |
| 按检查编号、CSS 选择器或可见文本进行点击。 |
| 按编号/选择器/文本向字段中输入内容。 |
| 暂停流程并向人类呈现问题。 |
元素定位符合 Claude Code 约定:browser_inspect 为每个可交互元素分配一个数字 target,在 DOM 中标记为 data-bt-target,以便后续操作解析到完全相同的元素(在带有隐藏输入的页面上,可见性过滤后的索引会相对于不过滤的 .nth() 产生漂移)。点击前元素会被短暂高亮,以便用户看到操作过程。
验证
npm run verify # navigate -> inspect -> click -> fill -> crash-recovery已验证于 2026-08-05:example.com 的导航/检查/点击、按目标填充 Google 表单、以及在关闭后重新启动均通过;五个工具均已注册并通过真实的 MCP stdio 协议做出响应。
操作注意事项
有头意味着需要桌面环境。 Chromium 窗口需要交互式会话才能启动;在无头的/断开连接的机器上启动会失败——请如实报告而不是假装成功。
隔离的浏览器。 这不是 Luigi 的已登录 Chrome(那是
chrome-bridge)。没有已登录的会话,没有扩展,完整的写入权限。人工把关。 未经明确指示不得登录/下单/发送;
browser_request_human表示在人工回答之前停止。已在
~/.config/opencode/opencode.jsonc中注册为browser-toolsMCP 服务器;使用规则通过USAGE.md接入instructions。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityBmaintenanceEnables Claude Code to control a real browser using AI for web scraping, competitive intelligence, and UX auditing through the MCP protocol.
- AlicenseBqualityAmaintenanceEnables controlling a real Chrome browser from MCP hosts like Claude, with extension-based or CDP fallback, supporting tabs, navigation, interaction, and page reading tools.332655MIT
- Flicense-qualityDmaintenanceEnables browser automation (navigate, screenshot, click, type, etc.) for Claude Code via MCP protocol, with a Chrome extension for configuration.2
- Alicense-qualityBmaintenanceEnables Codex to control a visible Chromium browser via MCP tools for navigation, page inspection, and interaction, while keeping sensitive steps like login and captcha under the user's control.31MIT
Related MCP Connectors
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/luigimasango-dev/browser-tools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server