OpenFigma MCP

v0.5.0
io.github.mishafyi/openfigma-mcp Checked 2 days ago Published 3 days ago

Read and edit Figma files from any MCP agent through a Figma plugin, a session per file, no relay

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

get_document_info

Get detailed information about the current Figma document: the current page's top-level nodes and every page of the document

get_selection

List the current page's selected nodes: ID, name, type and visibility

read_my_design

Get each selected node's details, as get_node_info gives them

get_node_info

Get a node and its subtree as Figma's REST JSON, trimmed, with its component, styles, text styles, bound variables and layout

ParameterTypeDescription
nodeId *stringThe ID of the node to get information about

get_nodes_info

get_node_info for several nodes; IDs that aren't found are left out

ParameterTypeDescription
nodeIds *arrayArray of node IDs to get information about

create_rectangle

Create a rectangle

ParameterTypeDescription
height *numberHeight of the rectangle
width *numberWidth of the rectangle
x *numberX position
y *numberY position
namestringOptional name for the rectangle
parentIdstringOptional parent node ID to append the rectangle to

create_frame

Create a frame, optionally with a fill, a stroke and auto layout

ParameterTypeDescription
height *numberHeight of the frame
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 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
parentIdstringOptional parent node ID to append the frame to
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 a text node, in Inter unless fontFamily sets the font

ParameterTypeDescription
text *stringText content
x *numberX position
y *numberY position
fontColorobjectFont color in RGBA format
fontFamilystringAny font installed for Figma, e.g. "SF Pro", "SF Pro Rounded", "New York"
fontSizenumberFont size (default: 14)
fontStylestringThe family's own style name, e.g. "Regular", "Semibold", "Bold" for SF Pro
fontWeightnumberFont weight, e.g. 400 Regular, 700 Bold (default 400); ignored when fontStyle is set
letterSpacingnumberLetter spacing in pixels
lineHeightnumberLine height in pixels
namestringSemantic layer name for the text node
parentIdstringOptional parent node ID to append the text to
textAlignHorizontalstring
textAlignVerticalstring
widthnumberFixed width: the text wraps and its height follows

set_fill_color

Replace a node's fills with one solid colour

ParameterTypeDescription
b *numberBlue component (0-1)
g *numberGreen component (0-1)
nodeId *stringThe ID of the node to modify
r *numberRed component (0-1)
anumberAlpha component (0-1)

set_stroke_color

Replace a node's strokes with one solid colour

ParameterTypeDescription
b *numberBlue component (0-1)
g *numberGreen component (0-1)
nodeId *stringThe ID of the node to modify
r *numberRed component (0-1)
anumberAlpha component (0-1)
weightnumberStroke weight; 1 when omitted

move_node

Set a node's position, relative to its parent

ParameterTypeDescription
nodeId *stringThe ID of the node to move
x *numberNew X position
y *numberNew Y position

clone_node

Duplicate a node into the same parent, on top of its siblings

ParameterTypeDescription
nodeId *stringThe ID of the node to clone
xnumberX position of the copy; needs y
ynumberY position of the copy; needs x

resize_node

Resize a node

ParameterTypeDescription
height *numberNew height
nodeId *stringThe ID of the node to resize
width *numberNew width

delete_node

Delete a node

ParameterTypeDescription
nodeId *stringThe ID of the node to delete

delete_multiple_nodes

Delete several nodes

ParameterTypeDescription
nodeIds *arrayArray of node IDs to delete

export_node_as_image

Export a node and return the image in the conversation; export_node_to_file keeps it out

ParameterTypeDescription
nodeId *stringThe ID of the node to export
formatstringDefault PNG
scalenumberPNG and JPG only; default 1

set_text_content

Replace a text node's text

ParameterTypeDescription
nodeId *stringThe ID of the text node to modify
text *stringNew text content

get_styles

Get the document's local styles: colours, texts, effects and grids

set_current_page

Switch Figma to a page of the current document, by its ID or its name, and get that page's top-level nodes and every page of the document

ParameterTypeDescription
pageIdstringThe ID of the page to switch to, from get_document_info's pages
pageNamestringThe page's name, or a part of it that only one page's name contains

get_variables

Get the current document's local variables by collection, with each variable's value in every mode (colors as hex, aliases by the name they point to)

ParameterTypeDescription
collectionstringOnly the collections whose name contains this text

get_local_components

List every local component: ID, name and key

get_components_by_page

List each page's component sets and the components outside sets, with each one's description and documentation link. Variants are left out (get_local_components lists them), except those with a description or link of their own, listed under their set

get_annotations

Get the annotations on a node and its descendants

ParameterTypeDescription
nodeId *stringThe node to read
includeCategoriesbooleanAlso return the document's annotation categories (default true)

set_annotation

Set a node's annotation, replacing any it has

ParameterTypeDescription
labelMarkdown *stringThe annotation text in markdown format
nodeId *stringThe ID of the node to annotate
categoryIdstringThe ID of the annotation category
propertiesarrayAdditional properties for the annotation

