ui-diff-mcp
It's a UI-diff server that compares an expected mockup image against an actual mobile screenshot and reports the differences — but the exposed schema is the old archived 18,700-line model-based pipeline, not the small deterministic tool the README describes.
Compare two screens (
compare_ui_images,discover_ui_diffs): takesexpectedImagePath+actualImagePathand returns a run withdiffCount, per-diff findings (criterion, severity, location, evidence, measurements, artifact crops), element/pair lists, unresolved regions, and artifact paths.Run it without blocking (
start_ui_diff_run+get_ui_diff_run_status): launch a long audit in the background, get arunId, then poll status/progress; supportsresumeRunIdto continue a checkpointed run.Pick a model mode:
free, per-provider free routes (free_gemini,free_mistral,free_opencode,free_openrouter,free_nvidia),paid, ordeterministic_only.Capture screenshots (
capture_mobile_screen): grab a screenshot from a connected device viaadborios-simctland get back the image path, dimensions, blank-pixel ratio and validation status.Re-read old results (
read_ui_diff_report): load a previously written report JSON by path, including full stages, diffs, model selection and locator metadata.Check model availability (
ui_diff_model_health): probe each visual model role/provider and see pass/fail.Caveat: none of this matches the README's claims of "no models, no GPU, no network" or the documented
compare_screens/capture_android_screentools (ignoreTop,maxShift,shifts,moved, inline JPEG zooms) — those tools do not exist in this schema, and the parameters here (mode,projectRoot,runLabel) are the archived pipeline's.
Provides integration with NVIDIA's Vision Language Model (VLM) for analyzing mobile app screenshots and comparing them against mockup designs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ui-diff-mcp compare screenshot of login page to design mockup"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ui-diff-mcp
Compares an expected screen (a mockup, or an earlier screenshot) with an actual screenshot, for coding agents that can see images. It does the parts a model is bad at, deterministically, and hands the pictures back so the agent judges them itself:
Even out: both screens are scaled to one width; the aspect-ratio difference is reported. A status bar at the top is found and skipped.
Line up: each horizontal strip of the expected screen is matched to where it sits in the actual one (one smooth path over all strips, then a sideways correction per strip), so content that only moved is reported as a shift, not as dozens of changes.
Match size: when offsets grow steadily down the screen, the device draws everything larger (it is narrower in dp than the mockup, e.g. 360 dp against 402 dp). The actual is shrunk by the measured factor and compared again, ignoring the one-pixel fringe resizing leaves on edges. The better of the two comparisons is kept.
Box what still differs: a pixel diff after lining up, grouped into numbered boxes. A box whose content reappears a little to the side or below is reported under
moved, not as a change.Show it:
compare.png(expected | actual | changes, boxes numbered) and a full-resolution zoom per box (zoom-N.png, expected left, actual right).
No models, no GPU, no network. A typical phone screen takes about 5 seconds on the Pi.
Tools
Tool | What it does |
|
|
| Screenshot of the phone over adb → PNG, with |
Result JSON: expected/actual sizes, aspectMismatchPct, changedPct (after lining up),
unalignedChangedPct, scaleApplied, ignoredTop, shifts[] (fromY, toY, shiftPx,
shiftPct, shiftXPx, in expected pixels), regions[] (id, x, y, w, h, changedPct),
moved[] (x, y, w, h, dx, dy), images, and plain-language notes.
Related MCP server: MCP Design Comparison Server
Use
npm install && npm run build
# MCP (stdio):
claude mcp add ui-diff -- node /home/agent-runner/projects/ui-diff-mcp/dist/src/index.js
# Or straight from a shell:
npx tsx src/cli.ts compare expected.png actual.png [outDir] --ignore-top=0.04
npx tsx src/cli.ts capture out.pngHow to read a result:
Start with
notes. When the reference was made for a different screen width the actual is compared at matching size (scaleApplied); the strip the narrower screen doesn't reach shows grey and isn't checked. A reference at the device width (360 dp on the Samsung) is still cleanest.Then look at
compare.pngand the zooms, and judge each box against the project's rubric (/home/agent-runner/projects/_ui-review/RUBRIC.md).For catching regressions in CI, prefer golden tests (Flutter
matchesGoldenFile, PlaywrighttoHaveScreenshot). This tool is for looking at a difference, not for gating builds.
How well it works
eval/run.ts <screenshots> <out> plants known changes into copies of real screenshots and scores
the comparisons; eval/widths.ts <out> <url>... renders pages at 402 px and as a 360 dp phone at 3x
and scores those. The screenshots stay outside the repo. On 19 screens of the owner's apps
(November 2026), every planted colour change, removal, nudge, addition and resized patch was found,
with at most one false box on average. Known weak spots: a section pushed down near the bottom
(15 of 19 clean), JPEG noise on mockups (a stray box on 3 of 19), and a whole screen drawn larger,
where the change is found but about 5 more boxes come from text drawn at a different size. When a
web page reflows at a narrower width, the boxes mark the reflow (wrapped chips, cut-off text),
which is a real difference but can crowd out a small mistake.
Why it is this small
Until November 2026 this repo was an 18,700-line pipeline: a 3B element locator on a remote GPU,
per-element crop audits by many free vision models, and a large finding-consolidation layer.
Runs took 8–20 minutes and around 68 model calls, and produced dozens of findings per screen
(47 on Ravlo's Today screen). A single look by a current frontier model at a side-by-side found the
same designer-relevant differences in about a minute. What models still get wrong is scale,
alignment and small shifts, so that is all this tool does. The old pipeline is kept under the tag
archive/full-pipeline-2026-11.
Available Tools
7 toolscapture_mobile_screenB
Captures a screenshot from a connected mobile device using adb or ios-simctl.
Inputs: target (required). Returns: capture, imagePath
compare_ui_imagesC
Compares an expected mobile mockup image against an actual mobile screenshot using only deterministic methods (no visual models).
Inputs: actualImagePath (required), expectedImagePath (required), mode, runLabel, +1 more. Returns: runId, status, summary, warnings, +11 more
discover_ui_diffsC
Runs full UI diff analysis, including visual model-based target discovery and classification. Compares expected mockup against actual screenshot.
Inputs: actualImagePath (required), expectedImagePath (required), mode, runLabel, +1 more. Returns: runId, status, summary, warnings, +11 more
get_ui_diff_run_statusB
Returns the status of a background UI diff run started by start_ui_diff_run.
Inputs: runId (required), projectRoot (required). Returns: error, label, runId, status, +7 more
read_ui_diff_reportB
Reads and returns a previously generated UI diff report JSON file.
Inputs: reportPath (required). Returns: report
start_ui_diff_runA
Starts a UI diff run in the background without holding the MCP request open. Returns a runId to poll with get_ui_diff_run_status. Use this for large or slow audits like Calorix full scans.
Inputs: actualImagePath (required), expectedImagePath (required), mode, label, +2 more. Returns: runId, status, message
ui_diff_model_healthA
Checks health of all visual models used by the diff pipeline.
Inputs: no named parameters. Returns: results, checkedAt
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Tools are mostly distinct but compare_ui_images and discover_ui_diffs both compare screenshots; descriptions clarify deterministic vs model-based, but could cause temporary confusion.
Naming is inconsistent: some tools start with verbs (capture, compare, discover, get, read, start) while ui_diff_model_health is a noun phrase. Also mixing ui_diff and ui_diffs, and get vs read.
7 tools is well-scoped for UI diffing: capture, two compare modes, background run management (start, status, report), and health check. No unnecessary tools.
Covers core workflow: capture, compare (sync/async), background run, report retrieval, model health. Minor gap: no tool to list or cancel runs, but not critical.
Related MCP Connectors
Capture screenshots, detect visual regressions between page versions, and analyze with AI.
Visual regression testing over MCP: upload screenshots, review diffs, approve. No CI needed.
Free, keyless drift checks of UI code against your own design tokens: color, radius, spacing, type.
Build and edit app screen mockups and clickable prototypes from your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAnalyzes app screenshots to identify UI/UX issues, compare designs with implementations, and provide actionable fixes using GPT-4o/GPT-5.2 vision capabilities. Supports single/batch analysis, design comparison, and automated report generation for iOS, Android, web, and desktop platforms.MIT
- AlicenseAqualityDmaintenanceCompare design and implementation screenshots using pixel-by-pixel analysis, generating visual diff images and metrics.125 npmMIT
- -licenseNot gradedqualityNot gradedmaintenanceConverts UI screenshots into validated, editable Flutter widgets, with visual diff comparison and preview.-
- AlicenseAqualityBmaintenanceEnables AI-driven visual QA by capturing web pages and comparing screenshots with SSIM to detect visual regressions, changed regions, and previews, while supporting authenticated sessions and OAuth for apps behind login.181MIT