@codeinklingon/browser-mcp

@codeinklingon/browser-mcp

MCP server for headless browser automation via Puppeteer, with stealth anti-detection and Playwright-format ARIA snapshots.

Category
访问服务器

README

@codeinklingon/browser-mcp

vibecoded port of oh-my-pi's browser tool as an mcp server

MCP server for headless browser automation via Puppeteer. Drop-in replacement for @playwright/mcp with enhanced stealth anti-detection and Playwright-format ARIA snapshots.

Usage

Add to your opencode.json:

{
  "mcp": {
    "browser-mcp": {
      "type": "local",
      "command": ["npx", "-y", "@codeinklingon/browser-mcp"],
      "enabled": true
    }
  }
}

Or install the skill (registers the MCP server + loads AI guidance):

npx skills install @codeinklingon/browser-mcp

Or run directly:

npx @codeinklingon/browser-mcp

Tools

Tool Description
browser_tab_open Open a tab, optionally navigate to a URL
browser_tab_run Execute JS in the tab — has full tab API in scope
browser_tab_close Close the tab and release resources

The tab API

Every browser_tab_run call has tab, display, wait, assert in scope.

Navigation & Info

Method Notes
tab.url() Current URL (sync)
tab.title() Page title
tab.goto(url, { waitUntil? }) 'load', 'domcontentloaded', 'networkidle'
tab.waitForNavigation({ waitUntil?, timeout? }) Wait for next page load

Click & Input

Method Notes
tab.click(selector) CSS, text/, xpath/, aria-ref=
tab.type(selector, text) Type into input
tab.fill(selector, value) Clear then type
tab.press(key, { selector? }) 'Enter', 'Escape', etc.
tab.hover(selector)
tab.select(selector, ...values) <select> options
tab.drag(from, to) Selector or { x, y } point
tab.uploadFile(selector, ...filePaths) File input

Scrolling & Visibility

Method Notes
tab.scroll(dx, dy) Scroll by pixels
tab.scrollIntoView(selector) Center element in viewport

Page State

Method Notes
tab.observe() Accessibility tree: { elements: [{ id, role, name, value, focused }] }
tab.ariaSnapshot() Playwright-format YAML with [ref=eN] ids, [cursor=pointer] on clickables
tab.evaluate(fn, ...args) Raw JS in page context
tab.extract(format?) 'markdown' / 'text' / omitted = HTML
tab.screenshot({ fullPage?, selector? }) Base64 PNG

Element Refs

Method Notes
tab.id(n) ElementHandleActions from observe() id
tab.ref("e5") ElementHandleActions from ariaSnapshot() ref
tab.waitForSelector(...) CSS, text, xpath, aria-ref
tab.waitForUrl(pattern, { timeout? }) String substring or RegExp
tab.waitForResponse(pattern, { timeout? }) String, RegExp, or function

ElementHandleActions: { click, type, fill, hover, focus, screenshot, evaluate, scrollIntoView }

Important

  • display, wait, assert are bare globals — NOT tab.* methods
    • display(x) ✓ — tab.display(x) ✗
    • wait(2000) ✓ — tab.wait(2000) ✗
  • Navigation invalidates refs — re-run ariaSnapshot() or observe() after goto()
  • Single-expression code auto-returns its value (no explicit return needed)

Selector Syntax

Prefix Example Notes
(none) 'button.submit' CSS selector
text/ 'text/Sign in' Visible text (retries 10x)
xpath/ 'xpath//button' XPath
aria-ref= 'aria-ref=e12' Ref from ariaSnapshot()

Example

await tab.goto('https://example.com/login')
const snap = await tab.ariaSnapshot()
display(snap)
await tab.fill('aria-ref=e5', 'admin')
await tab.fill('aria-ref=e8', 'password')
await tab.click('aria-ref=e12')
await tab.waitForNavigation()
display(tab.url())
const screenshot = await tab.screenshot()
display(screenshot)

Install

# Quick start — installs the skill and registers the MCP server
npx skills install codeinklingon/browser-mcp

# Or manually add to opencode.json (see Usage above)

Build from source

npm install
npm run build

Publish:

npm publish

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选