figsnap-mcp
v0.2.0The Figma file you have open, as MCP tools.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
figma_get_selection What is selected
The layers the designer has selected on the canvas right now, with their ids, names, types and sizes. Start here when the request says "this", "the selected frame", or names nothing at all.
figma_get_tree Layers on the current page
The top-level layers of the page the designer is looking at. Increase depth to walk further down, but note that a deep page is thousands of rows: prefer figma_get_children on one branch.
| Parameter | Type | Description |
|---|---|---|
depth | integer | How many levels to walk. Default 1. |
figma_get_children Children of one layer
The direct children of one node, by id. The cheap way to explore a page a branch at a time.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node whose children to list. |
depth | integer | How many levels to walk. Default 1. |
figma_extract Read a design as code
The full extraction of one node: HTML measured against what Figma draws, byte-exact figmaCss, a React component, plain CSS and CSS modules. Images are inlined and icons come out as real SVG, so the HTML stands on its own. This is the tool that answers "what does this design actually say". Several nodes at once, instead of one call each: nodeIds, urls, selection: true, or saved: true with an optional folder. A batch answers {results:[…]}, one entry per input, each {ok:true,extraction} or {ok:false,error}, so one bad id never sinks the rest. It is capped at 20 entries, and no batch returns an…
| Parameter | Type | Description |
|---|---|---|
folder | string | One folder of the saved set, with saved: true. "" is the root. This is a folder in the panel, not a directory on disk — nothing here writes files; ask for pngData and write the bytes yourself. |
formats | array | Which representations to return. Default html and figmaCss. "png" comes back as a real image you can look at, alongside the text — there is no base64 in the answer, so ask for it freely on a single… |
inlineInstances | boolean | Expand component instances instead of referencing them. |
nodeId | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
nodeIds | array | Several node ids, extracted in one call. Up to 20. |
saved | boolean | Extract the designer’s saved set. Narrow it with folder. |
scale | number | Render scale for any image output. Default 2. |
selection | boolean | Extract every layer the designer has selected, not just the first. |
topLayerOnly | boolean | Stop at the selected layer rather than walking into it. |
url | string | A Figma link, as an alternative to nodeId. |
urls | array | Several Figma links, extracted in one call. Up to 20. |
figma_export_png See the design
Renders one node and returns the picture itself, so a model that can see gets to look at the design rather than read a description of it. Nothing is stored anywhere.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node to render. |
scale | number | Render scale. Default 2. |
figma_resolve_url What a Figma link points at
Turns one or more Figma links into the nodes they name, without exporting anything.
| Parameter | Type | Description |
|---|---|---|
urls * | array | Figma links to resolve. |
figma_list_saved The designer’s saved set
The nodes the designer curated in the panel, by folder. A shortlist of what matters in this file, which is usually a better starting point than the whole page.
| Parameter | Type | Description |
|---|---|---|
folder | string | Restrict to one folder. |
figma_saved Curate the saved set
Read and change the designer’s shortlist of nodes in this file, and the folders it is grouped into. One action argument: list, folders, save, unsave, clear, move, newFolder, renameFolder, deleteFolder. list — the entries, optionally in one folder. folders — the folders with their counts; "" is the root. save — add nodeIds, or whatever is selected when you give none. unsave — remove nodeIds. clear — empty one folder, or the whole set when you name none. move — put nodeIds in folder. newFolder / renameFolder / deleteFolder — the folders themselves; deleteFolder keeps the entries…
| Parameter | Type | Description |
|---|---|---|
action * | string | Which of the nine. |
deleteEntries | boolean | For deleteFolder: remove what was in it too, rather than returning it to the root. |
folder | string | For list, save, clear and move. "" is the root; the folder must already exist for move. |
from | string | For renameFolder: the folder as it is called now. |
name | string | For newFolder and deleteFolder. |
nodeIds | array | For save, unsave and move. Omitting them on save means the current selection. |
to | string | For renameFolder: what to call it instead. |
figma_list_library The design system in this file
The components, styles and variables this file has, with the ids the other tools need. Read this before "make it match our button" or "use our brand colour" — instantiating the real component or binding the real variable is what makes a change survive contact with the design system, rather than a hex code that looks right today.
| Parameter | Type | Description |
|---|---|---|
only | string | Narrow the answer. Default all three. |
figma_select Show it on the canvas
Selects one or more layers and scrolls the canvas to them, so the designer is looking at whatever you are talking about. Use it before describing a node you found by walking the tree — pointing is faster than naming an id — and after an edit, so the change is on screen. It changes no design data, which is why it works whether or not Edits is on, and why it leaves no undo step. It does move the designer’s viewport, so say what you are showing them.
| Parameter | Type | Description |
|---|---|---|
nodeId | string | One node to select and scroll to. |
nodeIds | array | Several, selected together and framed together. Up to 20. |
figma_set_fill Set a solid fill
Replaces a node’s fills with one solid colour, and answers with the colour read back off the node — so a write that did not land is visible without a screenshot. It replaces every fill the node had, which is worth knowing before pointing it at a gradient or a photograph; the answer names what was there. Borders are strokes, not fills: use figma_set_stroke for those. One call is one undo step, so the designer takes it back with a single Cmd-Z.
| Parameter | Type | Description |
|---|---|---|
color * | string | Hex colour, like "#1e88e5". |
nodeId * | string | The node to fill. |
opacity | number | Fill opacity, 0 to 1. Default 1. |
figma_set_stroke Set or clear a stroke
Replaces a node’s strokes with one solid colour, and optionally sets the stroke weight. Pass remove: true to take the stroke off entirely. Borders in Figma are strokes, not fills — a row outline or an icon drawn as an outline needs this rather than figma_set_fill.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node to stroke. |
color | string | Hex colour, like "#1e88e5". Omit only with remove. |
opacity | number | Stroke opacity, 0 to 1. Default 1. |
remove | boolean | Remove every stroke instead of setting one. |
weight | number | Stroke weight in pixels. Left alone when omitted. |
figma_set_text Set the characters of a text layer
Replaces the text of one TEXT node. The font is loaded first; a layer whose font is missing from this machine is refused rather than silently retyped in a substitute.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The TEXT node to retype. |
text * | string | The new characters. |
figma_set_auto_layout Set auto layout on a frame
Turns auto layout on for a frame and sets its direction, spacing, padding and alignment. Pass mode "NONE" to turn it off. Only the properties you name are changed.
| Parameter | Type | Description |
|---|---|---|
mode * | string | Layout direction. |
nodeId * | string | The frame, component or instance to lay out. |
counterAxisAlignItems | string | Alignment across the layout direction. |
itemSpacing | number | Gap between children. |
padding | number | Shorthand: sets all four paddings. |
paddingBottom | number | |
paddingLeft | number | |
paddingRight | number | |
paddingTop | number | |
primaryAxisAlignItems | string | Alignment along the layout direction. |
figma_create_frame Create a frame
Creates an empty frame, on the current page or inside a parent you name. Returns the new node’s id so the next call can fill it.
| Parameter | Type | Description |
|---|---|---|
fill | string | Hex colour for a solid background. Omit to keep Figma’s default white. |
height | number | Default 100. |
name | string | Layer name. Default "Frame". |
parentId | string | Put it inside this node. Default: the current page. |
width | number | Default 100. |
x | number | |
y | number |
figma_create_text Add a text layer
Creates a TEXT layer with the words you give it. The font is loaded before anything is typed, and a font this machine does not have is refused rather than substituted. Give a width to make it wrap; without one it hugs its text.
| Parameter | Type | Description |
|---|---|---|
text * | string | The characters. |
color | string | Hex colour for the text. |
fontFamily | string | Default Inter. |
fontSize | number | |
fontStyle | string | Weight or style, like "Bold". Default Regular. |
name | string | Layer name. Defaults to the text itself. |
parentId | string | Put it inside this node. Default: the current page. |
width | number | Fixed width, so the text wraps. |
x | number | |
y | number |
figma_create_rectangle Add a rectangle
Creates a rectangle. The workhorse shape: dividers, bars, backgrounds, placeholders. Omit the fill for an empty one.
| Parameter | Type | Description |
|---|---|---|
cornerRadius | number | |
fill | string | Hex colour. Omit for no fill. |
height | number | Default 100. |
name | string | |
parentId | string | Put it inside this node. Default: the current page. |
width | number | Default 100. |
x | number | |
y | number |
figma_create_ellipse Add an ellipse
Creates an ellipse. Equal width and height give a circle — an avatar, a dot, a radio button.
| Parameter | Type | Description |
|---|---|---|
fill | string | Hex colour. Omit for no fill. |
height | number | Default 100. |
name | string | |
parentId | string | |
width | number | Default 100. |
x | number | |
y | number |
figma_create_svg Draw with SVG
Turns SVG markup into real Figma vectors — not an image, but editable paths in a frame. This is how to add an icon, a logo or any shape the other create tools cannot express. Extraction returns icons as SVG too, so a shape can be read out of one place and drawn into another unchanged.
| Parameter | Type | Description |
|---|---|---|
svg * | string | The <svg> markup. |
height | number | |
name | string | |
parentId | string | |
width | number | Scale it to this width. |
x | number | |
y | number |
figma_create_instance Place a component
Creates an instance of a component in this file. Get the id from figma_list_library. Naming a variant set places its default variant. Prefer this over drawing a lookalike: an instance keeps its link to the component and updates with it.
| Parameter | Type | Description |
|---|---|---|
componentId * | string | From figma_list_library. |
name | string | |
parentId | string | |
x | number | |
y | number |
figma_clone_node Duplicate a layer
Copies a node, with everything inside it, into the same parent or one you name. The cheapest way to make a second row, card or list item that matches the first exactly.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node to copy. |
parentId | string | Where the copy goes. Default: beside the original. |
x | number | |
y | number |
figma_move_node Reparent or reorder a layer
Moves a node into another parent, or to a different position among its siblings. Index 0 is the back of the canvas and the top of a layer list; leaving it out puts the node last.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node to move. |
index | integer | Position among siblings. |
parentId | string | New parent. Default: keep the one it has. |
figma_delete_node Delete a layer
Removes a node and everything inside it. One undo step, so the designer can take it back with a single Cmd-Z — but say what you are deleting before you do it.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node to delete. |
figma_set_bounds Move or resize
Sets position and size. Position is ignored inside an auto-layout frame, where the parent decides it — use figma_set_layout_sizing and the parent’s spacing there instead.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
height | number | |
width | number | |
x | number | |
y | number |
figma_set_corner_radius Round the corners
Sets one radius for every corner, or each corner on its own.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
bottomLeftRadius | number | |
bottomRightRadius | number | |
radius | number | All four corners. |
topLeftRadius | number | |
topRightRadius | number |
figma_set_node_name Rename a layer
Renames a layer. Layer names are what the generated code turns into class names, so tidying them is a real change and not cosmetic.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
figma_set_visibility Hide, lock or fade a layer
Sets opacity, visibility and lock. Hidden layers are skipped by extraction, which is often the point.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
locked | boolean | |
opacity | number | |
visible | boolean |
figma_set_effects Set shadows and blurs
Replaces a node’s effects with the list you give. An empty list clears them. Elevation in most design systems is a drop shadow, so this is what "make it look raised" means.
| Parameter | Type | Description |
|---|---|---|
effects * | array | In back-to-front order. Empty clears every effect. |
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
figma_set_text_style Set type on a text layer
Font, size, line height, letter spacing, alignment and colour, on a TEXT layer. Only what you name is changed. Prefer figma_apply_style where the file has a text style for it — a named style survives a redesign and a hard-coded 14px does not.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
align | string | |
autoResize | string | |
color | string | Hex colour. |
fontFamily | string | |
fontSize | number | |
fontStyle | string | Weight or style, like "Semi Bold". |
letterSpacing | number | In pixels. |
lineHeight | number | In pixels. |
figma_set_layout_sizing Hug, fill or fix a size
How a child behaves inside an auto-layout frame: HUG shrinks to its contents, FILL stretches to the parent, FIXED keeps its size. This, not figma_set_bounds, is how widths are set inside auto layout.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
horizontal | string | |
vertical | string |
figma_apply_style Apply a shared style
Applies a paint, text or effect style from this file by id, from figma_list_library. The right way to make something "match": the layer follows the style afterwards, where a copied hex code does not.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
styleId * | string | From figma_list_library. |
figma_bind_variable Bind a variable
Binds a variable from this file to a property, so the value follows the token rather than being a copy of it. Use "fill" or "stroke" for a colour variable; for a number use the property name, like cornerRadius, itemSpacing, paddingLeft, width or opacity.
| Parameter | Type | Description |
|---|---|---|
field * | string | "fill", "stroke", or a numeric property such as cornerRadius or itemSpacing. |
nodeId * | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
variableId * | string | From figma_list_library. |
figma_save_version Checkpoint the file
Saves a named point in the file’s version history. Call this before a run that will change several things, so there is one place to fall back to that is not a stack of undos.
| Parameter | Type | Description |
|---|---|---|
title * | string | What this checkpoint is for. |
description | string |
figma_find_nodes Find layers
Finds layers by type, by name and by the words in them. Every filter is optional and they narrow together. This is the cheap way to locate something. Walking with figma_get_tree and figma_get_children costs a round trip per level and returns every sibling; asking here for {types:["INSTANCE"], name:"button"} costs one call. Searches the current page unless you pass nodeId to search inside one branch, or allPages to search the whole file — which is the only way to find something that is not on the page the designer happens to have open.
| Parameter | Type | Description |
|---|---|---|
allPages | boolean | Search every page in the file. Slower, and the answer names the page each row is on. |
limit | integer | Most rows to return. Default 50. |
name | string | Substring of the layer name, case-insensitive. |
nodeId | string | Search inside this branch instead of the whole page. |
text | string | Substring of a text layer’s words, case-insensitive. Implies TEXT. |
types | array | Layer types to keep. Omit for any type. |
figma_pages The pages, and which one is open
list — every page in the file, and which is current. open — switch to one, by pageId or by name. Worth calling before concluding something is missing: every other reading tool answers about the current page only, so a frame on another page looks exactly like a frame that does not exist. Opening a page moves the designer’s view, which is the same kind of act as figma_select — nothing in the file changes and there is nothing to undo, so it is not behind the Edits switch.
| Parameter | Type | Description |
|---|---|---|
action * | string | Which of the two. |
name | string | For open: the page name, if you have no id. |
pageId | string | For open: the page id from list. |
figma_component_properties What a component exposes
The properties a component, component set or instance has: the variants, and the text, boolean and instance-swap properties, with what this instance currently has them set to. Call this before figma_set_instance_properties. The key that setter needs carries an id suffix for everything but a variant — "Label#8:2", not "Label" — and there is no way to guess it.
| Parameter | Type | Description |
|---|---|---|
nodeId | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
figma_group Group or ungroup
group — puts nodeIds in a new group, inside the first one’s own parent. ungroup — dissolves a group or frame and returns the children it let go. A group is the honest answer when several layers are one thing but need no layout of their own; reach for figma_create_frame with auto layout when they do.
| Parameter | Type | Description |
|---|---|---|
action | string | Default group. |
name | string | For group: what to call it. |
nodeId | string | For ungroup: the group or frame to dissolve. |
nodeIds | array | For group: the layers to gather, up to 20. |
figma_insert_image Put an image on the canvas
Places a PNG, JPG or GIF, passed as base64. With nodeId it becomes that layer’s fill, which is how a placeholder gets its picture; without one it arrives as a new rectangle at its own pixel size. Base64 rather than a URL on purpose: the plugin’s manifest allows only the relay and the local daemon as network destinations, so the plugin cannot fetch an image from anywhere a designer keeps one. Read the file yourself and send the bytes. The cap is 700KB of base64, which is roughly a 500KB image.
| Parameter | Type | Description |
|---|---|---|
data * | string | The image as base64. A data: URL prefix is accepted and ignored. |
height | number | Default: the image’s own height. |
name | string | |
nodeId | string | Fill this layer instead of making a new one. |
parentId | string | Where a new rectangle goes. Default: the current page. |
scaleMode | string | How it sits in the frame. Default FILL. |
width | number | Default: the image’s own width. |
x | number | |
y | number |
figma_set_instance_properties Set an instance’s properties
Sets which variant an instance is, and the text and booleans its component exposes. Take the keys from figma_component_properties; a key given without its id suffix is matched anyway, and one that matches nothing is refused with the list of what does. This is the difference between placing a component and using it. figma_create_instance gives you the default variant — this is how it becomes the large one, or the disabled one, with the right label.
| Parameter | Type | Description |
|---|---|---|
properties * | object | Key to value. A variant takes its option name, a boolean property true or false, a text property a string. |
nodeId | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
figma_ios_spec The design as node properties
One node and its children as the properties Figma actually holds, in points: per-axis sizing, auto layout with its padding, stroke weight and alignment, corner smoothing, effects, the whole text block, and every fill and stroke marked with whether it is painted. Read this rather than figmaCss when the answer becomes code. Dev Mode CSS answers what a node would look like on the web, which drops what an implementation needs — which side of the bounds a stroke sits on, whether a height was authored or measured, whether the corners are smoothed — and it also reports paint that is never painte…
| Parameter | Type | Description |
|---|---|---|
nodeId | string | Figma node id, like "21:10314". Omit to use whatever is selected on the canvas. |
scale | number | The scale the artboard was drawn at. Default: inferred from the root width against the widths a phone actually has, and the answer says which it used. |
figsnap_skill The skill for reading a design
Whether this project has the figsnap skill installed, and the skill itself when it does not. The skill is what stops the usual mistakes: an agent handed figmaCss gets the geometry right and the type wrong, because Dev Mode CSS cannot say whether a height was authored or measured, which side of the bounds a stroke sits on, or that line-height is a box rather than a font metric. It also carries the artboard-to-device widths, the frame-versus-glyph padding an icon export has to keep, and the fact that a design system’s font is probably not on iOS. install answers with the file and where it go…
| Parameter | Type | Description |
|---|---|---|
action | string | Default check. |
projectDir | string | The project to look in. Default: the directory the MCP client is running in, which the bridge names on every call. Failing that, the daemon’s own — which is wherever it was started and usually not… |