set_multiple_annotations

Annotate several nodes, one after another; each annotation replaces those on its node

ParameterTypeDescription
annotations *arrayOne annotation per node
nodeId *stringThe node they sit in; only reported back

create_component_instance

Create an instance of a component: a local one by componentId, a published one by componentKey

ParameterTypeDescription
x *numberX position
y *numberY position
componentIdstringA local component's ID (id from get_local_components)
componentKeystringA published component's key (key from get_local_components, or a library's)
parentIdstringOptional parent node ID to place the instance into

get_instance_overrides

List an instance's overrides

ParameterTypeDescription
nodeIdstringThe instance; the selected one when omitted

set_instance_overrides

Copy a source instance's overrides onto target instances, switching each target to the source's main component

ParameterTypeDescription
sourceInstanceId *stringThe instance to copy from
targetNodeIds *arrayThe instances to change

set_corner_radius

Set a node's corner radius, on all corners or the chosen ones

ParameterTypeDescription
nodeId *stringThe ID of the node to modify
radius *numberCorner radius value
cornersarrayOptional array of 4 booleans to specify which corners to round [topLeft, topRight, bottomRight, bottomLeft]

scan_text_nodes

List the text nodes inside a node: text, font, position, size and layer path

ParameterTypeDescription
nodeId *stringID of the node to scan

scan_nodes_by_types

Find a node's descendants of the given types, with their bounding boxes

ParameterTypeDescription
nodeId *stringID of the node to scan
types *arrayArray of node types to find in the child nodes (e.g. ['COMPONENT', 'FRAME'])

set_multiple_text_contents

Set the text of several text nodes, five at a time

ParameterTypeDescription
nodeId *stringThe node they sit in; only reported back
text *arrayText node IDs and their new text

set_layout_mode

Set a frame's auto layout direction and wrap

ParameterTypeDescription
layoutMode *stringLayout mode for the frame
nodeId *stringThe ID of the frame to modify
layoutWrapstringWhether the auto-layout frame wraps its children

set_padding

Set an auto-layout frame's padding

ParameterTypeDescription
nodeId *stringThe ID of the frame to modify
paddingBottomnumberBottom padding value
paddingLeftnumberLeft padding value
paddingRightnumberRight padding value
paddingTopnumberTop padding value

set_axis_align

Set an auto-layout frame's primary and counter axis alignment

ParameterTypeDescription
nodeId *stringThe ID of the frame to modify
counterAxisAlignItemsstringCounter axis alignment (MIN/MAX = top/bottom in horizontal, left/right in vertical)
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.

set_layout_sizing

Set an auto-layout frame's horizontal and vertical sizing

ParameterTypeDescription
nodeId *stringThe ID of the frame to modify
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)

set_item_spacing

Set the spacing between an auto-layout frame's children, and between wrapped rows

ParameterTypeDescription
nodeId *stringThe ID of the frame to modify
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.

get_reactions

Get the prototype reactions (interactions) of nodes. The reaction_to_connector_strategy prompt shows how to draw them as FigJam connectors with create_connections

ParameterTypeDescription
nodeIds *arrayArray of node IDs to get reactions from

set_default_connector

Choose the connector create_connections copies: the given one, else the one already set, else the first on the current page

ParameterTypeDescription
connectorIdstringA connector's ID

create_connections

Connect pairs of nodes with copies of the default connector, each with optional text

ParameterTypeDescription
connections *arrayArray of node connections to create

set_focus

Select a node and scroll the viewport to it

ParameterTypeDescription
nodeId *stringThe ID of the node to focus on

set_selections

Select nodes and scroll the viewport to them

ParameterTypeDescription
nodeIds *arrayArray of node IDs to select

set_image_fill

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

ParameterTypeDescription
nodeId *stringThe ID of the node to fill
imageBase64stringBase64-encoded image data, with or without a data: URI prefix (only when the image exists nowhere else)
imagePathstringAbsolute path to a local image file, read by the MCP server (preferred: keeps image bytes out of the model context)
imageUrlstringImage URL, fetched by the MCP server (the Figma plugin cannot fetch arbitrary domains itself)
scaleModestringHow the image fills the node (default: FILL)

rename_node

Rename a node

ParameterTypeDescription
name *stringThe new name for the node
nodeId *stringThe ID of the node to rename

create_section

Create a section to group related content on the canvas

ParameterTypeDescription
height *numberHeight of the section
width *numberWidth of the section
x *numberX position
y *numberY position
namestringOptional name for the section

set_parent

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

ParameterTypeDescription
nodeId *stringThe ID of the node to move
parentId *stringThe ID of the new parent node (must support children, e.g. a section, frame or group)
indexnumberOptional child index to insert at (default: appended as last child)
xnumberOptional X position relative to the new parent
ynumberOptional Y position relative to the new parent

create_page

Create a page in the current document (a Starter-plan file is limited to 3 pages; Figma refuses more)

ParameterTypeDescription
name *stringThe page's name
switchTobooleanMake it the current page

