Blog post

Figma to code with AI in 2026: what works and what doesn't

Author

Michal Bryniarski

Category

Design

Date

Nov 25, 2026

In June 2025, a user asked on Figma's forum why Claude Code and Cursor, given a link to a Figma component, got its styling "85%-90% wrong" when Figma Make matched the same design closely. The thread has since been viewed more than 10,000 times. Part of that was the early desktop server freezing. The harder problem is still there. The code looks close to the design but ignores your tokens and components.

In the Figma2Code benchmark, presented at ICLR 2026, researchers gave ten models 213 Figma designs with their file data. GPT-5 scored highest on the paper's visual-similarity measure, and 37.72% of the Tailwind classes in its output used arbitrary values such as "w-[123px]" or "bg-[#ff0]", which the authors treat as departures from standard design tokens.

What to expect

In the same forum thread, another user reached about "75% with about 5/10 mins of prompted tweaks" after naming layers and components and using auto layout. At the other end, a commenter on Hacker News described their company's workflow in November 2026: UI controls live in a Figma asset library, and the PM's wireframes are recreated in Figma "so it's actually implementable". Pointed at those files, Claude gets "the UX about 95% correct the first time."

In the benchmark, the models that scored highest on visual similarity tended to use the most hardcoded values, partly, the authors found, because they copy raw values from the Figma data. The models were 2024 and 2025 releases run without Figma's MCP server, so read this as a pattern, not a score for today's tools.

Bar chart from the Figma2Code benchmark, ICLR 2026: share of Tailwind classes using arbitrary values, with each model's visual similarity score. GPT-5 37.7%, Gemini 2.5 Pro 25.5%, Claude Opus 4.1 23.3%, Llama 4 Scout 0.9%, Grok 4 50.0%. The models with the closest visual match leaned on hardcoded values

Why it misses your code

The main tool in Figma's MCP server, "get_design_context", returns what Figma's own guide calls a "structured React + Tailwind representation" of the frame, "a starting point" for the agent to translate into your code. The sample rules in that guide tell the agent to treat the output "as a representation of design and behavior, not as final code style." A mapped component instance can become your component in that translation, and a typed-in hex value arrives as hex.

Large frames also return too much context at once, so Figma's tool docs suggest "get_metadata" to get an outline, then fetching only the parts you need. And the tools have bugs. From February 2026, forum users reported that "get_design_context" returned a component's default variant instead of the instance's own values. By April one reporter could no longer reproduce it, but Figma hadn't confirmed a fix.

File hygiene that matters

Figma's guide to structuring a file for the MCP server lists the habits below, and Figma's support team adds a published library when Code Connect is involved.

In the Figma file

How to check it

What the agent gets

Variables

Colours and spacing use variables

Token names instead of hex

Components

Repeated parts are instances

Your component, once mapped

Auto layout

Resize it; content reflows

Flex layout

Annotations

States and behaviour noted

Intent the pixels can't show

Published library

Instances come from a library

Shared components

Naming

No "Frame 1268" in layers

Names it can reuse in code

Start with the frames you're about to build. Figma suggests that you "resize the frame to check that it behaves the way you expect" before generating code. If the contents stay where they were, the agent gets fixed positions too.

Code Connect, in practice

Code Connect maps a Figma component to the one in your repository, and the MCP server wraps each mapped instance in a snippet with its import and props. We covered Figma's measurements of its time and token savings in our post on design systems as AI onboarding docs. Map the components on every screen first, such as buttons, inputs and form fields.

Three limits matter here.

  • It needs a Full or Dev seat, and Professional plans get one active library and one framework.

  • Mappings made with the CLI show up in Figma's UI, but you can only edit them from the CLI.

  • Mappings can fail to reach the agent. In August 2026 a developer reported that "get_code_connect_map" returned an empty result over the remote server; in September it was still unresolved.

When mappings go missing, start with the checks Figma's support team suggested there. Publish the library, map nested components too, test an instance rather than the main component, and match the Code Connect label exactly as Dev Mode shows it. These didn't fix that reporter's case, so if mappings still don't arrive, file a report with the node link.

If you don't ship React

