FigmaMCP

Figma MCP code to canvas: from code to a design file

Figma MCP code to canvas means your agent reads your code, then builds the matching frames, text and shapes in the Figma file you have open. FigmaMCP has no HTML importer. The agent does the translating, and the create tools do the writing.

FigmaMCP does not import HTML

There is no tool that takes an HTML file or a component and turns it into a Figma layer. That is the plain answer to “Figma MCP HTML to design”. What works is this: the agent reads your code, decides the layout, and builds frames, text and shapes in your file with the create tools.

Code ideas and the Figma tools that match
In your code In Figma Tool
A container with flex layoutA frame with auto layoutcreate_frame, node_set_auto_layout
TextA text layercreate_text, text_set_style
An icon as SVG markupA layer made from the markupcreate_svg
A box, circle or starA rectangle, ellipse, polygon or starcreate_shape
Corner radius and shadowCorner radius and effectsnode_set_corner_radius, node_set_effects
A design tokenA bound variablenode_bind_variable
A reusable componentA main component and instancescreate_component, create_instance

Download for Mac Version 0.1.10

Figma MCP code to canvas, step by step

  1. Describe or point at the code

    Paste the markup, or tell the agent which file to read. The agent reads it from your project.

  2. Pick a parent

    Ask for the page or frame where the result should go. The agent reads that parent first and passes its name back.

  3. Build one frame

    Start with one screen or one component. Do not ask for a whole app at once.

  4. Check the picture

    The agent exports the new frame as an image and looks at it. You look too.

Why the order matters

The create tools need a parent. The agent must read the parent first, then pass its exact name back. A frame needs auto layout before spacing can be bound to a variable, and a fill must be solid or empty before a color variable can be bound. A good request names the page, the frame and the tokens to use. The agent can then follow that order without guessing.

Figma MCP write to canvas: example requests

Example code to design requests
You ask What the agent does
“Build the login form from login.tsx as a frame.”Reads the file, then creates frames and text with auto layout. It does not import the file.
“Turn this SVG into a layer on the Icons page.”Creates a layer from the markup in the parent you named.
“Use our variables for the colors.”Binds fills to variables, after it sets a solid fill or clears the old one.
“Make this card a component.”Converts the frame to a main component, then you can place instances.

Limits of this direction

For the other direction, see Figma to code with MCP. For every kind of edit, see what the agent can write.

Questions

Can FigmaMCP import HTML into Figma?
No. There is no HTML importer. The agent reads your code and builds frames, text and shapes with the create tools. The result is the agent’s reading of your code, so review it.
Can the agent turn an SVG into a Figma layer?
Yes. create_svg makes a layer from SVG markup, inside a parent you name.
Will the design match my code exactly?
Not by guarantee. The agent chooses the layout from what it reads. Check the result against your code.
Does it write to the file in my browser?
No. FigmaMCP needs the Figma desktop app on a Mac. It does not run in the browser.