
How to Build Your Own AI Code Verification System >>> Join a hands-on webinar on Dec. 15th!
Every design system loses a little fidelity between Figma and production. A font weight changes, padding shrinks by 4px, a button picks up the wrong shade of blue. None of it breaks a functional test, so none of it gets caught.
The usual fix is manual. A designer screenshots the build, puts it next to the Figma frame, and files comments. A developer fixes them, and the loop repeats. It is slow, and it depends on someone looking closely at every screen.
AI-generated code makes this harder. When an agent produces hundreds of lines in minutes, nobody reviews every line, and the tests it writes tend to confirm what it built rather than what was designed. You need a deterministic visual check against the design itself, inside the same workflow where the code is being written.
This post shows how to close the gap created by design drift by pairing a Figma design directly with Applitools using two of its capabilities: the Applitools MCP Server and Figma Dev Comparison. Together, they give you a reliable design-to-code check that you can set up quickly in your coding workflow.
TL;DR / Key takeaways
When AI builds the UI, Figma is the spec. By pairing Figma Dev Comparison (which uses live Figma frames and components as visual baselines) with the Applitools MCP Server (which lets coding agents configure checks and inspect image and DOM diffs inside your IDE), teams can catch design drift locally before it reaches review or production.
The Applitools MCP Server connects your coding agent of choice to Applitools Eyes through the Model Context Protocol. It gives your agent purpose built Eyes tools for this use case.
The tools fall into four groups:
Figma Dev Comparison lets an Eyes test use a Figma frame, component, or component set (which is a component with all its variants, such as every state of a button) as its visual baseline. You map each Eyes test by its name to a Figma URL through a figmaBaselines setting.
Once this information is set, Eyes resolves the design, sizes the viewport to match it, and compares your implementation against it.
// applitools.config.js
figmaBaselines: {
'Login Screen': 'https://www.figma.com/design/<file>/<name>?node-id=1-2',
},
By default it runs in auto-baseline mode (meaning, a baseline image is automatically captured for you using the Figma design). A test compares against the Figma design until you accept an implementation. After that, it runs as a normal regression test, until the Figma design itself changes and the comparison against the design starts again.
NOTE: Already using the Eyes Figma Plugin to export frames? We now recommend Figma Dev Comparison for design-to-code checks.
There is no single “MCP plus Figma” feature in Applitools. The glue is the Eyes test itself. The MCP Server helps create and review the test, and Figma Dev Comparison tells that test which design to compare against.
You need two things before the first run, plus one optional step for Playwright teams new to Eyes. Full details are in the Applitools MCP Server docs and the Figma Dev Comparison docs.
@applitools/mcp to any MCP client’s config. Set APPLITOOLS_API_KEY for test runs, plus APPLITOOLS_READ_KEY and APPLITOOLS_WRITE_KEY for the review tools.file_content:read scope and set it as FIGMA_ACCESS_TOKEN.figmaBaselines entry that maps the test name to the Figma URL.With Eyes already in the project, here is a realistic first prompt a developer might give their agent in Cursor or Claude Code:
Add a figmaBaselines entry to applitools.config.js that maps the "Login Screen" test to thisFigma link: <paste Figma link>. Use auto-baseline mode for local runs and disable Figma comparison in CI.
The result should look roughly like this. The key rule: the figmaBaselines key must match the test name exactly, or Eyes quietly runs it as a normal regression test.
Javascript
// applitools.config.js [VERIFY against current docs]
module.exports = {
figmaBaselines: {
'Login Screen': 'https://www.figma.com/design/dOkZ46m7Ewi3giAVNqr02Y/Figma-Integration?node-id=4-53&t=e9I6uUvGWmLafld8-4',
},
figmaOptions: {
mode: process.env.CI ? 'disabled' : 'auto-baseline',
},
};
Typescript
// tests/login.spec.ts [VERIFY against current docs]
import { test } from '@applitools/eyes-playwright/fixture';
test('Login Screen', async ({ page, eyes }) => {
await page.goto('/login');
await eyes.check('Login page', { fully: true });
});
After the run, a follow-up prompt turns results into answers:
Review my last batch in inspect mode. Tell me where the Login Screen differs from the Figma design and whether each difference looks like a real bug. Don't resolve anything yet.

While a screen is still being built, it will differ from the design by definition. Here the design check runs on a local build, not in CI, so use your SDK’s non-throwing close option to keep expected differences from failing your local run.
Designers stop screenshot-hunting. The Figma file stays the source of truth, and when a frame changes, auto-baseline mode brings the design comparison back without anyone re-approving baselines by hand. Every result links straight to the frame it was checked against.
Developers stay in their code editor of choice. The agent handles Eyes setup and checkpoint code, and the review tools explain diffs in plain language instead of sending you through the dashboard test by test.
QA engineers get evidence, not opinions. Reviews collect image diffs, DOM diffs, and history before reporting a finding, and nothing is saved to a baseline without explicit approval. The same review tools work on Eyes results from any SDK, so existing suites benefit too.
npx @applitools/mcp@latest)APPLITOOLS_API_KEY, plus APPLITOOLS_READ_KEY and APPLITOOLS_WRITE_KEY for reviewFIGMA_ACCESS_TOKENfigmaBaselines entry whose keys match your test names exactlyPick one screen your team just designed and let your agent do the setup and the review. You will know within a single run where the build and the design disagree.
New to Applitools? Start a free trial or schedule a demo with an Applitools specialist.
When an AI coding agent generates hundreds of lines of front-end code in minutes, subtle visual discrepancies like shifted padding, wrong font weights, or off-brand button colors easily slip in. Because these changes do not break functional assertions, standard tests still pass while the UI drifts from the original Figma spec.
They connect through your Applitools Eyes test. Figma Dev Comparison maps each Eyes test by name to a live Figma frame, component, or component set URL as a visual baseline. The Applitools MCP Server lets your AI coding agent set up tests, inspect image and DOM diffs, and summarize visual bugs directly inside your IDE.
Yes. For design-to-code checks, Applitools recommends Figma Dev Comparison over exporting frames with the Eyes Figma Plugin. Figma Dev Comparison pulls the baseline directly from the live Figma URL, sizes the viewport automatically, and re-triggers design comparison whenever the Figma frame updates.
Add a figmaBaselines object to your applitools.config.js file mapping your exact Eyes test name to the copied Figma frame or component URL. By default, it runs in auto-baseline mode locally (and can be disabled in CI via figmaOptions) until you approve the build as your ongoing regression baseline.
In read-only inspect mode the Applitools MCP Server reads batch sessions and steps from Eyes, gathers changed areas, compares image and DOM captures. It then explains in plain language where the implementation differs from the Figma design and whether each diff looks like a bug. All done efficiently and deterministically. Note that saving changes to a baseline always requires explicit human approval.