Figma's docs say you can ask for another framework in the prompt, such as Vue, plain HTML and CSS, or iOS. The layout still starts as React. In April 2026 a developer with Code Connect mappings for React and Jetpack Compose asked why the remote server "still returns React+Tailwind instead of my Compose code". About a month later a Figma team member replied that engineering "confirmed that this is expected behavior": the tool "always returns React + Tailwind code". Their advice was to have the AI client translate it.

Mapped components are the exception. Figma's Code Connect integration docs now say that a component connected to more than one framework comes back in the one your agent names in the "clientFrameworks" parameter on the remote server, or the one selected in Dev Mode on the desktop server. Test one mapped component in your stack before relying on it. Professional plans allow one active framework.

For SwiftUI, Compose or Vue teams, the layout still goes through two translations, and each can lose detail. In October 2026 an iOS developer on Hacker News called the remote server "a poor fit for iOS development", because "it sets tokens on fire and gives Claude the details as React+Tailwind". Xcode is now among the listed clients for the remote server. If you stay with it, start from Figma's "create_design_system_rules" prompt, which drafts a rules file in clients that support MCP prompts, and add the second translation: which layout primitive replaces a flex row, which token replaces each spacing value, and which component replaces each common pattern.

Seats and rate limits

The remote server works only with clients listed in Figma's MCP catalog, such as Claude Code, Cursor and VS Code. In November 2026, Figma began rolling out an allowlist of approved OAuth apps, MCP clients included, for Organization and Enterprise admins, so check with yours first.

Tools that read from Figma are rate-limited by seat and plan, counted in tool calls:

Seat

Plan

Read tool calls

View or Collab

Any plan

20 per month

Full or Dev

Professional

200 a day, 10 a minute

Full or Dev

Organization

200 a day, 15 a minute

Full or Dev

Enterprise

600 a day, 20 a minute

Everyone on the Starter plan gets 20 calls a month too.

Figma's sample rules call "get_design_context" and "get_screenshot" for the nodes being built, and "get_metadata" when a response is truncated, so count calls per section rather than per page. Tools that read Figma through its REST API, such as v0's Figma import, run into a separate set of limits, also set by plan and seat.

Checking what you get

Run these four checks on each screen.

  1. Compare at the same width. Export the frame or use "get_screenshot", open the built page at the frame's width, and put the two side by side.

  2. Search for raw values. Look for hex colours and bracket values such as "p-[23px]", skipping variants like "data-[state=open]:". Our design system post covers lint rules for this.

  3. Look for duplicate markup. If the page has its own button markup while your "Button" exists, a Code Connect mapping is missing or didn't arrive.

  4. Check the variants. Compare size, state and variant props with the instance in Figma, given the override reports from earlier this year.

A screenshot test keeps an approved screen there. With Playwright's "toHaveScreenshot", the first run fails with a note that it wrote a reference image. Check that image and commit it, and later runs fail when the page differs.

Your own context, or none

Some teams skip Figma's server. In an October 2026 Hacker News thread, one developer said their team "made our own optimized MCP in just two weekends" on Figma's plain REST API, returning "a cleaned down intermediate structure" plus "a screenshot of each screen." The iOS developer quoted above had Claude build small tools that return only the fonts, layout dimensions or colours.

Route

Needs

Fits when

Screenshots only

Nothing extra

Small pages, strong library

Figma MCP with Code Connect

Full or Dev seat, mappings

React web, mapped components

Figma MCP, no mappings

Full or Dev seat

Early drafts and spikes

Your own REST API tool

Full or Dev seat, upkeep

Other stacks, daily caps

v0 or Figma Make

Paid v0 plan or AI credits

Prototypes and demos

Your own tool gives up Code Connect snippets. It pays off when your stack isn't React, or when Full and Dev seat holders keep hitting the MCP server's daily cap. The REST API counts per minute for those seats, but View and Collab seats get only 20 file reads a month there too.

Two-by-two matrix of where to start. React web with mapped components: use the Figma MCP. React web without mappings: map core components first. Other stacks with mappings: add translation rules. Other stacks without mappings: build your own context tool on Full or Dev seats

Our part in this

Our designers and front-end developers work on both ends of this handoff: the Figma library with its variables, auto layout and Code Connect mappings, and the translation rules and screenshot tests on the code side. Where Figma's server doesn't fit your stack, we build the smaller tool instead.

Hybrid Intelligence