Skip to content

Figma MCP and Design-to-Code in 2026

The Figma MCP server is Figma’s official remote server at https://mcp.figma.com/mcp: it gives Claude Code, Codex and Cursor a frame’s layout, variables, screenshot and Code Connect mappings, and in beta it can write to the canvas. Generated code reliably reuses a team’s own components when Code Connect mappings exist or the prompt names them, and a screenshot test proves the match.

A designer hands you a Figma link for the new profile page. The agent builds it in four minutes, and the pull request adds a hand-rolled button in #4F86F7, a rounded-[10px] card, and an avatar that ignores the <Avatar /> your team maintains. Nothing is broken. Your design system has just forked, and nobody will notice until the third blue ships.

This page is for developers who implement Figma designs with an agent, and for tech leads who want those implementations to reuse the design system and pass a visual gate instead of a reviewer squinting at pixels.

  • The Figma server installed in Claude Code, Codex and Cursor, as a plugin with skills or as a bare MCP server, with the seat limits you need to know first.
  • A copy-paste prompt that implements a frame with your existing Button and Card components.
  • A four-step design-system sync: tokens, Code Connect mappings, component generation, and a Playwright visual check.
  • A verification gate that proves parity without anyone reading the generated markup line by line.
  • The traps that produce plausible but wrong setups, and the recovery for each failure.

What the Figma MCP server can do in September 2026

Section titled “What the Figma MCP server can do in September 2026”

The server reads design data and, on the remote server only, writes it. These tools were listed by the live server connected on 2026-09-26; Figma’s tools and prompts page keeps the full, current list.

ToolWhat it returns or doesUse it for
get_design_contextA structured React + Tailwind representation of the node, plus design contextThe main input for implementation; translate it to your stack
get_metadataA sparse map of layer IDs, names, types, positions and sizesLarge frames: find the child node before a full pull
get_screenshotAn image of the nodeThe visual reference, and the baseline for the parity check
get_variable_defsVariables and styles used in the selection (color, spacing, typography)Token names instead of raw hex values
get_code_connect_map · add_code_connect_mapWhich Figma components map to which code componentsReusing your components instead of generating new ones
use_figma · generate_figma_designCreate or edit frames, components, variables and auto layoutCode-to-design work (write to canvas, beta)

Three vendor facts decide whether this works for your team (Figma, figma/mcp-server-guide README, read 2026-09-26):

  • Rate limits depend on the seat. Starter plan users, and View or Collab seats on paid plans, are limited to “up to 6 tool calls per month”. Dev or Full seats on Professional, Organization and Enterprise plans get per-minute limits that follow Tier 1 of the Figma REST API. Some tools, such as those that write to Figma files, are exempt.
  • Write to canvas is a beta. It is free “during the beta period” and “will eventually be a usage-based paid feature”. Do not build a team process that depends on its price.
  • Code Connect needs Organization or Enterprise. The Code Connect README (@figma/code-connect 2.0.1) says it “requires a full Design or Dev Mode seat”. On Starter or Professional you still get design context, but no component mappings.

Figma ships the server two ways. The plugin bundles the remote server with 14 Agent Skills (Beta), including figma-design-to-code, figma-code-connect, figma-generate-library and figma-use, which the server itself names as mandatory before any use_figma canvas write. The bare server is only the MCP connection.

Figma pluginBare MCP server
What you getRemote server plus 14 skills that sequence the toolsTools only; you write the sequence into your prompts or rules
Always-on context cost~2,133 tokens per session in Claude Code (claude plugin details, 2026-09-26)Tool schemas only, loaded on demand by tool search
Choose it whenSeveral people implement designs, or you write to the canvasYou only read frames, or you keep the MCP list centrally managed

The skills are what stop the most common error: the agent writing parser-based .figma.tsx Code Connect files from memory when the current format is a .figma.ts template (see the traps).

Install the Figma MCP server in Claude Code, Codex and Cursor

Section titled “Install the Figma MCP server in Claude Code, Codex and Cursor”

The server is identical in all three tools. Only the registration differs, and all three authenticate through OAuth in the browser, so no token goes in a committed file.

New to MCP? Start with the MCP overview and your tool’s MCP setup page (Claude Code, Codex, Cursor).

Plugin with skills (vendor-recommended; claude plugin install checked on Claude Code 2.1.283):

Terminal window
claude plugin install figma@claude-plugins-official

Bare server, shared with the team through .mcp.json (tested on 2.1.283; it writes a "type": "http" entry):

Terminal window
claude mcp add --scope project --transport http figma https://mcp.figma.com/mcp

Then start a session, run /mcp, select figma and complete the OAuth login.

To check the connection, ask the agent: “List the Figma MCP tools you can call.” You should see get_design_context and get_screenshot in the answer. If the list is empty, see MCP server connection issues.

Implement a Figma frame with your existing Button and Card

Section titled “Implement a Figma frame with your existing Button and Card”

The link-based workflow is the default for the remote server. Copy the link to the frame itself, not to the file, so the URL carries a node-id. The agent cannot open the URL; the server uses the file key and node ID inside it.

