Figma MCP Server Setup and Design-to-Code Workflow

Connect the Figma MCP server to an AI coding client, then pull variables, layout and assets from a selection so code uses fewer guessed values.

Updated · Markdown version

The Figma MCP server lets an AI coding client read a Figma selection directly, so colors, spacing and component structure come from the file rather than from a screenshot or an estimate. Setup needs a server URL and a client connection, and the quality of the output depends mostly on selecting the exact frame you want built.

Steps to connect

  1. Choose the server. Figma's setup page recommends the remote server at https://mcp.figma.com/mcp, which does not need the desktop app. This guide uses the remote server.
  2. Add the server to Claude Code from a terminal: claude mcp add --transport http figma https://mcp.figma.com/mcp. Add --scope user before the server name to make it available in every project.
  3. Start a Claude Code session, type /mcp, select figma, choose Authenticate, and click Allow access in the browser page that opens. Type /mcp again to confirm the connection.
  4. Optional: install Figma's plugin with claude plugin install figma@claude-plugins-official. The docs describe the plugin as including Figma's skills. Skills matter only if you plan to write to the canvas, since they tell the agent which write tools to call and in what order.
  5. In Figma Design, right-click the outermost frame of the component, choose Copy link to selection, and paste the link into your prompt. The client reads the node ID from the link, so ask for the design context and check the result as described below.

Pull values instead of guessing them

Figma's tools page lists each tool and whether it changes the file. For a code handoff, four read-only calls cover most of the work:

  • get_variable_defs lists the variables and styles used in the selection. Request it first so colors and spacing map to named tokens.
  • get_design_context returns code and design context for the selection. Use it for structure and layout, then reconcile its values with the variable list.
  • get_screenshot returns an image of the selection. Use it to compare the built result against the design, not as a source of measurements.
  • download_assets returns temporary URLs for node exports, up to 20 node IDs per call. Use it for icons and images instead of redrawing them.

To check that it worked, ask the client to list every variable its code uses. Each one should match a name in the get_variable_defs output. A hex value with no matching variable means the client estimated it, so rerun the request with the frame selected.

Pitfalls

  • Nothing or the wrong thing selected. Selection-based tools return little or generic output when the selection is the page or is empty. Notice it by an output with no layer names. Fix it by copying the link to the outermost frame instead.
  • Write tools edit the file. use_figma, generate_image and upload_assets change content. Run them on a duplicate file first.
  • Seat and plan limits. Write-to-canvas needs the remote server and a Full seat, and comments need at least "Can view" access. The whoami tool returns your account's plans and seats, so check it before you assume a tool will work.
  • Temporary asset URLs. Links from download_assets expire. Save the files locally and reference the local copies in code.
  • Stale limits. The setup page points to a separate Plans, access and permissions page for rate limits. Check that page before a large batch, since limits can change.

When to use a skill instead

A one-off component can go through ad hoc prompting with the steps above. A skill helps when the same handoff repeats across many components, because the input checks and output shape stay fixed. figma-to-code-handoff is useful after you export variables, since it flags broken aliases before a component depends on them. design-to-code-handoff is useful when you have node JSON or a written spec and want the layout translated into front-end markup. Neither replaces the Figma server; they work on the output it produces.

FAQ

What is an MCP server? Think of an MCP server as a bridge that publishes capabilities, such as tools, data sources and prompt templates, to an AI app over the Model Context Protocol, which is an open standard. The client, such as Claude Code or Cursor, opens the connection and decides when a tool runs.

Does the Figma MCP server need the desktop app? As of 2026-11-21, Figma's setup page says the remote server does not need the desktop app, and it recommends that option. This guide's setup steps use the remote server, so the desktop app is not part of them.

Can the Figma MCP server change my file? Yes. Tools such as use_figma and generate_image write to the file, and write-to-canvas requires a Full seat outside drafts. Read-only tools such as get_variable_defs do not change content.

Platform Score is our assessment under a published method. It is not a safety guarantee.

Next steps

  1. Debug an MCP Server with MCP Inspector Read next.
  2. Atlassian MCP Server Guide for Jira and Confluence Read next.
  3. All guides by topic Browse everything.

Sources

This page is not offered to search engines yet: The content file does not mark this page indexable yet.