Snapdiff

ai.snapdiff由 snapdiff.ai 发布v0.5.0更新于 Oct 24, 2026

Visual-diff & change-detection tools that catch agentic UI drift for coding agents.

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

概览

AI 生成的概览

让编程助手通过 SnapDiff API 截取网页截图、进行视觉差异对比,并对照基线验证 UI 变更。

可以做什么
提供四个工具:对照声明的意图验证 UI 变更并返回判定结果与下一步操作;对比两个页面或页面与已存基线,给出差异百分比和高亮差异图;截取任意 URL 的截图;将 HTML/CSS 渲染为图片。它调用 SnapDiff REST API,以 stdio 子进程在本地运行,因此基于 Playwright 的本地工具在你的机器上执行。托管端点也提供相同的工具集。
适用场景
适合编程助手需要确认某次 UI 修改产生了预期视觉变化且没有回归时使用,也适合在不离开助手的情况下做临时页面差异对比、截图或生成 OG 卡片等图片。
运行要求
需要 Node.js 与 npx 在本地运行该 npm 包;需要 SnapDiff API 密钥,通过环境变量 SNAPDIFF_API_KEY 提供;需要访问 SnapDiff API 的网络连接。可选环境变量 SNAPDIFF_API_URL 可覆盖 API 地址。
安装前请注意
需要 SnapDiff API 密钥,这是与计费账户绑定的凭据,请勿写入共享配置文件。服务器会将你提交的 URL 和 HTML 发送至 SnapDiff API,请避免提交不希望离开本机的内容。验证功能依赖已配置的项目和基线。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@corralimited/snapdiff-mcp

Standalone MCP server for SnapDiff. Exposes four tools to local agents:

  • Compare two web pages visually — diff percentage plus a highlighted diff image
  • Capture a screenshot of any URL
  • Check whether a page changed vs. a previous capture
  • Render HTML/CSS to an image (OG cards, social images, email headers)

Hits the public SnapDiff REST API. Bring your own API key.


Quickstart

Get an API key at https://snapdiff.ai/dashboard, then drop the snippet for your agent below.

Claude Code

bash
claude mcp add snapdiff -e SNAPDIFF_API_KEY=sk_live_... -- npx -y @corralimited/snapdiff-mcp

Or edit ~/.claude/settings.json:

json
{  "mcpServers": {    "snapdiff": {      "command": "npx",      "args": ["-y", "@corralimited/snapdiff-mcp"],      "env": { "SNAPDIFF_API_KEY": "sk_live_..." }    }  }}

Cursor

~/.cursor/mcp.json (or project-level .cursor/mcp.json):

json
{  "mcpServers": {    "snapdiff": {      "command": "npx",      "args": ["-y", "@corralimited/snapdiff-mcp"],      "env": { "SNAPDIFF_API_KEY": "sk_live_..." }    }  }}

Cline (VS Code)

Cline > MCP Servers > Edit Config:

json
{  "mcpServers": {    "snapdiff": {      "command": "npx",      "args": ["-y", "@corralimited/snapdiff-mcp"],      "env": { "SNAPDIFF_API_KEY": "sk_live_..." }    }  }}

Zed

~/.config/zed/settings.json:

json
{  "context_servers": {    "snapdiff": {      "command": {        "path": "npx",        "args": ["-y", "@corralimited/snapdiff-mcp"],        "env": { "SNAPDIFF_API_KEY": "sk_live_..." }      }    }  }}

Continue

~/.continue/config.yaml:

yaml
mcpServers:  - name: snapdiff    command: npx    args: ["-y", "@corralimited/snapdiff-mcp"]    env:      SNAPDIFF_API_KEY: sk_live_...

Anything else with a generic stdio MCP slot

command: npxargs:    -y @corralimited/snapdiff-mcpenv:     SNAPDIFF_API_KEY=sk_live_...

Tools

NamePurpose
snapdiff_verify_ui_changeChecks whether a visual change matches the agent's stated intent. Returns verdict (pass / expected_change_detected / unexpected_regression / no_change_detected / needs_human_review) and a next_action. Requires a project + baseline. Use this in the verification loop.
snapdiff_compare_pagesRaw visual diff between two URLs, or a URL vs. a stored project baseline. Use for ad-hoc diffs that don't fit the verify-ui-change verdict shape.
snapdiff_capture_screenshotSingle screenshot of a URL.
snapdiff_html_to_imageRender HTML/CSS to an image (OG cards, social images, email headers).

Schemas live in src/tools/ and are exported from @corralimited/snapdiff-mcp/tools. The hosted SnapDiff backend imports the same schemas so its in-process /mcp endpoint and this standalone stdio server expose an identical surface — agents see the same tool names, descriptions, and parameters whether they connect to https://api.snapdiff.ai/mcp or run this server locally.


Remote HTTP access

This package speaks stdio only — your editor spawns it as a subprocess, and the Playwright-backed localhost tools run on your machine, where your dev server actually is. It does not open a port.

If you need an HTTP endpoint, use the hosted one at https://mcp.snapdiff.ai/mcp, which authenticates every request with your API key and exposes the same tool surface.


Configuration

Env varRequiredNotes
SNAPDIFF_API_KEYyesGet one at https://snapdiff.ai/dashboard
SNAPDIFF_API_URLnoOverride the API base. Defaults to https://api.snapdiff.ai/v1.

There are no CLI flags beyond --help.


License

MIT — see LICENSE.

来源:README.md,提交 e420175

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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