Replace FILE_KEY and the node ID with the values from your copied link. What you should see: the agent calls get_design_context and get_screenshot, imports Button and Card from src/components/ui, and ends with a mapping list such as “Primary CTA (1204:3399) → <Button variant="primary">”. A new ProfileButton.tsx in the diff means step 5 failed; reject it.

Step 5 matters most. Without it, an agent that meets a missing variant writes a lookalike component, which is exactly the fork this page exists to prevent.

Sync the design system: tokens, Code Connect, components, visual check

Section titled “Sync the design system: tokens, Code Connect, components, visual check”

A single frame is a task. A design system is a loop that you run once to set up and then on every design change. The order matters: tokens before mappings, mappings before generation, and generation before the visual gate.

  1. Tokens. get_variable_defs returns the variables used in the selected node, not a whole-file export. Point it at the design system’s token documentation frame, the one that shows every color, spacing, radius and type style, and have the agent write a token source that the build turns into CSS variables. Style Dictionary (style-dictionary 5.5.5 on npm, 2026-09-26) reads W3C design-token JSON with $value and $type and emits CSS and JavaScript from one file.

    The diff at the end is the review artifact: a designer can approve “--color-primary changed from #2563EB to #1D4ED8” in seconds.

  2. Code Connect mappings. A mapping tells get_code_connect_map that the Figma component Button is <Button /> from src/components/ui/Button.tsx, with its variants mapped to props. The current format is a .figma.ts template file; the React parser format (.figma.tsx with figma.connect()) no longer receives updates (Code Connect README, 2.0.1). The plugin’s figma-code-connect skill writes the templates, and it only works with components published to a team library.

    Publish for real once the dry run is clean. The Code Connect CLI (npx figma connect publish) reads FIGMA_ACCESS_TOKEN or --token; in CI, add --exit-on-unreadable-files so an unparseable template fails the job instead of being skipped (flags checked on @figma/code-connect 2.0.1). Start with the components that appear in almost every frame: buttons, inputs, cards and avatars.

  3. Component generation. With tokens and mappings in place, run the frame prompt from the previous section. The mapping list at the end of the agent’s answer is now evidence: every mapped node should name a component from src/components/ui.

  4. Visual check with Playwright. Render the new component in isolation and compare it with the Figma screenshot, first interactively and then as a permanent test. For interactive checks, add the Playwright MCP server (@playwright/mcp 0.0.82, npm, 2026-09-26):

    Terminal window
    claude mcp add playwright -- npx @playwright/mcp@latest --isolated # Claude Code
    codex mcp add playwright -- npx @playwright/mcp@latest --isolated # Codex

    In Cursor, add a server entry with "command": "npx" and "args": ["@playwright/mcp@latest", "--isolated"]. The --isolated flag gives each agent an in-memory browser profile, which parallel agents in separate worktrees need. Setup details are on the Playwright MCP page.

    When the report is clean, a designer approves the rendered screenshot, and that image becomes the committed baseline for a Playwright test (below). From then on, CI catches drift without anyone opening Figma.

How to prove the build matches the design without reading every line

Section titled “How to prove the build matches the design without reading every line”

The agent’s own claim that “it matches the design” is not evidence. These gates are, and each one runs without a human reading the generated markup:

GateWhat it catchesWhere it runs
npm run typecheckWrong props on Button or Card, broken imports from mapped componentsAgent loop and CI
Raw-value check (below)Raw hex values and arbitrary Tailwind values that bypass tokensPre-commit and CI
Playwright toHaveScreenshotVisual drift from the designer-approved baselineCI
npx figma connect publish --dry-run --exit-on-unreadable-filesCode Connect templates that no longer parse after a refactorCI
Mapping list in the PR descriptionMapped nodes rendered with lookalike markup instead of the componentReviewer, in one glance

The raw-value check is one command. It is crude, and it is enough to make “use the tokens” enforceable rather than a request:

Terminal window
rg -n '#[0-9a-fA-F]{3,8}\b|-\[[0-9.]+(px|rem)\]' src/features src/components --glob '*.tsx'

