Skip to main content
Glama
figma-forge-mcp

figma-forge-mcp

by TBlopT

Figma Forge lets Claude Code, Cursor or any MCP client design in Figma like a senior product designer, not like a script drawing rectangles one at a time.

It builds entire auto-layout screens in a single call, writes real styles and variables, assembles component sets, and wires Smart Animate prototypes with your own easing curves. Whatever it can't do with a dedicated tool, it does through run_code, a direct line to the full Figma Plugin API.

Built on top of cursor-talk-to-figma-mcp by Sonny Lazuardi (MIT). All 44 original tools are still here.


Why it exists

Agents driving Figma through one-node-per-call tools produce designs that look generated: default fonts, flat fills, no system behind them. Figma Forge closes that gap.

One node per call

Figma Forge

A full landing page

Hundreds of round trips, minutes

One build_tree call, seconds

Typography

Inter only

Any installed font, line height, tracking, text ranges

Paint

Solid colours

Linear and radial gradients, image fills with caching

Depth

None

Layered drop / inner shadows, layer and background blur

Design system

Ad-hoc values

Paint, text and effect styles + Figma variables with modes

Components

Instances of existing ones

Create components, variants and instances

Motion

Static frames

Prototype interactions: Smart Animate, hover, press, timers, scroll-to, flows

Anything else

Not possible

run_code: the whole Plugin API

Privacy

Analytics in the plugin

No telemetry; relay bound to 127.0.0.1

Related MCP server: AI Agents Talk to Figma MCP

How it works

flowchart LR
  A["Claude Code / Cursor<br/>(MCP client)"] -- stdio --> B["figma-forge-mcp<br/>MCP server"]
  B -- WebSocket --> C["Relay<br/>127.0.0.1:3055"]
  C -- WebSocket --> D["Figma Forge plugin<br/>(Figma Desktop)"]
  E["client/forge.ts<br/>scripts"] -- WebSocket --> C

The plugin joins a channel on the local relay; the MCP server (or your own scripts) send commands to that channel.

Quick start

1. Install and build (Bun required)

git clone https://github.com/TBlopT/figma-forge-mcp.git
cd figma-forge-mcp
bun install
bun run build

2. Start the relay (keep it running)

bun run socket

3. Install the plugin in Figma Desktop

Plugins → Development → Import plugin from manifest… → src/cursor_mcp_plugin/manifest.json. Run Figma Forge, press Connect and copy the channel code.

4. Register the MCP server

Claude Code:

claude mcp add --scope user figma-forge -- bun /absolute/path/to/figma-forge-mcp/dist/server.js

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "figma-forge": { "command": "bun", "args": ["/absolute/path/to/figma-forge-mcp/dist/server.js"] }
  }
}

5. Talk to it

Join channel abc123 and design a pricing page with a 12-column grid, a dark and light theme as variables, and a toggle that animates between monthly and yearly.

Tools

New in Figma Forge:

Tool

What it does

build_tree

Builds a whole node tree in one call: frames, text, shapes, components, instances and SVG, with auto-layout, sizing, gradients, shadows, blur, any font, styles, variables, grids, constraints, min/max sizes, masks and export settings. The root is built hidden and revealed when done.

create_styles

Creates or updates paint, text and effect styles.

create_variables

Creates variable collections with modes (COLOR, FLOAT, STRING): real design tokens that Dev Mode exposes as CSS variables.

combine_variants

Turns components into a component set.

set_reactions

Prototype interactions: click / hover / press / timeout / mouse enter-leave → change-to, navigate, scroll-to, overlay or back, with Smart Animate and custom cubic-bezier easing.

set_flows

Sets presentation flows on a page.

set_image_fill_cached

Image fills from local files; each image is sent only once per session.

create_page, ping

Utilities.

run_code

Runs any Figma Plugin API code inside the plugin and returns the result.

Plus the original toolkit: reading documents and selections, annotations, text replacement, instance overrides, auto-layout setters, connectors, exports and more.

Examples

Run any example against an open Figma file:

bun client/forge.ts examples/01-product-card.ts --channel <code>

Example

Shows

01-product-card.ts

A polished card in one build_tree call

02-animated-toggle.ts

A component set wired with Smart Animate; press Present and click it

03-tokens.ts

Variables with Dark/Light modes bound to a frame

04-run-code.ts

The escape hatch: anything the Plugin API can do

A taste of build_tree:

