How to Build Your Own AI Code Verification System >>> Join a hands-on webinar on Dec. 15th!

AI Can Build the Screen. Can It Prove It Matches the Design?

December 3, 2026
|
Mahfuz Rahman

On this page

The Problem: Designs Drift on the Way to Code

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.

A Solution: Use the Design as the Baseline

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.

Meet the Two Tools

The Applitools MCP Server

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:

  • Setup and configuration: helps get your project up and running quickly. It verifies your API key, sets up Eyes in a Playwright project, adds visual checkpoints for you, and configures the Ultrafast Grid. It’s optional and only needed one time (see Setup below for details).
  • Inspection: it reads batch sessions and steps from Eyes (e.g., finds changed areas, exports baseline and checkpoint images, and compares DOM captures).
  • Review: runs a guided investigation of relevant items in Eyes (e.g., a batch, scenario, session, or step) then summarizes what changed and whether it looks like a bug. It can run in inspect mode (read-only) or resolve mode.
  • Resolution: enables you to easily accept, reject, or adjust match regions. Saving to the baseline always requires your explicit approval.

Figma Dev Comparison

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.

How they connect

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.

Setup

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.

  1. Connect the MCP Server. Install the Applitools extension for VS Code or Cursor, or add @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.
  2. Give Eyes access to Figma. Create a Figma personal access token with file_content:read scope and set it as FIGMA_ACCESS_TOKEN.
  3. Optional, one time, Playwright only: set up Eyes. If your Playwright project does not use Eyes yet, ask the agent to set it up through the MCP Server. It configures Eyes (including the Eyes reporter) and adds visual checkpoints to the tests you point it at. If your project already runs Eyes, skip this step.

The Combined Workflow, Step by Step

  1. The designer finalizes the frame in Figma. Nothing needs to be exported. The developer only needs a link: right-click the frame and choose Copy/Paste as, then Copy link to selection.
  2. The agent links the test to the design. You ask the agent to add a figmaBaselines entry that maps the test name to the Figma URL.
  3. Tests run locally, and Visual AI compares build to design. Eyes shows the Figma design as the baseline and your implementation as the checkpoint. The viewport is sized to the design automatically.
  4. The agent reviews the results. Ask it to review the batch in inspect mode. It gathers changed areas, image diffs, and DOM diffs, then explains what differs from the design and whether it looks intentional.
  5. The team decides together. Designers, developers, and QA open the same results in the Eyes dashboard, where each step links back to the exact Figma frame. Once the build matches, accept it, and future runs use it as the regression baseline.

What It Looks Like in Practice

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.

Something for Everyone

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.

Getting Started Checklist

  • Node.js LTS or newer and the latest Playwright and Eyes Playwright Fixtures SDK
  • Applitools MCP Server installed (VS Code or Cursor extension, or npx @applitools/mcp@latest)
  • APPLITOOLS_API_KEY, plus APPLITOOLS_READ_KEY and APPLITOOLS_WRITE_KEY for review
  • A Figma personal access token with file_content:read, set as FIGMA_ACCESS_TOKEN
  • Figma links copied for the frames or components you want to check
  • A figmaBaselines entry whose keys match your test names exactly
  • Figma mode disabled in CI if you only want design checks locally

Try It on One Screen

Pick 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.

Quick Answers

Why do AI coding agents cause design drift between Figma and code?

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.

How do the Applitools MCP Server and Figma Dev Comparison work together?

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.

Does Figma Dev Comparison replace the Applitools Eyes Figma Plugin?

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.

How do you link a Playwright test to a Figma frame in Applitools?

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.

What can the Applitools MCP Server do during a visual test review?

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.

©2026 Applitools