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.
| In your code | In Figma | Tool |
|---|---|---|
| A container with flex layout | A frame with auto layout | create_frame, node_set_auto_layout |
| Text | A text layer | create_text, text_set_style |
| An icon as SVG markup | A layer made from the markup | create_svg |
| A box, circle or star | A rectangle, ellipse, polygon or star | create_shape |
| Corner radius and shadow | Corner radius and effects | node_set_corner_radius, node_set_effects |
| A design token | A bound variable | node_bind_variable |
| A reusable component | A main component and instances | create_component, create_instance |
Download for Mac Version 0.1.10
Figma MCP code to canvas, step by step
Describe or point at the code
Paste the markup, or tell the agent which file to read. The agent reads it from your project.
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.
Build one frame
Start with one screen or one component. Do not ask for a whole app at once.
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
| 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
- The agent translates by judgment. It will not match your code pixel for pixel. Review the layout, spacing and hierarchy.
- It cannot create layers inside a component instance. It edits the main component or uses overrides.
- Edits go only to the open file where AI can edit this file is on.
- Figma has its own write-to-canvas feature. For how it differs, see FigmaMCP and the official Figma MCP.
For the other direction, see Figma to code with MCP. For every kind of edit, see what the agent can write.