figma-edit-mcp

v2.3.3
io.github.neozhehan/figma-edit-mcp Checked 3 days ago Published 4 months ago

Programmatically read, create, and modify Figma designs via MCP.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

page_info Get Pages

List the document's pages; no args → all pages (no children), or pass `pageIds` → those pages with their top-level children. Batch ≤25 ids/call. Inspect `coverage`: a failed page is omitted with a structured `pageErrors` row while other pages still return.

ParameterTypeDescription
pageIdsarrayArray of page IDs to inspect

node_info Get Node Info

Read one or more nodes — recursive subtree traversal with `properties` selection, `filter`, and `maxDepth`. Returns only the requested properties (incl. resolved `boundVariables`/`explicitVariableModes`) under each node's `properties` key. A node whose containing page could not be read is listed in `pageFailedNodes` with that page's ID, and the page's structured reason is in `coverage.pageErrors` — other pages still return normally. The workhorse read; start here before any write.

ParameterTypeDescription
concurrencyLimitintegerConcurrency limit for parallel subtree walk (default: 4)
filterobjectOptional filter criteria.
maxDepthintegerMaximum depth for recursive child traversal. 0 = self only, 1 = self and immediate children, etc.
nodeIdsarrayArray of node IDs to inspect. If empty, uses editable scope.
propertiesarrayArray of property names to return (populates each node's `properties` object in the response).

node_transform Transform Node

Move and/or resize a node by setting absolute `x`/`y`/`width`/`height` (any subset).

ParameterTypeDescription
nodeId *stringThe ID of the node to transform
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
heightnumberNew height
widthnumberNew width
xnumberNew X position
ynumberNew Y position

node_rename Rename Node

Rename a node (sets `name` to an exact value).

ParameterTypeDescription
name *stringNew non-empty name for the node. Figma normalizes an empty name to a type default, so `""` is refused rather than silently substituted.
nodeId *stringThe ID of the node to rename
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.

node_delete Delete Nodes

Delete one or more nodes in a single batched, per-item-validated call. No API undo. If the status is 'partial_success', treat it as an incomplete operation, report the failed and skipped items to the user, and retry every non-success item (both failed and skipped).

ParameterTypeDescription
nodes *arrayArray of nodes to delete

node_clone Clone Node

Duplicate an existing node, optionally at a new `x`/`y`. Produces a new node id.

ParameterTypeDescription
nodeId *stringThe ID of the node to clone
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
xnumberNew X position for the clone
ynumberNew Y position for the clone

view_navigate Navigate View

Navigate the editor view to a page or node(s).

ParameterTypeDescription
ids *arrayArray of page or node IDs to navigate to

node_group Group Nodes

Wrap multiple nodes in a new group node.

ParameterTypeDescription
nodes *arrayArray of nodes to group
namestringOptional non-empty name for the new group. Omit to accept Figma's default; `""` is refused rather than silently substituted.

node_ungroup Ungroup Node

Dissolve a group, promoting its children to the parent. Removes the group container.

ParameterTypeDescription
nodeId *stringThe ID of the group to ungroup
nodeName *stringThe group's current exact name, passed back verbatim from `node_info`.

node_flatten Flatten Node

Flatten a node and its children into a single vector. Lossy — original structure is not recoverable.

ParameterTypeDescription
nodeId *stringThe ID of the node to flatten
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.

node_insert_child Reparent Node

Reparent a node under a new parent at an optional `index`. Valid range is 0 to parent's child count. Omit `index` to append.

ParameterTypeDescription
childId *stringID of the child node to reparent
childNodeName *stringThe child node's current exact name, passed back verbatim from `node_info`.
parentId *stringID of the new parent node
parentNodeName *stringThe parent node's current exact name, passed back verbatim from `node_info`.
indexnumberPosition in parent's children array (default: append). The output index reports the actual resolved position (same-parent reorder shifts indices).

node_set_auto_layout Set Auto Layout

Configure a frame's auto-layout (mode, padding, spacing, alignment, sizing) in one unified setter.

ParameterTypeDescription
nodeId *stringThe ID of the frame to modify
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
counterAxisAlignItemsstringCounter axis alignment (MIN/MAX = top/bottom in horizontal, left/right in vertical)
counterAxisSpacingnumberDistance between wrapped rows/columns. Only works when layoutWrap is set to WRAP.
itemSpacingnumberDistance between children. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN.
layoutModestringLayout mode for the frame
layoutSizingHorizontalstringHorizontal sizing mode (HUG for frames/text only, FILL for auto-layout children only)
layoutSizingVerticalstringVertical sizing mode (HUG for frames/text only, FILL for auto-layout children only)
layoutWrapstringWhether the auto-layout frame wraps its children
paddingBottomnumberBottom padding value
paddingLeftnumberLeft padding value
paddingRightnumberRight padding value
paddingTopnumberTop padding value
primaryAxisAlignItemsstringPrimary axis alignment (MIN/MAX = left/right in horizontal, top/bottom in vertical). Note: When set to SPACE_BETWEEN, itemSpacing will be ignored as children will be evenly spaced.

node_set_fill Set Fill

Set a node's fill to a literal RGBA color, an image, or clear it. Use `node_apply_style` to link a shared paint style, or `node_bind_variable` to bind a color token.

ParameterTypeDescription
nodeId *stringThe ID of the node to modify
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
anumberAlpha component (0-1)
bnumberBlue component (0-1)
clearbooleanSet to true to clear all fills. Must provide exactly one of solid color, image, or clear:true.
gnumberGreen component (0-1)
imageobjectOptional image payload. Must provide exactly one of solid color or image.
rnumberRed component (0-1)

node_set_stroke Set Stroke

Set a node's stroke color and weight; supports uniform or per-side weights.

ParameterTypeDescription
b *numberBlue component (0-1)
g *numberGreen component (0-1)
nodeId *stringThe ID of the node to modify
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
r *numberRed component (0-1)
anumberAlpha component (0-1)
strokeBottomWeightnumberBottom side stroke weight
strokeLeftWeightnumberLeft side stroke weight
strokeRightWeightnumberRight side stroke weight
strokeTopWeightnumberTop side stroke weight
weightnumberUniform stroke weight (used when individual side weights are not provided)

node_set_corner_radius Set Corner Radius

Set a node's corner radius — uniform or per-corner.

ParameterTypeDescription
nodeId *stringThe ID of the node to modify
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
radius *numberCorner radius value
cornersarrayOptional array of 4 booleans to specify which corners to round [topLeft, topRight, bottomRight, bottomLeft]

node_set_effects Set Effects

Set a node's effect array (shadows, blurs). Use `node_apply_style` to link a shared effect style instead.

ParameterTypeDescription
effects *arrayArray of strict per-variant Figma effects: DROP_SHADOW/INNER_SHADOW or LAYER_BLUR/BACKGROUND_BLUR
nodeId *stringThe ID of the node to modify
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.

node_apply_style Apply Style

Link a node to a shared library style (paint/text/effect/grid) by `styleId`. Use the raw `node_set_*` setters for ad-hoc values not backed by a style.

ParameterTypeDescription
nodeId *stringThe ID of the node to apply style to
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
styleId *stringThe ID of the style to apply
styleType *stringType of style to apply (target property)

node_bind_variable Bind Variable

Bind a variable to a node property, or set an explicit variable mode. Use instead of a literal `node_set_*` when the value should track a design token. Ordering rules: set auto-layout before binding padding/spacing; set a solid fill before binding a colour token.

ParameterTypeDescription
nodeId *stringThe ID of the node to bind variables to
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
bindVariablesobjectMap of property names to variable IDs (to bind) or null (to unbind). Valid fields: fills, strokes, height, width, characters, itemSpacing, paddingLeft, paddingRight, paddingTop, paddingBottom, visible…
explicitVariableModesobjectMap of variable collection IDs to mode IDs. E.g., { 'VariableCollectionID:1:2': 'ModeID:1:3' }

node_export_visual Export Node Image

Render a node to an image (PNG/JPG/SVG/PDF) at a given scale. Read-only; the canonical way to visually verify edits. SVG returns raw XML in `svg` (directly readable); PNG/JPG/PDF return base64 in `imageData` (PDF is a delivery artifact — prefer PNG/SVG for inspection).

ParameterTypeDescription
nodeId *stringThe ID of the node to export
formatstringExport format
scalenumberExport scale, between 0.1 and 4.0 (e.g. 1, 2, 0.5)

create_shape Create Shape

Create a rectangle, ellipse, polygon, or star via `type`, with position/size and optional `fillColor`/`strokeColor`. Shape-specific params (`arcData`; `pointCount`/`innerRadius`) validated by `type`. `pointCount` = sides (polygon) or points (star), native count — no even-parity rule.

ParameterTypeDescription
height *numberHeight of the shape
parentId *stringParent node ID to append the shape to
parentNodeName *stringThe parent node's current exact name, passed back verbatim from `node_info`.
type *stringThe type of shape to create
width *numberWidth of the shape
x *numberX position
y *numberY position
arcDataobjectOptional arc data for creating arcs/donuts (ELLIPSE only)
fillColorobjectFill color in RGBA format
innerRadiusnumber0.0–1.0, star sharpness (default: 1.0). STAR only.
namestringOptional non-empty name for the shape
pointCountnumberNumber of sides (polygon) or points (star), ≥3. Required for POLYGON and STAR.
strokeColorobjectStroke color in RGBA format
useAbsolutePositionbooleanIf true and parent is an auto-layout frame, forces absolute positioning to prevent layout shifts.

create_frame Create Frame

Create a frame (container) with optional fill/stroke and full auto-layout configuration.

ParameterTypeDescription
height *numberHeight of the frame
parentId *stringParent node ID to append the frame to
parentNodeName *stringThe parent node's current exact name, passed back verbatim from `node_info`.
width *numberWidth of the frame
x *numberX position
y *numberY position
counterAxisAlignItemsstringCounter axis alignment for auto-layout frame
fillColorobjectFill color in RGBA format
itemSpacingnumberDistance between children in auto-layout frame. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN.
layoutModestringAuto-layout mode for the frame
layoutSizingHorizontalstringHorizontal sizing mode for auto-layout frame
layoutSizingVerticalstringVertical sizing mode for auto-layout frame
layoutWrapstringWhether the auto-layout frame wraps its children
namestringOptional non-empty name for the frame
paddingBottomnumberBottom padding for auto-layout frame
paddingLeftnumberLeft padding for auto-layout frame
paddingRightnumberRight padding for auto-layout frame
paddingTopnumberTop padding for auto-layout frame
primaryAxisAlignItemsstringPrimary axis alignment for auto-layout frame. Note: When set to SPACE_BETWEEN, itemSpacing will be ignored as children will be evenly spaced.
strokeColorobjectStroke color in RGBA format
strokeWeightnumberStroke weight

create_text Create Text

Create a text node with content and optional font size/weight/color.

ParameterTypeDescription
parentId *stringParent node ID to append the text to
parentNodeName *stringThe parent node's current exact name, passed back verbatim from `node_info`.
text *stringText content
x *numberX position
y *numberY position
fontColorobjectFont color in RGBA format
fontSizenumberFont size, minimum 1 (default: 14)
fontWeightintegerFont weight: 100–900 in increments of 100 (default: 400)
namestringOptional non-empty semantic layer name for the text node

create_svg Create Node from SVG

Create a node from an SVG markup string.

ParameterTypeDescription
parentId *stringParent ID to append to
parentNodeName *stringThe parent node's current exact name, passed back verbatim from `node_info`.
svg *stringThe SVG XML string
namestringOptional non-empty name for the new node
xnumberX position
ynumberY position

create_component Create Component

Convert an existing frame into a main component.

ParameterTypeDescription
nodeId *stringThe ID of the frame to convert to a component
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.

create_instance Create Instance

Instantiate a component (by `componentKey` or `componentId`) at a position.

ParameterTypeDescription
parentId *stringParent node ID to append the instance to
parentNodeName *stringThe parent node's current exact name, passed back verbatim from `node_info`.
x *numberX position
y *numberY position
componentIdstringNode ID of the component to instantiate (preferred for local components)
componentKeystringKey of the component to instantiate (for remote/library components)

create_component_set Create Component Set

Combine components into a component set (variants) with property definitions.

ParameterTypeDescription
components *arrayArray of component objects
parentId *stringID of the appendable parent container (frame, group, page, section, etc.) to place the set in; discover it with node_info
parentNodeName *stringThe parent node's current exact name, passed back verbatim from `node_info`.
properties *arrayArray of property names (e.g. ['Size', 'State'])
componentSetNamestringOptional non-empty name for the component set

style_list List Styles

List all local styles (paint/text/effect/grid) in the document.

style_manage Manage Style

Create a named style (paint/text/effect/grid), or update an existing one when `styleId` is given. UPDATE requires currentStyleName.

style_delete Delete Style

Delete a local style by id. Detaches consumers — they keep their resolved values and lose only the style link.

ParameterTypeDescription
styleId *stringID of style to delete
styleName *stringThe style's current exact name, passed back verbatim from `style_list`.

text_set_content Set Text Contents

Set the text of one or more text nodes in a single batched, per-item-validated call. If the status is 'partial_success', treat it as an incomplete operation, report the failed and skipped items to the user, and retry every non-success item (both failed and skipped).

ParameterTypeDescription
text *arrayArray of text objects

text_set_style Set Text Style

Set any combination of typography properties (font, size, weight, spacing, decoration, …) on a text node.

ParameterTypeDescription
nodeId *stringThe ID of the text node to modify
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
fontNameobjectFont family and style
fontSizenumberFont size
letterSpacingobjectLetter spacing settings
lineHeightLine height settings
paragraphIndentnumberParagraph indent in pixels
paragraphSpacingnumberParagraph spacing in pixels
textAlignHorizontalstringHorizontal text alignment
textAlignVerticalstringVertical text alignment
textCasestringCase transformation on the text
textDecorationstringText decoration

component_list List Components

List components in the document, with filtering and scope options. Document scans isolate page failures and report them in `coverage`; page-scoped failures return their structured error directly.

ParameterTypeDescription
filterstringFilter components by origin: 'local' (created in this file) or 'remote' (library components). If omitted, returns all.
pageIdstringThe ID of the page to query when scope is 'page'
scopestringScope of the search: 'page' (queries a specific page, requiring pageId) or 'document' (entire file, default).

component_manage_property Manage Component Property

Add or edit a component-property definition (BOOLEAN/TEXT/INSTANCE_SWAP) on a main component or variant set. Deleting is `component_delete_property`.

ParameterTypeDescription
action *stringAction to perform
nodeId *stringID of the COMPONENT or COMPONENT_SET
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
propertyName *stringFor ADD, the required new property name, which must be non-empty. For EDIT, the existing property's exact lookup name.
defaultValueRequired for ADD: Default value for the property. For INSTANCE_SWAP, this must be a component node ID.
newDefaultValueFor the EDIT action, to change the default value. For INSTANCE_SWAP, this must be a component node ID.
newPropertyNamestringFor EDIT, the optional replacement property name. It must be non-empty when supplied; omit it to leave the existing property name unchanged.
preferredValuesarrayArray of preferred values for INSTANCE_SWAP properties during ADD or EDIT.
propertyTypestringRequired for ADD: The type of property

component_delete_property Delete Component Property

Remove a component-property definition from a main component or variant set; propagates to every instance.

ParameterTypeDescription
nodeId *stringID of the COMPONENT or COMPONENT_SET
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
propertyName *stringThe human-readable name of the property to delete

instance_set_property Set Instance Property

Set one property on an instance — boolean toggle, text override, instance swap, or variant selection.

ParameterTypeDescription
nodeId *stringThe ID of the instance node
nodeName *stringThe instance's current exact name, passed back verbatim from `node_info`.
propertyName *stringThe human-readable name of the component property to change
value *The new value for the property. For INSTANCE_SWAP properties, this must be a component key (the stable library identifier).

instance_get_overrides Get Instance Overrides

Read the override properties from a source instance, to later apply them to other instances.

ParameterTypeDescription
nodeId *stringThe ID of the component instance to get overrides from.

instance_set_overrides Set Instance Overrides

Apply previously-read overrides to target instances; targets are swapped to the source component and all overrides applied. If the status is 'partial_success', treat it as an incomplete operation, report the failed and skipped items to the user, and retry every non-success item (both failed and skipped).

ParameterTypeDescription
sourceInstanceId *stringID of the source component instance
targetNodes *arrayArray of target instances with their expected names for verification.

variable_list List Variables

List local variables/collections, or detailed info for specific variable ids; optionally scan for consumers. Document consumer scans isolate page failures and report them in `coverage`; page-scoped failures return their structured error directly.

ParameterTypeDescription
includeConsumersstringOnly used when variableId is provided; ignored otherwise. 'page' scans a specific page, requiring pageId. 'document' scans all pages (streams progress page-by-page).
pageIdstringThe page ID to scan for consumers when includeConsumers is 'page'.
variableIdarrayOptional array of variable IDs to retrieve detailed information for. If omitted, lists all local variables.

variable_manage Manage Variables

Create collections and variables and set their values/aliases (create/update router). UPDATE_VARIABLE requires `currentVariableName`. CREATE_VARIABLE requires `collectionName` and `scopes`.

ParameterTypeDescription
action *stringAction type
collectionIdstringCollection ID (for CREATE_VARIABLE)
collectionNamestringREQUIRED for CREATE_VARIABLE — the parent collection's exact name, passed back verbatim from `variable_list`
currentVariableNamestringREQUIRED for UPDATE_VARIABLE — the variable's **current exact** name, passed back verbatim from `variable_list`
descriptionstringDescription (for UPDATE_VARIABLE)
modeIdstringMode ID (for UPDATE_VARIABLE value setting)
modeNamestringOptional initial mode name for CREATE_COLLECTION. Must be non-empty when supplied; omit it to keep the collection's native default mode name.
namestringName for collection/variable creation or variable update. Must be non-empty when supplied. It is required for CREATE_COLLECTION and CREATE_VARIABLE; omit it only on UPDATE_VARIABLE to leave the curren…
scopesarrayREQUIRED for CREATE_VARIABLE — variable scopes. ALWAYS set explicitly on create; omit on update to leave unchanged.
typestringVariable type (for CREATE_VARIABLE)
valueValue for the variable (or alias) (for CREATE or UPDATE)
variableIdstringVariable ID (for UPDATE_VARIABLE)

variable_delete Delete Variables

Delete specific variables or an entire collection. Runs a full-document consumer check first, before any removal: if a target is still in use the call is refused with VARIABLE_IN_USE, whose `details.variablesInUse` lists every consumer; if any page cannot be loaded and read it is refused with DOCUMENT_SCAN_INCOMPLETE, because a page error can never mean zero consumers.

ParameterTypeDescription
collectionIdstringID of a variable collection to delete. Mutually exclusive with variableIds.
collectionNamestringName of the collection to delete, for safety verification. Required if collectionId is used.
variableIdsarrayArray of variable IDs to delete. Mutually exclusive with collectionId.
variableNamesarrayArray of variable names corresponding to variableIds, for safety verification. Required if variableIds is used.

annotation_list List Annotations

Read the native annotations on a page or node (and subtree); exactly one of pageId or nodeId is required. The file's annotation categories are returned by default; pass includeCategories: false to omit them. Page loading is bounded; a page-scoped failure returns its structured error directly and successful reads include `coverage`.

ParameterTypeDescription
includeCategoriesbooleanInclude the file's global annotation categories in the result. Defaults to true; pass false to omit them.
nodeIdstringThe node ID to get annotations from. Exactly one of pageId or nodeId is required.
pageIdstringThe page ID to get annotations from. Exactly one of pageId or nodeId is required.

annotation_set Set Annotations

Append native annotations to one or more nodes in a batched call. If the status is 'partial_success', treat it as an incomplete operation and report the failed and skipped items to the user. Appending is NOT idempotent and a 'failed' row may already have appended its annotation (verified counts differ, or outcomeUnknown is true when post-state is unreadable; both carry partialMutation: true) — before retrying any non-success item, call annotation_list and compare the labels already on the node, or you will create a duplicate.

ParameterTypeDescription
annotations *arrayArray of annotations to set

reaction_list List Reactions

Read prototype reactions from one or more nodes and their descendants.

ParameterTypeDescription
nodeIds *arrayArray of node IDs to get reactions from

reaction_update Update Reactions

Replace a node's prototype reactions with a full new reactions array (read first via `reaction_list`).

ParameterTypeDescription
nodeId *stringThe ID of the node to update reactions for
nodeName *stringThe node's current exact name, passed back verbatim from `node_info`.
reactions *arrayThe full array of Reaction objects to set

channel_join Join Channel

Join a plugin channel to establish the live connection to the Figma document.

ParameterTypeDescription
channel *stringThe name of the channel to join