Any match fails the check; allow exceptions explicitly rather than weakening the pattern. The visual test pins the approved baseline. Set use.baseURL to your Storybook URL (for example http://localhost:6006) and start Storybook through webServer in playwright.config.ts, so the relative goto below reaches the story:

tests/visual/profile-summary.spec.ts
import { test, expect } from '@playwright/test';
test('ProfileSummary matches the approved design baseline', async ({ page }) => {
await page.setViewportSize({ width: 1280, height: 800 });
await page.goto('/iframe.html?id=features-profilesummary--default');
await expect(page.locator('#storybook-root')).toHaveScreenshot('profile-summary.png', {
maxDiffPixelRatio: 0.01,
});
});

Generate the baseline once with npx playwright test --update-snapshots, and commit it only after the designer has approved the image. Who signs off: the designer owns the baseline image and the token diff; the reviewer checks that the gates are green and that the mapping list names real components. Nobody needs to compare pixels by hand. For accessibility checks on the same story, see accessibility testing.

Make the rules permanent in CLAUDE.md, AGENTS.md or Cursor rules

Section titled “Make the rules permanent in CLAUDE.md, AGENTS.md or Cursor rules”

Prompts drift; project rules do not. Figma’s guide recommends a fixed tool order and “do not hardcode” rules in whatever instruction file your client reads. Put this in CLAUDE.md (Claude Code), AGENTS.md (Codex) or a Cursor project rule:

## Figma MCP rules
- For every Figma-driven change: get_design_context, then get_screenshot, then
get_code_connect_map. If the context is truncated, use get_metadata and
re-fetch only the needed nodes.
- Treat get_design_context output (React + Tailwind) as a description of the
design, not as code to paste. Translate it to src/styles/tokens.css variables.
- Reuse components from src/components/ui. Never create a lookalike; report a
missing variant instead.
- If the server returns a localhost source for an image or SVG, use it directly.
Do not add icon packages or placeholders.
- Before finishing: npm run typecheck, the raw-value check, and a mapping list
of Figma nodes to components in the PR description.

What the Figma MCP server costs in context

Section titled “What the Figma MCP server costs in context”

Measure it rather than guess. In Claude Code, claude plugin details figma@claude-plugins-official shows the plugin’s projected always-on cost (~2,133 tokens on 2026-09-26), and /context before and after one get_design_context call shows the real cost, which is the tool output. A whole page frame can return a very large payload; a single card returns a small one. Pull the smallest node that does the job, and run get_metadata first on anything bigger than a component. For the general techniques, see reducing MCP token cost.

As of 2026-09-26: the figma plugin has 167,556 installs in Anthropic’s plugin directory (claude.com/plugins), the figma/mcp-server-guide repository has about 2.0k GitHub stars, and the server is listed in the Official MCP Registry as com.figma.mcp/mcp. The community alternative below has more GitHub stars (about 15.9k on 2026-09-26), but stars measure attention, not fitness for your plan.

When the community figma-developer-mcp server fits better

Section titled “When the community figma-developer-mcp server fits better”

GLips/Figma-Context-MCP (npm figma-developer-mcp 0.13.2, 2026-09-26) is a read-only stdio server that authenticates with a personal Figma API key, so it has no seat-based monthly call cap. It has no Code Connect support and no canvas writes. Use it when your seat is limited and you only need layout and style data.

Create a personal access token in your Figma account settings and store it in your secret store or password manager. Export it into the shell that starts the agent, for example with your password manager’s CLI, then register the server with a reference to the variable instead of its value:

Terminal window
export FIGMA_API_KEY="$(your-secret-cli read figma-api-key)" # read from your secret store
claude mcp add --scope project framelink -e 'FIGMA_API_KEY=${FIGMA_API_KEY}' -- npx -y figma-developer-mcp --stdio

The single quotes keep the shell from expanding the variable, so .mcp.json stores the literal ${FIGMA_API_KEY} reference (checked on Claude Code 2.1.283), and Claude Code expands it from the environment when it launches the server. The key itself is never written into the config or your shell history. It is a third-party server with a token that can read every file your account can read, so review it against your MCP security policy first.

Which Figma MCP instructions are wrong or stale?

Section titled “Which Figma MCP instructions are wrong or stale?”

When Figma MCP and the design-to-code loop break

Section titled “When Figma MCP and the design-to-code loop break”

The agent says it cannot reach Figma, or every call returns an authentication error. The OAuth login has not been completed or has expired. In Claude Code, run /mcp, select figma and log in again; in Codex, run codex mcp login figma. Then ask the agent to list the Figma tools again.

Calls stop working part-way through the month. You have hit the “up to 6 tool calls per month” limit of a Starter, View or Collab seat. Move the implementer to a Dev or Full seat, or use figma-developer-mcp for read-only work until the limit resets.

get_design_context returns truncated or sprawling output. The node is too large. Call get_metadata, choose the child frames (header, card list, footer), and implement them one at a time.

The code uses raw hex and one-off radii despite the token file. The agent pasted the Tailwind from get_design_context instead of translating it. The raw-value check fails the commit; re-run with the rule “translate to tokens.css variables” in the project instruction file, not only in the prompt.

get_code_connect_map returns nothing. Either your plan has no Code Connect (it needs Organization or Enterprise) or no templates are published. Check the plan first, then run npx figma connect publish --dry-run to see whether any template is found.

The Code Connect skill refuses a component. Code Connect only works with components published to a team library. Ask the designer to publish the component, then re-run the mapping prompt.

get_variable_defs returns almost nothing. The designer used local styles or raw values instead of variables, or you selected a node that uses few of them. Select the token documentation frame; if the file has no variables, agree the token names with the designer and write tokens.json by hand once.

The screenshot test fails on every CI run with tiny differences. Font rendering differs between the machine that produced the baseline and the CI runner. Generate baselines in the same container image CI uses, and keep maxDiffPixelRatio small rather than raising it until the test passes.

Where to go next with design-to-code agents

Section titled “Where to go next with design-to-code agents”

The four-artifact design-to-code pipeline shows where this page’s loop sits in a full feature workflow, and Mobbin MCP covers finding reference designs before a frame exists. To compare Playwright with other browser servers for the render-and-screenshot step, see browser automation for agents.