figmcp

Design in Figma

Your agent can create and edit designs in the file you have open.

Get started

Open the file in Figma Desktop, run the plugin and ask:

Prompt
design a login screen for a 390x844 phone in Figma

The agent builds the design with Figma plugin API scripts through use_figma, a few calls at a time (structure first, then sections), and checks each step with get_screenshot.

No Dev Mode needed
Everything works in the regular Design mode, so you don't need a Dev Mode seat.

How a script runs

use_figma takes the body of an async function with figma in scope. Whatever it returns comes back to the agent; nodes come back as { id, name, type, x, y, width, height }, and console.log output is returned too.

use_figma · code
const frame = figma.createFrame();
frame.name = "Login";
frame.resize(390, 844);
frame.layoutMode = "VERTICAL";
frame.itemSpacing = 20;

await figma.loadFontAsync({ family: "Inter", style: "Bold" });
const title = figma.createText();
title.fontName = { family: "Inter", style: "Bold" };
title.characters = "Welcome back";
frame.appendChild(title);

figma.viewport.scrollAndZoomIntoView([frame]);
return frame;
  • One undo step. The whole run is a single undo step in Figma.
  • Errors keep earlier changes. If a script throws, the changes it made before the error stay.
  • Timeout. Scripts wait up to 60 seconds by default (timeoutMs, up to 10 minutes).

Rules of the plugin API

  • Files use dynamic page loading: use figma.getNodeByIdAsync, figma.setCurrentPageAsync and the *Async getters.
  • Load every font before setting text: await figma.loadFontAsync({ family: "Inter", style: "Regular" }).
  • Colours are 0–1 RGB, and paint arrays are immutable: assign a new array to fills.
  • Set layoutSizingHorizontal and layoutSizingVertical only after the node is appended to an auto layout parent.
  • Images from the web: await figma.createImageAsync(url), then use its hash in an image fill.

Reuse what the file has

Ask the agent to use your local components, paint styles and variables. It can find them with figma.getLocalPaintStylesAsync and figma.variables.getLocalVariablesAsync, and bind variables to paints so the design stays on your system.