Skip to content

v0.1.1 — first npm release

Choose a tag to compare

@zy2755 zy2755 released this 29 Nov 03:41
· 19 commits to main since this release

First public release of browser-ref-mcp on npm.

A browser-control MCP server built around one idea: give the agent [ref] numbers instead of CSS selectors, and keep the browser session self-healing so it does not drop out mid-task.

What's inside

  • 14 browser_* tools — navigate, snapshot, click, type, select, checkbox, scroll, hover, key press, evaluate, screenshot, wait, tabs, and a lightweight browser_get_info health probe.
  • Semantic snapshots with [eN] refs — the agent gets a compact tree of what is actually on the page (including open shadow roots and cross-origin iframes, flattened into one tree) and acts on refs instead of fragile selectors.
  • Stale-ref recovery — if a ref no longer resolves, the tool re-locates the element by role + accessible name before failing.
  • Self-healing sessions — the browser is launched lazily and restarted on crash; open tabs are persisted to disk and restored on the next start.
  • Persistent, isolated profile — ~/.browser-mcp/profile keeps logins across restarts, and stays completely separate from your everyday browser.

Distribution and packaging

  • Published to npm with OIDC Trusted Publishing — no long-lived token in CI, provenance attached.
  • Bilingual docs: README.md (English) and README.zh-CN.md.
  • Apache-2.0 licensed.
  • Listed on Glama.

Install

npx browser-ref-mcp@0.1.1

中文说明

browser-ref-mcp 在 npm 上的首个公开版本。

一个围绕两个想法做的浏览器控制 MCP server:给 agent 发 [ref] 编号而不是 CSS 选择器;让浏览器会话自愈,不会干到一半掉线。

包含什么

  • 14 个 browser_* 工具 —— 导航、快照、点击、输入、下拉、复选框、滚动、悬停、按键、执行 JS、截图、等待、标签页管理,以及轻量的 browser_get_info 健康查询。
  • 带 [eN] 编号的语义快照 —— agent 拿到的是页面实际内容的紧凑树(开放的 shadow root 与跨源 iframe 都会拍平进同一棵树),按 ref 操作,不依赖脆弱的 CSS 选择器。
  • 失效 ref 自动恢复 —— ref 解析不到时,先按 role + 可访问名重新定位,再决定是否报错。
  • 会话自愈 —— 浏览器懒启动、崩溃后自动重启;打开的标签会落盘,下次启动恢复。
  • 持久且隔离的 profile —— ~/.browser-mcp/profile 让登录态跨重启保留,同时与你日常浏览器完全隔离。

分发与打包

  • 通过 OIDC Trusted Publishing 发布到 npm —— CI 里没有长期 token,附带 provenance。
  • 双语文档:README.md(英文)与 README.zh-CN.md。
  • Apache-2.0 许可。
  • 已在 Glama 上架。

安装

npx browser-ref-mcp@0.1.1