VRT MCP
Fetches design references from Figma using the Figma API (file key and node ID, with optional scale) so screenshots can be compared against the design.
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., "@VRT MCP compare http://localhost:3000 to Figma node 1:234 in file abc123"
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.
VRT MCP
Visual Regression Testing MCP Server - Compare page screenshots against design references using AI.
Features
Figma Integration - Fetch designs directly from Figma API
Local File Support - Use local PNG files as design references
Smart Viewport Matching - Auto-match viewport to design dimensions
Side-by-side Comparison - Generate combined design/screenshot/diff images
Pre-actions - Click, scroll, type, wait before capturing
Retry Logic - Configurable retry with different wait strategies
Element Cropping - Screenshot specific elements
Session Caching - Reuse designs across iterations
Diagnostic Analysis - Smart suggestions for high diff percentages
Related MCP server: visual-regression-mcp
Installation
# Clone the repository
git clone https://github.com/yourusername/vrt-mcp.git
cd vrt-mcp
# Install dependencies and setup
npm install
npm run setupThe setup script will automatically check and install:
odiff- Image comparison toolPlaywright Chromium browser
Configuration
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"vrt": {
"command": "node",
"args": ["/path/to/vrt-mcp/dist/index.js"],
"env": {
"FIGMA_TOKEN": "your-figma-token"
}
}
}
}Environment Variables
Variable | Required | Description |
| For Figma source | Get from Figma Settings → Personal Access Tokens |
Usage
Basic Comparison (Local File)
{
"page_url": "http://localhost:3000",
"design_source": {
"type": "file",
"path": "/path/to/design.png"
}
}Figma Source
{
"page_url": "http://localhost:3000",
"design_source": {
"type": "figma",
"file_key": "abc123",
"node_id": "1:234",
"scale": 2
}
}With Pre-actions
{
"page_url": "http://localhost:3000",
"design_source": { "type": "file", "path": "/path/to/design.png" },
"pre_actions": [
{ "type": "wait", "value": 1000 },
{ "type": "click", "selector": ".menu-button" },
{ "type": "wait", "value": ".dropdown-menu" }
]
}Element Screenshot
{
"page_url": "http://localhost:3000",
"design_source": { "type": "file", "path": "/path/to/header.png" },
"crop_to_element": "header.main-header"
}Tools
vrt_compare
Main comparison tool.
Parameter | Type | Default | Description |
| string | required | URL to capture |
| object | required | Figma or file source |
| object | auto |
|
| boolean | true | Match design dimensions |
| number | 1 | Diff threshold (%) |
| string | auto | Session for caching |
| boolean | false | Use cached design |
| string | - | CSS selector to wait for |
| string | networkidle | load/domcontentloaded/networkidle/commit |
| number | 1 | Retry attempts (1-3) |
| number | 1000 | Delay between retries (ms) |
| string | - | CSS selector to crop to |
| array | - | Actions before capture |
| boolean | false | Force side-by-side image |
| boolean | false | Enable antialiasing tolerance |
vrt_session_info
Manage sessions and cache.
Parameter | Type | Description |
| string | list/get/clear/clear_all |
| string | Required for get/clear |
Response
{
"success": true,
"session_id": "abc12345",
"match": false,
"diff_percentage": 5.23,
"threshold": 1,
"passed": false,
"viewport": {
"width": 1280,
"height": 720,
"source": "auto-matched from design"
},
"files": {
"design": "/tmp/vrt-abc12345/design.png",
"screenshot": "/tmp/vrt-abc12345/screenshot.png",
"diff": "/tmp/vrt-abc12345/diff.png",
"side_by_side": "/tmp/vrt-abc12345/side-by-side.png"
},
"cache_info": {
"design_cached": true,
"cache_path": "/tmp/vrt-abc12345",
"created_at": "2025-01-22T10:00:00.000Z"
},
"analysis": {
"likely_causes": ["Minor visual differences - could be font rendering or anti-aliasing"],
"severity": "minor"
}
}Development
npm run build # Build TypeScript
npm run dev # Watch mode
npm run setup # Check/install dependenciesLicense
MIT
Available Tools
2 toolsvrt_compareA
Visual regression test: compare a page screenshot against a design reference. Captures screenshot of URL, compares with Figma design or local image using odiff. Returns diff percentage, path to diff image, and analysis for AI feedback loop.
Workflow:
Provide design source (Figma or local file path)
Tool captures page screenshot (with optional pre-actions)
Compares using odiff
Returns diff result with percentage, diff image, and diagnostic analysis
Features:
Retry with configurable wait strategy
Pre-actions (click, scroll, type, wait) before capture
Crop to specific element
Side-by-side comparison image
Smart analysis for high diff percentages
Use session_id to reuse cached design across iterations.
Inputs: page_url (required), design_source (required), viewport, threshold, +11 more.
vrt_session_infoB
Query or manage VRT sessions and cache. Use to inspect cached designs, list active sessions, or clean up old sessions.
Inputs: action (required), session_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly separate purposes: vrt_compare performs the actual screenshot capture and diff, while vrt_session_info handles inspection and cleanup of session/cache state. There is no realistic way an agent would confuse them, and vrt_compare's description explicitly points to session_id usage, linking the two cleanly.
Both tools use a consistent vrt_ prefix with snake_case noun/verb naming (vrt_compare, vrt_session_info). A fully predictable pattern for a two-tool server.
Two tools is on the thin side even for a narrowly scoped visual regression server. The core work is done by a single tool, with the second only supporting session housekeeping, making the surface feel minimal.
The compare-plus-session-management pair covers the primary iterate-on-diff workflow, including cached design reuse. However, there is no tool for approving/updating baselines, batch or multi-URL comparison, or standalone session creation/deletion beyond the vague 'manage' in vrt_session_info, leaving notable gaps.
Maintenance
Related MCP Connectors
Capture screenshots, detect visual regressions between page versions, and analyze with AI.
Compare Figma designs against live websites and get visual + content QA reports, from inside Claude.
Screenshot web pages, render HTML and diff captures, with images sized for vision models.
Visual regression testing over MCP: upload screenshots, review diffs, approve. No CI needed.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables pixel-perfect image comparison and visual regression testing via tools to compare local images, screenshots, and URLs with detailed diff statistics.346 npm4MIT
- AlicenseAqualityDmaintenanceEnables AI-assisted visual regression testing by capturing baselines, comparing screenshots, and using AI to judge whether visual differences are bugs or acceptable changes.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to compare a live web page against a Figma frame and receive a bounded JSON verdict of design deviations, without sending screenshots or mockups through the model context.MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to see, measure, and verify web pages through a real Chrome browser, including screenshots, responsive layout and accessibility audits, pixel diffing against baselines, secure logins, and deployed-fix verification.271MIT