mcpField
S
snapdiff

snapdiff

Local
github.com/corralimitedDeveloper Tools5Updated 7w ago

About snapdiff

snapdiff is an MCP server for coding agents to capture web pages and verify visual changes. It exposes SnapDiff’s REST-backed comparison tools through a local stdio process.

Key features

  1. 01Compare page screenshots
  2. 02Verify UI changes against intent
  3. 03Capture URL screenshots
  4. 04Render HTML/CSS as images

Use cases

  1. 01Check whether a UI edit introduced a regression
  2. 02Compare a page with a saved baseline
  3. 03Create image assets from HTML/CSS

MCP support

Exposes four visual testing tools to MCP clients, including comparison, screenshot capture, UI-change verification, and HTML/CSS rendering. The standalone server uses stdio and requires a SnapDiff API key.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ai-snapdiff": {
"command": "npx",
"args": [
"-y",
"@corralimited/snapdiff-mcp"
],
"env": {
"SNAPDIFF_API_KEY": "<SNAPDIFF_API_KEY>",
"SNAPDIFF_API_URL": "<SNAPDIFF_API_URL>"
}
}
}
}
Run commandnpx -y @corralimited/snapdiff-mcp
Environment variables to set
SNAPDIFF_API_KEYSecretSnapDiff API key. Get one at https://snapdiff.ai/dashboard.
SNAPDIFF_API_URLOverride the API base URL. Defaults to https://api.snapdiff.ai/v1.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@corralimited/snapdiff-mcp0.5.0

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
afterstringYesURL of the "after" page (e.g. staging URL or localhost) — the page to check
beforestringNoURL of the "before" page to compare against. Omit when using baseline mode.
branchstringNoBranch name for baseline lookup. Defaults to the project's default branch.
projectstringNoProject slug or ID for baseline mode. When set with page_name, diffs against the stored baseline.
full_pagebooleanNoCompare full scrollable pages. Default false
page_namestringNoPage name within the project (e.g. "homepage", "pricing"). Required for baseline mode.
thresholdnumberNoPixel sensitivity 0.0-1.0. Lower = more sensitive. Default 0.1
ignore_selectorsarrayNoCSS selectors to exclude from comparison (e.g. timestamps, ads)

Details

From the project 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
claude mcp add snapdiff -e SNAPDIFF_API_KEY=sk_live_... -- npx -y @corralimited/snapdiff-mcp

Or edit ~/.claude/settings.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):

{
  "mcpServers": {
    "snapdiff": {
      "command": "npx",
      "args": ["-y", "@corralimited/snapdiff-mcp"],
      "env": { "SNAPDIFF_API_KEY": "sk_live_..." }
    }
  }
}
Cline (VS Code)

Cline > MCP Servers > Edit Config:

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

~/.config/zed/settings.json:

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

~/.continue/config.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: npx
args:    -y @corralimited/snapdiff-mcp
env:     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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.