await send("build_tree", { tree: {
  type: "FRAME", name: "Card", w: 360, sizeV: "HUG", radius: 28,
  fills: [{ type: "GRADIENT_LINEAR", angle: 90, stops: [{ pos: 0, color: "#2F2333" }, { pos: 1, color: "#211824" }] }],
  effects: [{ type: "DROP_SHADOW", color: "#000", opacity: 0.35, y: 40, blur: 90, spread: -20 }],
  layout: { mode: "VERTICAL", gap: 16, pad: 24 },
  children: [
    { type: "TEXT", sizeH: "FILL", text: { chars: "Hello", font: "Inter", weight: "SemiBold", size: 24, letterSpacing: -2, color: "#FFF1E6" } },
    { type: "INSTANCE", componentId: "12:34" },
  ],
} });

And a micro-interaction:

await send("set_reactions", { items: [{
  nodeId: offVariant,
  reactions: [{ on: "click", to: onVariant, nav: "CHANGE_TO", anim: "SMART_ANIMATE", duration: 0.35, easing: [0.22, 1, 0.36, 1] }],
}] });

Tips for professional results

  • Build in one call. build_tree sets sizing before children are added and keeps the root hidden until it's finished, so Figma doesn't relayout the canvas on every node. That's the difference between seconds and minutes on large frames.

  • Name layers consistently across variants. Smart Animate matches layers by name; keep Eye/L, Label, Icon and so on identical between states.

  • Use styles and variables, not raw hex. Agents produce far more coherent work when every value comes from a token.

  • Install the fonts you design with. The plugin can use any font Figma Desktop can see.

Security and privacy

  • The relay listens on 127.0.0.1 only.

  • The plugin sends no analytics and talks only to the local relay.

  • run_code executes inside your Figma session with the plugin's permissions. Only connect agents you trust.

Credits

Figma Forge is a fork of sonnylazuardi/cursor-talk-to-figma-mcp, released under the MIT license. Thanks to Sonny Lazuardi and its contributors for the original bridge.

License

MIT

Available Tools

54 tools
build_treeA

Build a complete node tree in ONE call. Far faster and more precise than creating nodes one by one. Node spec: { type: FRAME|COMPONENT|TEXT|RECT|ELLIPSE|LINE|INSTANCE|SVG, name, x, y, w, h, children: [...] }

  • Auto-layout: layout: { mode: HORIZONTAL|VERTICAL, gap, pad: n|[v,h]|[t,r,b,l], primary: MIN|CENTER|MAX|SPACE_BETWEEN, counter, wrap, crossGap }

  • Sizing: sizeH / sizeV: FIXED|HUG|FILL, grow, minW, maxW, minH, maxH, absolute (absolute position inside auto-layout)

  • Paint: fills: ["#hex" | {color, opacity} | {type: GRADIENT_LINEAR, angle, stops:[{pos,color,opacity}]} | {type: GRADIENT_RADIAL, cx, cy, rx, ry, stops}], fillStyle: "Style/Name", fillVar: "variable/name"

  • Strokes: strokes, strokeWeight, strokeAlign: INSIDE|CENTER|OUTSIDE, dash: [4,2]; radius: n|[tl,tr,br,bl] (corner smoothing 60% by default), smoothing

  • Effects: effects: [{type: DROP_SHADOW|INNER_SHADOW, color, opacity, x, y, blur, spread} | {type: LAYER_BLUR|BACKGROUND_BLUR, radius}], effectStyle

  • Text: text: { chars, style: "Text/Style" OR font: "Any Family", weight: "Regular|Medium|SemiBold|Bold|Light", size, lineHeight (px number or "120%"), letterSpacing (%), textCase, align, decoration, color, ranges: [{match, color, font, weight, underline}] }, autoResize

  • Other: opacity, blend, rotation, clip, mask, constraints, grids: [{pattern: COLUMNS|ROWS|GRID, count, gutter, offset, alignment, size, color, opacity}], exports: [{format, scale}], description (components)

  • INSTANCE: { type: INSTANCE, componentId }. SVG: { type: SVG, svg: "<svg…>", svgColor } The root is built hidden and shown when finished. Returns root id, size and (with returnIds) a name→id map.

Inputs: tree, pageId, parentId, returnIds.

clone_nodeC

Clone an existing node in Figma

Inputs: nodeId (required), x, y.

combine_variantsC

Combine components into a component set (variants). Name each component 'Prop=Value'.

Inputs: ids (required), name, fills, layout, +2 more.

create_component_instanceA

Create an instance of a component in Figma. For LOCAL components (from get_local_components), use componentId with the id field. For published LIBRARY components, use componentKey with the publishedKey field.

