The job: “Turn a Figma design into working code with Claude”
Figma to code with Claude: a Figma-to-production workflow
How to turn Figma into code with Claude: connect Figma's MCP server to Claude Code, paste a frame link, and ship code that reuses your components and tokens.
- Level Intermediate
- Time 30-45 minutes
- Works with
- Claude Code
- Claude Desktop
- Claude.ai
On this page13 sections
To turn a Figma design into code with Claude, connect Figma’s official MCP server to Claude Code, paste a link to a frame, and ask Claude to build it with your own components and design tokens. Setup takes about ten minutes; getting from that first draft to production-ready code is a short, repeatable workflow, laid out step by step below.
You’ll finish this guide with a Figma frame (a screen, a card, a pricing table) rebuilt as real code in your project, using the colors, spacing and components from the design rather than a rough guess from a screenshot. The bridge is Figma’s MCP server, an official plug-in from Figma that hands Claude the design’s actual data: layers, sizes, variables (Figma’s saved colors, spacing and type values), components and comments.
The setup is Claude Code first, because writing code into a project is what Claude Code is for. Claude Desktop and claude.ai notes are near the end.
What we tested: we ran the token check and build step of the workflow (steps 2 and 4 below) with claude -p on a made-up project, using a saved variables list and React + Tailwind code shaped like Figma’s tool output. One run printed the token table, flagged the two Figma values with no matching token, built the card with our existing Button and Card, used CSS variables instead of hex codes and left TODOs instead of inventing tokens. We did not sign in to Figma, so installing the plugin, signing in and the live Figma calls follow Figma’s documentation and are untested.
What you’ll have at the end
- Figma connected to Claude Code and signed in.
- One frame turned into code inside your project, previewed in your browser.
- A six-step Figma-to-production workflow you can repeat for every screen.
- A prompt template that tells Claude where to put files and which of your components to reuse.
What you need
- Claude Code installed and signed in.
- A Figma account. Figma’s Claude Code article lists Starter, Professional, Education, Organization, Government or Enterprise plans. How much you can use it depends on your seat (see the limits table below).
- A code project to put the result in. If you don’t have one, ask Claude Code to “create a minimal React + Vite project in this folder” first.
- Edit or view access to the Figma file you want to build.
Remote or desktop Figma MCP server?
Figma offers two servers. Figma “strongly recommends” the remote one.
| Remote server (recommended) | Desktop server | |
|---|---|---|
| Address | https://mcp.figma.com/mcp | http://127.0.0.1:3845/mcp (local) |
| Needs Figma desktop app | No | Yes, with Dev Mode switched on |
| Seat needed | Any seat, but View and Collab are limited (see below) | Dev or Full seat on a paid plan |
| Writes to the canvas | Yes | No |
| Claude Code command | claude plugin install figma@claude-plugins-official | claude mcp add --transport http figma-desktop http://127.0.0.1:3845/mcp |
For the desktop server, open a Design file in the Figma desktop app, switch to Dev Mode and click Enable desktop MCP server. Stick with the remote server unless you have a reason not to; the steps below use it.
Figma seat and plan requirements: check your limits first
Figma counts tool calls that read from Figma against a limit tied to your plan and seat. From Figma’s rate limit page:
| Seat | Plan | Tool calls |
|---|---|---|
| View or Collab | Any plan | Up to 20 per month |
| Any seat | Starter | Up to 20 per month |
| Dev or Full | Professional or Education | Up to 200 per day, 10 per minute |
| Dev or Full | Organization | Up to 200 per day, 15 per minute |
| Dev or Full | Enterprise | Up to 600 per day, 20 per minute |
Some tools are exempt from these limits, including generate_figma_design, create_new_file, add_code_connect_map and whoami. Figma notes it “may change rate limits at any time”. On 20 calls a month, make each prompt count: one frame, a clear instruction, and a request for a plan before code. Not sure which seat you’re on? Ask Claude to run whoami; it shows the email, plans and seats of the Figma account you signed in with.
Step-by-step
1. Install Figma for Claude Code
Figma recommends its plugin, which installs the MCP server plus Figma’s skills (instruction packs that teach Claude Figma’s preferred workflow). In your terminal:
claude plugin install figma@claude-plugins-official
If that fails, your organization may block plugin installs. Use the manual command instead (it adds the server but not Figma’s skills):
claude mcp add --scope user --transport http figma https://mcp.figma.com/mcp
--scope user makes it available in all your projects. Leave it out to limit Figma to the current folder.
2. Sign in to Figma
If you used the plugin:
- Restart Claude Code if it was running.
- Type
/pluginand press Enter. - Press the right arrow to open the Installed tab.
- Select the
figmaserver and press Enter, then Enter again to start signing in. - In the browser page that opens, click Allow access.
- Type
/pluginagain;figmashould show as connected.
If you used the manual command:
- Start a new Claude Code session.
- Type
/mcp, select figma, then Authenticate. - Click Allow access in the browser.
- Claude Code should show “Authentication successful. Connected to figma”.
3. Copy a link to the frame
With Figma’s remote server, you point Claude at a design by including a link to a frame or layer in your prompt. In Figma, select the frame, then use Figma’s copy-link option for that selection. The link contains a node-id, which tells the server exactly which layer you mean.
Pick a single frame, not a whole page. Smaller selections give better code and use fewer calls.
4. Ask for a plan, then the code
Figma’s own advice: write your prompt “like you’re briefing a teammate”. Say which framework, where the file goes, and which existing components to reuse. Use prompt 1 below. Ask Claude to describe its plan first, check it, then let it write.
5. Preview and compare
Ask Claude to start your dev server, open the page, and compare it to the frame. If something is off, say exactly what: “the card corners should be 12px, and the button uses our Primary color variable”.
Figma’s main tools
You don’t call these by name, but they explain what Claude can see. From Figma’s tools page:
get_design_context: generates code for a layer or selection (React and Tailwind by default).get_variable_defs: lists the variables and styles used in the selection.get_metadata: a lightweight outline of layer names, types, positions and sizes. Useful for big frames.get_screenshot: an image of the selection. Claude’s connector listing notes that in Claude and Claude Code this currently returns only a description of the screenshot.download_assets: exports images and icons, up to 20 nodes per call.get_code_connect_map: returns Code Connect mappings, Figma’s feature for linking design components to your real code components.get_comments(remote server only): reads comment threads on a file or layer, so Claude can apply the design review’s feedback. Reading comments doesn’t mark them as read.search_design_system: searches your libraries for components, variables and styles.whoami: shows which Figma account, plans and seats you’re signed in with.
get_design_context returns React and Tailwind by default, but you can ask for another stack: Figma’s examples include “Generate my Figma selection in Vue”, “in plain HTML and CSS” and “in iOS”.
Make it useful: prompts to try
Here's a Figma frame: <paste link>. Build it as a React component in src/components/marketing/PricingCard.tsx. Reuse the Button and Card components from src/components/ui instead of creating new ones. Use the Figma variables for colors and spacing, and map them to our existing CSS variables in src/styles/tokens.css where they match. First, tell me your plan and list any Figma variables that have no match in our tokens file. Wait for my OK before writing code.
Get the variables used in this Figma frame: <paste link>. Compare them with src/styles/tokens.css and give me a table: Figma name, Figma value, our matching token (or "missing"). Don't change any files.
Export the icons in this Figma frame as SVGs into public/icons, using kebab-case file names: <paste link>. Then update src/components/Header.tsx to use them.
The second prompt is a cheap first call. It shows you how well your code’s design tokens match Figma before you generate any layout.
The Figma-to-production workflow, step by step
A first generated draft is easy. Code you’d merge is the part people search for. Run these six steps for each frame:
- Check the account (1 call, exempt from limits). “Run whoami for Figma.” Confirms you’re on the account and seat that owns the file before you spend read calls.
- Check the tokens before any layout. Use prompt 2 above. The table shows which Figma variables already exist in your code and which are missing. Decide now whether to add the missing tokens or map them to near matches; otherwise Claude has to guess later.
- Read the review comments. “Summarize the unresolved comments on this layer and list anything that changes the build: .”
get_commentsworks on the remote server and doesn’t mark comments as read. - Plan, then build with your components. Use prompt 1 above. Ask for the plan first, check that it names your existing components and folder, then let it write. Add: “Don’t invent tokens. Where a Figma value has no token, leave a TODO comment.” In our test, that line made Claude leave clear TODOs instead of hard-coding colors.
- Compare in the browser. Ask Claude to start your dev server and list differences from the frame. Check every state the frame shows (hover, empty, error, mobile width) and ask for each one by name; a single frame doesn’t carry states that aren’t drawn.
- Review like a pull request. Ask Claude to run your linter and tests, then do an accessibility pass: labels on buttons and inputs, color contrast, keyboard focus. The UX and accessibility audit guide has a ready prompt, and Playwright MCP can click through the page for you.
When designers change the frame later, repeat steps 3 to 5 with the same link: “This frame changed. Update src/components/marketing/PricingCard.tsx to match, and list what you changed.”
Claude Desktop and claude.ai
Figma is in Claude’s connector directory, made by Figma and marked “Anthropic verified”. Figma’s help center describes connecting from claude.ai: open Settings > Connectors (newer apps show Customize > Connectors), browse the directory, select Figma, and complete sign-in. Figma’s developer docs list Claude Desktop as supporting the remote server through this connector.
In a chat you can paste a frame link and ask for HTML and CSS, a component spec, or a FigJam diagram. Without a project folder, Claude can’t reuse your components or write into your files, so for real design-to-code work, use Claude Code.
Code Connect: reuse your real components
Code Connect links components in your Figma design system to components in your code. When a frame contains connected components, the MCP server tells Claude how to import and use each one, along with the component’s current properties and any custom instructions you added. Without it, Claude guesses from the layout.
- Who can use it: Professional, Organization, Government and Enterprise plans, with a Full or Dev seat.
- One framework or several: with the remote server, ask Claude to set the
clientFrameworksparameter to your Code Connect label (for exampleReactorSwiftUI). Professional plans return connections for one active framework only; Organization and Enterprise can have several. - Two ways to set it up: Code Connect CLI gives exact snippets you write yourself. Code Connect UI is quicker, set up inside Figma, and generates simpler usage hints.
- Check it works: ask Claude to call
get_code_connect_mapon your frame and list which components are connected.
If you have no Code Connect yet, naming components in your prompt (as in the first prompt above) is the free alternative. To keep library code current too, see Context7.
Troubleshooting
claude plugin installfails. Your organization may block plugins. Use theclaude mcp addcommand in step 1 and ask your Claude admin if you need the plugin.- “Rate limit” or calls stop working. Check your seat in Figma (or ask Claude to run
whoami). View and Collab seats, and every seat on the Starter plan, get 20 calls per month. Ask Claude to useget_metadataon large frames first and then fetch only the parts it needs. - Claude says it can’t find the design. Make sure the link includes
node-id=and that your Figma account can open the file; Figma says the account must belong to the plan that owns the file. Re-authenticate via/pluginor/mcp. - Code ignores your components. Name the exact folder and component names in the prompt, as in prompt 1. Figma’s docs list “Generate my Figma selection using components from src/components/ui” as an example prompt.
- “Response exceeds maximum allowed tokens” in Claude Code. Figma’s known-issues page says this means the response is bigger than Claude Code accepts by default. Select a smaller part of the design, or set
MAX_MCP_OUTPUT_TOKENS(for exampleexport MAX_MCP_OUTPUT_TOKENS=50000) before starting Claude Code. - Output is huge or cut off. The frame is too big. Select a smaller frame, or one section at a time.
Watch out for
- Figma’s server can also write to the canvas (create or change Figma content). Writing outside your drafts needs a Full seat. If you only want code, say “don’t change the Figma file” in your prompt.
- Generated code is a starting point. Review it like a colleague’s pull request, and check accessibility (labels, contrast) yourself.
FAQ
Can Claude turn a Figma design into code? Yes. With Figma’s MCP server connected, Claude reads the frame’s layout, variables and components and writes the code into your project. Claude Code is the best fit because it can edit your files and run your dev server.
Is it free? Connecting is free, but how much you can use it depends on your Figma seat: View and Collab seats, and the Starter plan, get up to 20 tool calls a month; Dev or Full seats on paid plans get 200 to 600 a day. You also need Claude Code, Claude Desktop or claude.ai with the Figma connector.
Do I need Dev Mode or the Figma desktop app? Not for the recommended remote server. The desktop server needs the Figma desktop app with Dev Mode and a Dev or Full seat on a paid plan.
Is the code production-ready? Treat it as a strong first draft. It gets much closer when Claude reuses your components (named in the prompt, or via Code Connect) and your tokens, and when you run the review in step 6.
Which frameworks does it support? React and Tailwind by default. You can ask for others in the prompt, for example Vue, plain HTML and CSS, or iOS.
Can I go the other way, from code to Figma? Yes. See Claude Code to Figma.
Next steps
- Read the Figma MCP server profile for the full tool list.
- Going the other way? Send your running app to Figma as layers for review.
- Only have a screenshot, not a Figma file? Turn a screenshot into a working UI.
- Making graphics rather than code? See the Canva connector.
- Have Claude click through and test the page you just built.
- Put it online with Netlify.
- Not sure whether to start in Figma at all? Compare Claude Design vs Figma MCP.
Sources
- developers.figma.com/docs/figma-mcp-server/ (opens in a new tab)
- developers.figma.com/docs/figma-mcp-server/remote-server-installation/ (opens in a new tab)
- developers.figma.com/docs/figma-mcp-server/tools-and-prompts/ (opens in a new tab)
- developers.figma.com/docs/figma-mcp-server/write-effective-prompts/ (opens in a new tab)
- developers.figma.com/docs/figma-mcp-server/rate-limits-access/ (opens in a new tab)
- help.figma.com/hc/en-us/articles/39888612464151 (opens in a new tab)
- help.figma.com/hc/en-us/articles/37883260397975 (opens in a new tab)
- claude.com/connectors/figma (opens in a new tab)
- code.claude.com/docs/en/mcp (opens in a new tab)
- developers.figma.com/docs/figma-mcp-server/local-server-installation/ (opens in a new tab)
- developers.figma.com/docs/figma-mcp-server/code-connect-integration/ (opens in a new tab)
- developers.figma.com/docs/figma-mcp-server/mcp-clients-issues/ (opens in a new tab)
- code.claude.com/docs/en/discover-plugins (opens in a new tab)
Related guides
Claude Design vs Figma MCP: which to use for UI work
Claude Design drafts screens for you; Figma MCP lets Claude read and edit your Figma files. Compare plans, limits and handoff, then use both in one workflow.
Beginner10 minutes to decide, about 30 minutes for the hands-on workflow
Claude Code to Figma: send your running app to Figma as layers
Claude Code to Figma: capture the screens of your running web app as editable Figma layers with the Figma MCP server, then send edits back to code.
Intermediate20-30 minutes
Best MCP servers for non-developers: what to connect first
The best MCP servers and connectors for people who don't code: email, calendar, files, notes, meetings, design and automation, with plans, setup and safety.
Beginner10 minutes to pick, about 5 minutes per connector to set up