create_ellipse

Create an ellipse, circle, ring (stroke without fill) or arc

ParameterTypeDescription
height *numberHeight
width *numberWidth
x *numberX position
y *numberY position
arcDataobjectArc or donut
fillColorobjectFill colour; omit for an outline only
namestringLayer name
parentIdstringParent node ID (default: current page)
strokeColorStroke colour
strokeWeightnumberStroke weight

create_svg

Create vector layers from SVG markup, like Figma's SVG import: lines, arrows, paths, icons

ParameterTypeDescription
svg *stringA complete <svg> document
x *numberX position
y *numberY position
namestringLayer name
parentIdstringParent node ID (default: current page)

set_text_style

Change an existing text node's font, size, alignment, line height, letter spacing or sizing, including text inside an instance

ParameterTypeDescription
nodeId *stringThe text node's ID
fontFamilystringAny font installed for Figma, e.g. "SF Pro", "SF Pro Rounded", "New York"
fontSizenumberFont size
fontStylestringThe family's own style name, e.g. "Regular", "Semibold", "Bold" for SF Pro
letterSpacingnumberLetter spacing in pixels
lineHeightnumberLine height in pixels
textAlignHorizontalstring
textAlignVerticalstring
textAutoResizestring
widthnumberFixed width: the text wraps and its height follows

set_node_properties

Set a node's opacity, visibility, rotation, blend mode, clipping, lock, stroke alignment, dashes or corner smoothing; hiding a layer inside an instance is an override

ParameterTypeDescription
nodeId *stringThe node's ID
blendModestring
clipsContentbooleanFrames: hide children outside the bounds (crops an image inside)
cornerSmoothingnumber0.6 matches iOS's continuous corners
dashPatternarrayDash and gap lengths, e.g. [4, 4]; [] for solid
lockedboolean
opacitynumber
rotationnumberDegrees
strokeAlignstring
visibleboolean

set_effects

Replace a node's effects with drop or inner shadows, layer or background blur, or Liquid Glass

ParameterTypeDescription
effects *arrayEffects in order; [] removes them all
nodeId *stringThe node's ID

set_gradient_fill

Replace a node's fills with a linear, radial, angular or diamond gradient

ParameterTypeDescription
gradientType *string
nodeId *stringThe node's ID
stops *arrayColour stops from 0 to 1
anglenumberDegrees: 0 runs left to right, 90 (default) top to bottom

create_slice

Create a slice: an export region over whatever lies under it, to export with export_node_to_file

ParameterTypeDescription
height *numberHeight
width *numberWidth
x *numberX position
y *numberY position
namestringLayer name
parentIdstringParent node ID (default: current page)

get_instance_properties

Get an instance's component properties (variants, booleans, text, instance swaps) with every allowed value, and its main component

ParameterTypeDescription
nodeId *stringThe instance's ID

set_instance_properties

Set an instance's component properties: variant values by name; boolean, text and instance-swap properties by their name with the #id suffix from get_instance_properties

ParameterTypeDescription
nodeId *stringThe instance's ID
properties *objecte.g. {"Style": "Glass", "Show Icon#12:3": false}

detach_instance

Detach an instance into a plain frame (and any instances it sits in)

ParameterTypeDescription
nodeId *stringThe instance's ID

group_nodes

Group nodes

ParameterTypeDescription
nodeIds *arrayNodes to group
namestringGroup name
parentIdstringWhere the group goes (default: the first node's parent)

ungroup_node

Ungroup a group or frame, keeping its children

ParameterTypeDescription
nodeId *stringThe group's ID

boolean_operation

Combine shapes with union, subtract, intersect or exclude

ParameterTypeDescription
nodeIds *arrayShapes; subtract removes the rest from the first
operation *string
namestringLayer name
parentIdstringWhere the result goes (default: the first node's parent)

create_component_from_node

Turn a frame or other node into a component, to reuse it as instances

ParameterTypeDescription
nodeId *stringThe node's ID

apply_style

Apply a local fill, stroke, text or effect style (IDs from get_styles)

ParameterTypeDescription
kind *string
nodeId *stringThe node's ID
styleId *stringThe style's ID

bind_color_variable

Bind a node's fill or stroke colour to a local colour variable, by ID or by the name get_variables lists

ParameterTypeDescription
nodeId *stringThe node's ID
property *string
collectionstringThe collection's name, when the variable name repeats
variableIdstringThe variable's ID
variableNamestringThe variable's name, e.g. "Labels/Primary"

export_node_to_file

Export a node or slice to a file on disk (PNG, JPG, SVG or PDF), keeping the image out of the conversation

ParameterTypeDescription
nodeId *stringThe node or slice to export
path *stringAbsolute output path, including the file name
formatstringDefault PNG
scalenumberPNG and JPG only; default 1

join_channel

Choose the Figma file to work on, by its file key. Waits up to 10 seconds for the OpenFigma plugin running in that file to connect

ParameterTypeDescription
channel *stringThe file key: the ID after /design/ in the file's URL