Inputs: x (required), y (required), parentId, componentId, +1 more.

create_connectionsB

Create connections between nodes using the default connector style

Inputs: connections (required).

create_frameC

Create a new frame in Figma

Inputs: x (required), y (required), width (required), height (required), +16 more.

create_pageB

Create a new page in the Figma document (and make it current)

Inputs: name (required), setCurrent.

create_rectangleC

Create a new rectangle in Figma

Inputs: x (required), y (required), width (required), height (required), +2 more.

create_sectionC

Create a section in Figma to group related content on the canvas

Inputs: x (required), y (required), width (required), height (required), +1 more.

create_stylesA

Create or update local paint, text and effect styles (upsert by name). Paints accept solid hex or gradients; texts accept any installed font.

Inputs: texts, paints, effects.

create_textC

Create a new text element in Figma

Inputs: x (required), y (required), text (required), name, +4 more.

create_variablesB

Create or update a Figma variable collection with modes (design tokens). Values are given per mode.

Inputs: vars (required), collection (required), modes.

delete_multiple_nodesB

Delete multiple nodes from Figma at once

Inputs: nodeIds (required).

delete_nodeC

Delete a node from Figma

Inputs: nodeId (required).

export_node_as_imageC

Export a node as an image from Figma

Inputs: nodeId (required), scale, format.

get_annotationsB

Get all annotations in the current document or specific node

Inputs: nodeId (required), includeCategories.

get_document_infoA

Get detailed information about the current Figma document

Inputs: no named parameters.

get_instance_overridesA

Get all override properties from a selected component instance. These overrides can be applied to other instances, which will swap them to match the source component.

Inputs: nodeId.

get_local_componentsA

Get all local components from the Figma document

Inputs: no named parameters.

get_node_infoB

Get detailed information about a specific node in Figma

Inputs: nodeId (required).

get_nodes_infoC

Get detailed information about multiple nodes in Figma

Inputs: nodeIds (required).

get_reactionsA

Get Figma Prototyping Reactions from multiple nodes. CRITICAL: The output MUST be processed using the 'reaction_to_connector_strategy' prompt IMMEDIATELY to generate parameters for connector lines via the 'create_connections' tool.

Inputs: nodeIds (required).

get_selectionB

Get information about the current selection in Figma

Inputs: no named parameters.

get_stylesA

Get all styles from the current Figma document

Inputs: no named parameters.

join_channelC

Join a specific channel to communicate with Figma

Inputs: channel.

move_nodeC

Move a node to a new position in Figma

Inputs: x (required), y (required), nodeId (required).

pingA

Check that the Figma Forge plugin is connected and report its version

Inputs: no named parameters.

read_my_designA

Get detailed information about the current selection in Figma, including all node details

Inputs: no named parameters.

rename_nodeA

Rename a node in Figma

Inputs: name (required), nodeId (required).

resize_nodeC

Resize a node in Figma

Inputs: width (required), height (required), nodeId (required).

run_codeA

Escape hatch: run arbitrary Figma Plugin API code inside the plugin. code is the body of an async function receiving (figma, args, h); its return value (JSON) comes back. Use for anything not covered by other tools: vectors, boolean ops, component properties, export settings, etc.

Inputs: code (required), args.

scan_nodes_by_typesC

Scan for child nodes with specific types in the selected Figma node

Inputs: types (required), nodeId (required).

scan_text_nodesC

Scan all text nodes in the selected Figma node

Inputs: nodeId (required).

set_annotationB

Create or update an annotation

Inputs: nodeId (required), labelMarkdown (required), categoryId, properties, +1 more.

set_axis_alignA

Set primary and counter axis alignment for an auto-layout frame in Figma

Inputs: nodeId (required), counterAxisAlignItems, primaryAxisAlignItems.

set_corner_radiusA

Set the corner radius of a node in Figma

Inputs: nodeId (required), radius (required), corners.

set_default_connectorB

Set a copied connector node as the default connector

Inputs: connectorId.

set_fill_colorC

Set the fill color of a node in Figma can be TextNode or FrameNode

Inputs: b (required), g (required), r (required), nodeId (required), +1 more.

set_flowsC

Set the prototype flow starting points of a page

Inputs: flows (required), pageId.

set_focusA

Set focus on a specific node in Figma by selecting it and scrolling viewport to it

Inputs: nodeId (required).

set_image_fillA

