FigmaMCP

Figma to code MCP: the agent reads, then writes the code

Figma to code MCP works in two parts. FigmaMCP lets Claude Code or Codex read the design in your open Figma file: layers, variables and a picture. Then the agent writes the code in your project. FigmaMCP does not generate code itself.

What FigmaMCP gives the agent

FigmaMCP does not generate code. It gives your agent two ways to read a design, and the agent writes the code. In a Figma to code MCP setup, that split matters: FigmaMCP reads and your agent writes.

What the agent reads for design to code
It needs Tool What it gets
The layer treepage_info, node_infoPages, layers, names and types. Ask for only the properties it needs, such as size, fills or text.
Text contentnode_info with a text filterThe words in every text layer of a frame.
Design tokensvariable_list, node_info with boundVariablesLocal variables, and the variables a layer is bound to.
How it looksnode_export_visualA PNG or SVG of the layer.
Layoutnode_infoAuto layout and size properties, when the agent asks for them.

Download for Mac Version 0.1.10

Figma to code using MCP: the steps

  1. Open the file

    Open it in the Figma desktop app. You can paste a link to a layer. The server accepts the layer ID from a Figma URL as it is.

  2. Name the target

    Ask for one frame, not the whole file. Say which framework you use and where the code should go.

  3. The agent reads

    It reads the layer tree, the tokens and a picture of the frame.

  4. The agent writes

    It writes the code in your repo with its own file tools.

  5. You compare

    Run the code and compare it with the design. Ask the agent to export the frame again if it needs a second look.

Why read the tokens, not just the picture

A picture shows a blue button. The layer data can show which variable that blue is bound to. Code can then use the variable name instead of a copied hex value. Ask the agent to read the bindings first, and to say when a layer has none. Local variables come from variable_list. Variables from a shared library are read from the layer that uses them.

Figma to code MCP Claude: example requests

Example design to code requests
You ask What the agent does
“Build this card as a React component.”Reads the card, then writes the component file. Your agent picks the structure.
“Use our variables for color and spacing.”Reads the bound variables on each layer and uses their names in the code.
“List all text in this screen.”Reads the text layers, so the copy can go into a file or a translation table.
“Show me the frame, then write the CSS.”Exports a picture first, then writes styles from what it read.

Figma MCP design to code: what to check

Review the code like a colleague’s work. FigmaMCP does not run or test it. It also does not use Figma’s Dev Mode. For the reverse direction, see code to design. To read variables on their own, see Figma MCP variables. For setup, see Figma MCP setup, and for Claude Code see Figma MCP for Claude Code.

Questions

Does FigmaMCP generate code?
No. It reads the design. Your agent, Claude Code or Codex, writes the code with its own file tools. You choose the language and framework in your request.
Can I paste a Figma link for a frame?
Yes. The layer ID in a Figma URL is accepted as it is. The file still has to be open in the Figma desktop app.
Does it use Figma Dev Mode?
No. Features that belong to Figma itself, such as Dev Mode, are not included.
Can the agent read my design tokens?
Yes. It reads local variables with variable_list and the variables a layer uses with node_info.