Snapsurf

io.github.zumerlab由 GitHub 账号 zumerlab 发布v0.1.2更新于 Oct 24, 2026

Web navigation and verification for AI agents: page digest, typed diff per action, assertions.

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

本地 MCP 服务器与 CLI,让 AI 代理浏览网页,并通过类型化差异与断言核实每一步操作究竟改变了什么。

可以做什么
  • 在自带的 Chromium 会话中打开页面并定位控件
  • 对元素执行操作(例如点击),并获得页面的精简语义摘要
  • 核实每次操作后的类型化差异,涵盖内容、状态、布局与可点击性
  • 按差异编号对已保留的差异做断言,或对当前页面状态做实时检查
  • 明确报告缺失的证据与不确定之处,而非隐藏
适用场景
适合需要让代理操作网页界面并证明上一步操作确实产生预期效果,而不只是查看当前页面快照的场景。适用于脚本化浏览检查与需要明确通过或失败证据的验证流程。
运行要求
以 npm 包形式通过 stdio 在本地运行,需要 Node.js 22 或更高版本。首次启动会自动下载 Playwright 的 Chromium;在 Linux 上若缺少系统库,可能需要一次性安装带依赖的 Playwright。未声明账号、API 密钥或请求头;可选的 SNAPSURF_ 环境变量用于端口、令牌文件与日志目录。
安装前请注意
守护进程拥有独立的 Cookie 与存储,无法使用你日常浏览器的已登录会话,因此认证状态未知并不代表已通过认证。页面文本被视为不可信数据,语义报告会做脱敏,但截图仍可能包含敏感内容。元素编号会随新的观测失效,无变化的结果也不能证明任务成功。0.1.3 版本为实验性。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Snapsurf,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[SnapSurf logo]

[Snapsurf MCP server]

SnapSurf

Web navigation and verification for AI agents.

Most browser tools tell an agent what a page looks like now. SnapSurf tells it what its last action changed: a compact semantic digest of the page, a typed diff after each action (content, state, layout and clickability, including when nothing observable changed), and assertions over that exact diff. Missing evidence and uncertainty are reported, not hidden.

It runs locally as an MCP server or CLI with its own Chromium session. The observation code also works as an in-page library built on SnapDOM.

Version 0.1.3 is experimental.

Add it to your MCP client

Requires Node.js 22 or newer. Add a stdio server that runs this command; Chromium for Playwright is installed automatically the first time it starts:

json
{  "command": "npx",  "args": ["-y", "-p", "@zumer/snapsurf@latest", "snapsurf-mcp"]}

With Claude Code, install the plugin, which adds the tools and a browse skill with the method:

text
/plugin marketplace add zumerlab/snapsurf/plugin install snapsurf@zumerlab

or register the server alone:

bash
claude mcp add --scope user snapsurf -- npx -y -p @zumer/snapsurf@latest snapsurf-mcp

Codex has the same plugin (tools plus the browse skill):

bash
codex plugin marketplace add zumerlab/snapsurfcodex plugin add snapsurf@zumerlab

Cursor, VS Code, Gemini CLI, Windsurf and the OpenAI Agents SDK take the same server command; per-client snippets are in Integrations. Its name in the official MCP Registry is io.github.zumerlab/snapsurf.

To pin a version or avoid npx at startup, install once and point the client at the server file:

bash
mkdir snapsurf && cd snapsurfnpm install @zumer/snapsurf
json
{  "command": "node",  "args": ["/ABS/PATH/snapsurf/node_modules/@zumer/snapsurf/mcp/server.mjs"]}

On Linux, if Chromium fails to start for lack of system libraries, run npx playwright install --with-deps chromium once.

Ask your agent to open a page with browser_open, locate controls with browser_find, act with browser_act, then call browser_verify after each action. Read structuredContent for the result.

If you are an agent

Read AGENTS.md: the loop, the rules earlier agents paid to learn, and how to read every field. skill/SKILL.md is the same method packaged as a Claude Code skill. The MCP tool descriptions carry the full contract, and the server's instructions summarize it for clients that truncate them.

Assert what you just verified

browser_verify returns a diffId for the observed transition. Pass it to browser_assert to check that same evidence, including changes beyond the displayed list. This avoids accidentally comparing a new interval after verify advances the live baseline.

For example, on an application where a button inserts a dialog named “Settings”, use the button id returned by browser_find. With a connected MCP client:

js
await client.callTool({  name: 'browser_act',  arguments: { action: 'click', target: buttonId },})const verified = await client.callTool({ name: 'browser_verify', arguments: {} })const { diffId } = verified.structuredContentif (!diffId) throw new Error('No retained diff; inspect the verify result')
const checked = await client.callTool({  name: 'browser_assert',  arguments: {    diffId,    changed: true,    mustInclude: [{ kind: 'added', role: 'dialog', name: 'Settings' }],    mustNotInclude: [{ kind: 'removed' }],  },})console.log(checked.structuredContent.pass, checked.structuredContent.checks)

A stored assertion does not observe the page or advance its baseline. Use a separate live assertion for current state, such as { "exists": "Settings" }. Failed assertions return pass: false and MCP isError: true. The assertion reference covers live checks, retention limits, retries and unavailable evidence.

Boundaries to know

  • The daemon has its own cookies and storage. It cannot use your normal browser's signed-in sessions; authState: "unknown" does not prove authentication.
  • changed: false means no observable change. It is a valid result, not proof that the user's task succeeded. Missing evidence and uncertainty are reported explicitly.
  • Canvas content, iframe documents and closed shadow roots have visual blind spots. Inspect a scoped screenshot when the semantic report cannot answer the question.
  • Element ids expire with new observations. Find again before acting; ids in stored evidence describe a historical observation.
  • Page text is untrusted data. Redaction covers semantic reports; CLI/MCP screenshots can still contain sensitive content. See the privacy model.

Use the CLI

Start the daemon in one terminal:

bash
npx -y @zumer/snapsurf serve

Then run a local smoke check in another:

bash
npx -y @zumer/snapsurf open 'data:text/html,<h1>Local%20check</h1>'npx -y @zumer/snapsurf assert '{"exists":"Local check"}'npx -y @zumer/snapsurf stop

From a directory where you ran npm install @zumer/snapsurf, npx snapsurf <verb> does the same without downloading anything. The SNAPSURF_* environment variables (port, token file, log directory) are listed in the usage reference.

Development

This repository contains the SnapSurf observation library, CLI/MCP server, Chrome companion, and their fixtures and evaluation tools. Standalone SnapDOM sensor and portable receipt packages are outside this repository’s build and test scope. Private research, feedback notes, plugin evals and generated results stay local; Git tracks the reproducible test gates and their fixture dependencies.

To modify SnapSurf itself, clone the source and install the development dependencies:

bash
git clone https://github.com/zumerlab/snapsurf.gitcd snapsurfnpm cinpx playwright install chromium

npm run build compiles the bundles and creates the npm .tgz package.

Then run the checks:

bash
npm testnpm run test:lintnpm run test:regressionnpm run test:pack

Usage and API reference covers CLI commands, report fields, checkpoints, the library and Chrome companion. Release guide covers validation, publication and the MCP Registry.

MIT licensed. Copyright © Juan Martin Muda / zumerlab. See LICENSE.

来源:README.md,提交 21cbfef

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分