Fill a node in Figma with an image from a local file path, a URL, or base64 data (replaces the node's existing fills)

Inputs: nodeId (required), imageUrl, imagePath, scaleMode, +1 more.

set_image_fill_cachedB

Fill a node with an image from a local file (PNG/JPG/GIF). The plugin caches each image by key, so the bytes travel only once.

Inputs: nodeId (required), filePath (required), scaleMode.

set_instance_overridesA

Apply previously copied overrides to selected component instances. Target instances will be swapped to the source component and all copied override properties will be applied.

Inputs: targetNodeIds (required), sourceInstanceId (required).

set_item_spacingA

Set distance between children in an auto-layout frame

Inputs: nodeId (required), itemSpacing, counterAxisSpacing.

set_layout_modeB

Set the layout mode and wrap behavior of a frame in Figma

Inputs: nodeId (required), layoutMode (required), layoutWrap.

set_layout_sizingA

Set horizontal and vertical sizing modes for an auto-layout frame in Figma

Inputs: nodeId (required), layoutSizingVertical, layoutSizingHorizontal.

set_multiple_annotationsC

Set multiple annotations parallelly in a node

Inputs: nodeId (required), annotations (required).

set_multiple_text_contentsB

Set multiple text contents parallelly in a node

Inputs: text (required), nodeId (required).

set_paddingB

Set padding values for an auto-layout frame in Figma

Inputs: nodeId (required), paddingTop, paddingLeft, paddingRight, +1 more.

set_parentA

Move a node into a new parent node (e.g. a section, frame or group). Preserves the node's absolute position unless x/y are provided

Inputs: nodeId (required), parentId (required), x, y, +1 more.

set_reactionsA

Add prototype interactions (real animation in Present mode). items: [{ nodeId, append?, reactions: [{ on: click|hover|press|timeout|enter|leave, timeout (s), to: destinationNodeId, nav: CHANGE_TO|NAVIGATE|SCROLL_TO|OVERLAY|BACK, anim: SMART_ANIMATE|DISSOLVE|SCROLL_ANIMATE|INSTANT, duration (s), easing: [x1,y1,x2,y2] | EASE_OUT | EASE_IN_AND_OUT… }] }] Use CHANGE_TO between variants of a component set for micro-interactions (hover, toggles, multi-step animations).

Inputs: items (required).

set_selectionsA

Set selection to multiple nodes in Figma and scroll viewport to show them

Inputs: nodeIds (required).

set_stroke_colorB

Set the stroke color of a node in Figma

Inputs: b (required), g (required), r (required), nodeId (required), +2 more.

set_text_contentA

Set the text content of an existing text node in Figma

Inputs: text (required), nodeId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 54 tools

    Disambiguation2/5

    Several tools have unclear boundaries or near-duplicate purposes: read_my_design duplicates get_selection, get_node_info/get_nodes_info/get_document_info overlap, and set_annotation/set_multiple_annotations plus delete_node/delete_multiple_nodes differ mainly by cardinality. The broad build_tree and run_code escape hatches also overlap nearly every individual creation/editing tool, making tool selection less predictable.

    Naming Consistency4/5

    Most tool names follow a clear snake_case verb_noun convention such as create_frame, set_fill_color, get_styles, and delete_node. There are minor deviations like ping, read_my_design, run_code, and join_channel, but the overall pattern remains highly readable.

    Tool Count1/5

    With 54 tools, the surface is far beyond a well-scoped 3-15 tool set and exceeds the rubric's 50+ extreme-mismatch threshold. Many cardinality variants and convenience wrappers could be consolidated without losing core Figma capabilities.

    Completeness4/5

    The surface covers a wide Figma lifecycle: node creation/read/update/delete, layout, styles, variables, components, annotations, prototyping, export, and a run_code escape hatch. Minor gaps exist around variable/style inspection or deletion and page management, but run_code prevents hard dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to interact with Figma to create, read, and manage designs using the Figma REST API and a dedicated plugin. It supports advanced features like UI generation from text, webpage reconstruction in Figma, and design token synchronization with codebases.
      20
      MIT
    • A
      license
      B
      quality
      A
      maintenance
      Enables AI-driven UI/UX design and prototyping in Figma by letting agents generate AutoLayout screens, modify canvas elements, and wire interactive prototype flows through natural language.
      47
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to read a Figma design and render a new one back through the Figma Plugin API using a single shared tree format, so designs can be inspected and built without a REST token or per-month call limit. Exposes tools for rendering whole screens, patching layers, finding and selecting nodes, managing pages, tokens and variables, capturing screenshots, exporting assets, and running Plugin API code.
      1
      MIT