figma-mcp-rust
v0.2.2Figma MCP server in Rust: plugin bridge, no API token, no rate limits, 73 tools.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_document
Get the full node tree of the current page (not the whole file — only the active page). Returns all nodes recursively and can be very large. Prefer get_design_context for exploration or when token efficiency matters.
get_pages
List all pages in the document with their IDs and names. Lightweight alternative to get_document.
get_metadata
Get metadata about the current Figma document: file name, pages, current page.
get_selection
Get the nodes currently selected in Figma. Returns an empty array if nothing is selected. Use get_design_context or get_node to retrieve deeper detail about a specific node by ID.
get_node
Get a single node by ID with full detail. Use get_nodes_info to fetch multiple nodes in one round-trip instead of calling this repeatedly. Node ID must be colon format e.g. '4029:12345', never hyphens.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Node ID in colon format e.g. '4029:12345' |
get_nodes_info
Get full details for multiple nodes by ID in one round-trip. Prefer this over calling get_node repeatedly when you need several nodes.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | List of node IDs in colon format e.g. ['4029:12345', '4029:67890'] |
get_design_context
Get a depth-limited, token-efficient tree of the current selection or page. Use this instead of get_document when exploring large files. Supports detail levels (minimal/compact/full) and dedupe_components for pages heavy with repeated component instances.
| Parameter | Type | Description |
|---|---|---|
dedupe_components | boolean | When true, INSTANCE nodes are serialized compactly (mainComponentId + componentProperties + overrides) and unique component definitions are collected once in a top-level componentDefs map. Highly toke… |
depth | number | How many levels deep to traverse (default 2) |
detail | string | Property verbosity: minimal (id/name/type/bounds only), compact (+fills/strokes/opacity), full (everything, default) |
search_nodes
Search for nodes by name substring and/or type within a subtree. Use this when you know (part of) the node name. Use scan_nodes_by_types when you want all nodes of a type regardless of name.
| Parameter | Type | Description |
|---|---|---|
query * | string | Name substring to match (case-insensitive) |
limit | number | Maximum results to return (default: 50) |
nodeId | string | Scope search to this subtree (default: current page), colon format e.g. '4029:12345' |
types | array | Filter by Figma node type e.g. ['TEXT', 'FRAME', 'COMPONENT'] |
scan_text_nodes
Scan all TEXT nodes in a subtree and return their content. Shorthand for scan_nodes_by_types with ['TEXT'] — use when you only need text copy from a component or frame.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Root node ID to scan from, colon format e.g. '4029:12345' |
scan_nodes_by_types
Find all nodes of specific types in a subtree, regardless of name. Use search_nodes instead when you need to filter by name.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Root node ID to scan from, colon format e.g. '4029:12345' |
types * | array | Node types to find e.g. ['FRAME', 'COMPONENT', 'INSTANCE'] |
get_reactions
Get the prototype reactions defined on a node. Returns an array of reaction objects — each has a trigger (e.g. ON_CLICK, ON_HOVER, AFTER_TIMEOUT) and an actions array (navigate to node, open URL, go back, etc.). Use set_reactions to add or replace reactions, remove_reactions to delete them.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Node ID in colon format e.g. '4029:12345' |
get_viewport
Get the current Figma viewport: scroll center, zoom level, and visible bounds.
get_fonts
List all fonts used in the current page, sorted by usage frequency. Useful for understanding typography without scanning all text nodes.
get_styles
Get all local styles in the document (paint, text, effect, and grid). Returns each style's ID, name, type, and properties. Use the style ID with apply_style_to_node or update_paint_style. For design tokens (variables), use get_variable_defs instead.
get_variable_defs
Get all local variable definitions: collections, modes, and values. Variables are Figma's design token system.
get_local_components
Get all components defined in the current Figma file.
get_annotations
Get dev-mode annotations in the current document or scoped to a specific node. Returns annotation objects with label text, measurement type, and the ID of the annotated node. Omit nodeId to retrieve all annotations on the current page.
| Parameter | Type | Description |
|---|---|---|
nodeId | string | Optional — scope results to annotations on this node and its descendants, colon format e.g. '4029:12345' |
export_tokens
Export all design tokens (variables and paint styles) as JSON or CSS custom properties. Ideal for bridging Figma variables into your codebase.
| Parameter | Type | Description |
|---|---|---|
format | string | Output format: json (default) or css |
get_screenshot
Export a screenshot of one or more nodes as base64-encoded image data (held in memory). Use save_screenshots instead when you want to write images directly to disk without base64 in the response.
| Parameter | Type | Description |
|---|---|---|
format | string | Export format: PNG (default), SVG, JPG, or PDF |
nodeIds | array | Optional node IDs to export, colon format. If empty, exports current selection. |
scale | number | Export scale for raster formats (default 2) |
export_frames_to_pdf
Export multiple frames as a single multi-page PDF file. Each frame becomes one page in order. Ideal for pitch decks, proposals, and slide exports.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Ordered list of frame node IDs to export as PDF pages, colon format e.g. '4029:12345' |
outputPath * | string | File path to write the PDF to, must end in .pdf (relative to working directory or absolute) |
save_screenshots
Export screenshots for multiple nodes and write them to the local filesystem. Returns file metadata (path, size, dimensions) — no base64 in the response. Use get_screenshot instead when you need the image data in memory.
| Parameter | Type | Description |
|---|---|---|
items * | array | List of {nodeId, outputPath, format?, scale?} objects |
format | string | Default export format: PNG (default), SVG, JPG, or PDF |
scale | number | Default export scale for raster formats (default 2) |
create_frame
Create a new frame on the current page or inside a parent node.
| Parameter | Type | Description |
|---|---|---|
counterAxisAlignItems | string | |
counterAxisSizingMode | string | |
counterAxisSpacing | number | |
fillColor | string | |
height | number | |
itemSpacing | number | |
layoutMode | string | |
layoutWrap | string | |
name | string | |
paddingBottom | number | |
paddingLeft | number | |
paddingRight | number | |
paddingTop | number | |
parentId | string | |
primaryAxisAlignItems | string | |
primaryAxisSizingMode | string | |
width | number | |
x | number | |
y | number |
create_rectangle
Create a new rectangle on the current page or inside a parent node.
| Parameter | Type | Description |
|---|---|---|
cornerRadius | number | |
fillColor | string | |
height | number | |
name | string | |
parentId | string | |
width | number | |
x | number | |
y | number |
create_ellipse
Create a new ellipse (circle/oval) on the current page or inside a parent node.
| Parameter | Type | Description |
|---|---|---|
fillColor | string | |
height | number | |
name | string | |
parentId | string | |
width | number | |
x | number | |
y | number |
create_text
Create a new text node on the current page or inside a parent node. The font is loaded automatically before insertion. Returns the created node ID and bounds. Use set_text to update the content of an existing text node.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
fillColor | string | |
fontFamily | string | |
fontSize | number | |
fontStyle | string | |
name | string | |
parentId | string | |
x | number | |
y | number |
import_image
Import a base64-encoded image into Figma as a rectangle with an image fill. Use get_screenshot to capture images or provide your own base64 PNG/JPG.
| Parameter | Type | Description |
|---|---|---|
imageData * | string | |
height | number | |
name | string | |
parentId | string | |
scaleMode | string | |
width | number | |
x | number | |
y | number |
create_component
Convert an existing FRAME node into a reusable COMPONENT. The frame is replaced in place by the new component.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | FRAME node ID to convert, in colon format e.g. '4029:12345' |
name | string |
create_section
Create a Figma Section node on the current page. Sections are the modern way to organize frames and groups on a page.
| Parameter | Type | Description |
|---|---|---|
height | number | |
name | string | |
width | number | |
x | number | |
y | number |
set_text
Update the text content of an existing TEXT node.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | TEXT node ID in colon format e.g. '4029:12345' |
text * | string |
set_fills
Set the fill color on a single node (takes one nodeId, not an array). Use mode='append' to stack a new fill on top of existing fills instead of replacing them.
| Parameter | Type | Description |
|---|---|---|
color * | string | Fill color as hex: #RRGGBB or #RRGGBBAA |
nodeId * | string | Node ID in colon format e.g. '4029:12345' |
mode | string | |
opacity | number |
set_strokes
Set the stroke color and weight on a single node (takes one nodeId, not an array). Use mode='append' to stack a new stroke on top of existing strokes instead of replacing them.
| Parameter | Type | Description |
|---|---|---|
color * | string | Stroke color as hex e.g. #000000 |
nodeId * | string | Node ID in colon format e.g. '4029:12345' |
mode | string | |
strokeWeight | number |
move_nodes
Move one or more nodes to an absolute canvas position. The same x/y is applied to every node independently (not a relative offset from current position).
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
x | number | |
y | number |
resize_nodes
Resize one or more nodes. The same width/height is applied to every node in the list independently. Provide width, height, or both.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
height | number | |
width | number |
rename_node
Rename a single node by ID. Returns the updated node with its new name. Use batch_rename_nodes to rename multiple nodes at once or to apply find/replace patterns across many nodes.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
nodeId * | string | Node ID in colon format e.g. '4029:12345' |
clone_node
Clone an existing node, optionally repositioning it or placing it in a new parent.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Source node ID in colon format e.g. '4029:12345' |
parentId | string | |
x | number | |
y | number |
set_opacity
Set the opacity of one or more nodes (0 = fully transparent, 1 = fully opaque).
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
opacity * | number | Opacity value between 0 and 1 |
set_corner_radius
Set corner radius on one or more nodes. Provide a uniform cornerRadius or individual per-corner values.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
bottomLeftRadius | number | |
bottomRightRadius | number | |
cornerRadius | number | |
topLeftRadius | number | |
topRightRadius | number |
set_auto_layout
Set or update auto-layout (flex) properties on an existing frame.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Frame node ID in colon format e.g. '4029:12345' |
counterAxisAlignItems | string | |
counterAxisSizingMode | string | |
counterAxisSpacing | number | |
itemSpacing | number | |
layoutMode | string | |
layoutWrap | string | |
paddingBottom | number | |
paddingLeft | number | |
paddingRight | number | |
paddingTop | number | |
primaryAxisAlignItems | string | |
primaryAxisSizingMode | string |
delete_nodes
Delete one or more nodes. This cannot be undone via MCP — use with care.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Node IDs in colon format e.g. ['4029:12345'] |
set_visible
Show or hide one or more nodes by setting their visibility.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
visible * | boolean |
lock_nodes
Lock one or more nodes to prevent accidental edits in Figma.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Node IDs in colon format e.g. ['4029:12345'] |
unlock_nodes
Unlock one or more nodes, allowing them to be edited again.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Node IDs in colon format e.g. ['4029:12345'] |
rotate_nodes
Rotate one or more nodes to an absolute angle in degrees.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
rotation * | number |
reorder_nodes
Change the z-order (layer stack position) of one or more nodes.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
order * | string | bringToFront | sendToBack | bringForward | sendBackward |
set_blend_mode
Set the blend mode of one or more nodes (e.g. MULTIPLY, SCREEN, OVERLAY).
| Parameter | Type | Description |
|---|---|---|
blendMode * | string | |
nodeIds * | array |
set_constraints
Set layout constraints (pinning behaviour) on one or more nodes relative to their parent.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
horizontal | string | |
vertical | string |
reparent_nodes
Move one or more nodes to a different parent frame, group, or section.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
parentId * | string |
batch_rename_nodes
Rename multiple nodes using find/replace, regex substitution, or prefix/suffix addition.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
find | string | |
prefix | string | |
regexFlags | string | |
replace | string | |
suffix | string | |
useRegex | boolean |
find_replace_text
Find and replace text content across all TEXT nodes in a subtree. Searches the entire current page if no nodeId is given.
| Parameter | Type | Description |
|---|---|---|
find * | string | |
replace * | string | |
nodeId | string | |
regexFlags | string | |
useRegex | boolean |
create_paint_style
Create a new local paint style with a solid fill color.
| Parameter | Type | Description |
|---|---|---|
color * | string | |
name * | string | |
description | string |
create_text_style
Create a new local text style (typography preset). Returns the new style's ID. Apply it to nodes with apply_style_to_node. Use get_styles to list existing text styles.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
description | string | |
fontFamily | string | |
fontSize | number | |
fontStyle | string | |
letterSpacingUnit | string | |
letterSpacingValue | number | |
lineHeightUnit | string | |
lineHeightValue | number | |
textDecoration | string |
create_effect_style
Create a new local effect style (drop shadow, inner shadow, or blur).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
color | string | |
description | string | |
offsetX | number | |
offsetY | number | |
opacity | number | |
radius | number | |
spread | number | |
type | string |
create_grid_style
Create a new local layout grid style.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
alignment | string | |
color | string | |
count | number | |
description | string | |
gutterSize | number | |
offset | number | |
opacity | number | |
pattern | string | |
sectionSize | number |
update_paint_style
Update an existing paint style's name, color, or description. Only paint styles support in-place updates — to modify text, effect, or grid styles, use delete_style and recreate them.
| Parameter | Type | Description |
|---|---|---|
styleId * | string | |
color | string | |
description | string | |
name | string |
delete_style
Delete a style (paint, text, effect, or grid) by its ID.
| Parameter | Type | Description |
|---|---|---|
styleId * | string |
apply_style_to_node
Apply an existing local style (paint, text, effect, or grid) to a node, linking the node to that style.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Target node ID in colon format e.g. '4029:12345' |
styleId * | string | |
target | string |
set_effects
Apply one or more effects (drop shadow, inner shadow, layer blur, background blur, or noise) directly to a node. Replaces all existing effects. Pass an empty array to clear all effects. NOISE accepts noiseType (MONOTONE/DUOTONE/MULTITONE), noiseSize, density, color, plus secondaryColor for DUOTONE or opacity for MULTITONE — NoiseEffect is marked beta by Figma and may change.
| Parameter | Type | Description |
|---|---|---|
effects * | array | |
nodeId * | string | Target node ID in colon format e.g. '4029:12345' |
bind_variable_to_node
Bind a local variable to a node property so the property is driven by the variable's value. COLOR variables: use fillColor or strokeColor. BOOLEAN variables: use visible. FLOAT variables: use opacity, rotation, width, height, cornerRadius, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius, strokeWeight, itemSpacing, paddingTop, paddingRight, paddingBottom, paddingLeft.
| Parameter | Type | Description |
|---|---|---|
field * | string | |
nodeId * | string | Target node ID in colon format e.g. '4029:12345' |
variableId * | string |
create_variable_collection
Create a new local variable collection with an optional initial mode name. NOTE — Figma free plan limits each collection to 1 mode. If you need Light/Dark (or any multi-mode) theming and the user is on the free plan, do NOT try to call add_variable_mode; instead use the name-prefix workaround: create all variables in a single collection and prefix each variable name with its mode, e.g. 'light/color-bg' and 'dark/color-bg'. Inform the user of this limitation.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
initialModeName | string |
add_variable_mode
Add a new mode to an existing variable collection (e.g. Light/Dark, Desktop/Mobile). IMPORTANT — Figma free plan only allows 1 mode per collection; calling this tool on a free-plan account will return the error 'Limited to 1 modes only'. If that error occurs, stop retrying and switch to the name-prefix workaround: keep the single default mode and create variables prefixed by mode, e.g. 'light/color-bg' and 'dark/color-bg' in the same collection. Tell the user that native multi-mode variables require a paid Figma plan (Professional or above).
| Parameter | Type | Description |
|---|---|---|
collectionId * | string | |
modeName * | string |
create_variable
Create a new variable (design token) inside an existing collection. Returns the new variable's ID. Use get_variable_defs to find collection IDs, set_variable_value to set values per mode, and bind_variable_to_node to apply the variable to a node property.
| Parameter | Type | Description |
|---|---|---|
collectionId * | string | |
name * | string | |
type * | string | COLOR | FLOAT | STRING | BOOLEAN |
value | string |
set_variable_value
Set a variable's value for a specific mode.
| Parameter | Type | Description |
|---|---|---|
modeId * | string | |
value * | string | |
variableId * | string |
delete_variable
Delete a single variable (provide variableId) or an entire collection and all its variables (provide collectionId). Provide exactly one of the two — not both.
| Parameter | Type | Description |
|---|---|---|
collectionId | string | |
variableId | string |
add_page
Add a new page to the Figma document.
| Parameter | Type | Description |
|---|---|---|
index | number | |
name | string |
delete_page
Delete a page from the Figma document. Cannot delete the only remaining page.
| Parameter | Type | Description |
|---|---|---|
pageId | string | |
pageName | string |
rename_page
Rename an existing page in the Figma document.
| Parameter | Type | Description |
|---|---|---|
newName * | string | |
pageId | string | |
pageName | string |
group_nodes
Group two or more nodes into a GROUP. All nodes must share the same parent.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | |
name | string |
ungroup_nodes
Ungroup one or more GROUP nodes, moving their children to the parent and removing the group.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Node IDs in colon format e.g. ['4029:12345'] |
swap_component
Swap the main component of an existing INSTANCE node, replacing it with a different component while keeping position and size.
| Parameter | Type | Description |
|---|---|---|
componentId * | string | |
nodeId * | string | INSTANCE node ID in colon format e.g. '4029:12345' |
detach_instance
Detach one or more component instances, converting them to plain frames. The link to the main component is broken; all visual properties are preserved.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Node IDs in colon format e.g. ['4029:12345'] |
set_reactions
Set prototype reactions on a node. Use mode "replace" (default) to overwrite all reactions, or "append" to add to existing ones. Supported triggers: ON_CLICK, ON_HOVER, ON_PRESS, ON_DRAG, AFTER_TIMEOUT, MOUSE_ENTER, MOUSE_LEAVE, MOUSE_UP, MOUSE_DOWN Supported action types: NODE (navigation), BACK, CLOSE, URL NODE navigation values: NAVIGATE, OVERLAY, SCROLL_TO, SWAP, CHANGE_TO Transition types: DISSOLVE, SMART_ANIMATE, MOVE_IN, MOVE_OUT, PUSH, SLIDE_IN, SLIDE_OUT
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Node ID in colon format e.g. '4029:12345' |
reactions * | array | |
mode | string | 'replace' (default) or 'append' |
remove_reactions
Remove prototype reactions from a node. Omit indices to remove all reactions. Provide a zero-based indices array to remove specific reactions (use get_reactions first to see current indices).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Node ID in colon format e.g. '4029:12345' |
indices | array |