Skip to main content
Glama
figma-mcp
by ivn4k

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FIGMA_MCP_PORTNoPort for the MCP server. Defaults to 3055. Can also be set with the --port server argument.3055

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Tools for reading and editing the Figma file that is open in Figma desktop with the "Figma MCP Bridge" plugin running.

  • Start with get_document (pages, selection, top-level frames) or get_selection. Explore big trees with detail:"outline", then fetch details for specific ids.

  • Colors are hex strings ("#RRGGBB" or "#RRGGBBAA"). Node ids look like "12:34".

  • create_nodes builds whole trees (auto layout, text, images, SVG, instances) in one call; update_nodes changes properties; execute_code runs arbitrary Plugin API JavaScript for anything else.

  • After visual changes, verify with export_image. Each tool call is a separate undo step in Figma.

  • If a call says the plugin is not connected, ask the user to run the plugin in Figma (Plugins → Development → Figma MCP Bridge).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_statusA

Shows whether the Figma plugin is connected, which Figma files are connected and which one is active (receives commands).

select_fileA

When the plugin runs in several Figma files, choose which file receives commands (by connectionId from get_status or by file name substring).

get_documentA

File name, pages, current page, current selection and the top-level nodes of the current page. Good first call.

get_selectionB

Nodes currently selected by the user in Figma, with their subtree up to depth.

get_nodesA

Read nodes (frames, layers, pages; "0:0" = document) by id with their subtree up to depth. Output is capped by maxNodes (see "truncated").

find_nodesA

Search layers by name, type and/or text content. Returns id, name, type, parent, bounds (and text for TEXT nodes).

get_stylesA

Local paint, text, effect and grid styles of the file (id, name, key and values).

get_variablesB

Local variable collections (modes) and variables with values per mode. Colors are hex; aliases are {alias: id, name}.

get_componentsA

Components and component sets (with variants and property definitions) defined in this file. Use their id with create_nodes type INSTANCE.

export_imageA

Render a node (frame, layer, component; default: first selected node) to PNG/JPG and return it as an image, or export SVG markup / PDF. Use it to look at designs and verify edits.

create_nodesA

Create one or more node trees in one call (one undo step). Returns the new ids. NODE SPEC: {type, ...PROPS, children?: [NODE SPEC]}. type: FRAME (default) | RECTANGLE | ELLIPSE | LINE | POLYGON | STAR | TEXT | COMPONENT | SECTION | GROUP (needs children) | SVG (svg: "<svg…>" or svgPath) | IMAGE (rectangle with an image fill: imagePath | imageUrl | imageBase64, scaleMode; natural size when width/height omitted) | INSTANCE (componentId of a COMPONENT/COMPONENT_SET, or componentKey of a library component) | PAGE (top level only). Nested frames get no fill unless fills are given (top-level frames: white). Auto-layout frames hug their content on axes without width/height; plain frames without size grow to fit their children. TEXT: width without height → fixed width, wrapping. Top-level nodes without x/y are placed to the right of existing content. Example: {"type":"FRAME","name":"Card","layoutMode":"VERTICAL","padding":24,"itemSpacing":12,"cornerRadius":16,"fills":["#FFFFFF"],"effects":[{"type":"DROP_SHADOW","color":"#0000001A","offset":{"x":0,"y":4},"radius":16}],"children":[{"type":"TEXT","characters":"Title","fontFamily":"Inter","fontWeight":700,"fontSize":24},{"type":"TEXT","characters":"Body","fontSize":14,"fills":["#666666"],"layoutSizingHorizontal":"FILL"}]}

PROPS (all optional):

  • Geometry: name, x, y, width, height, rotation, opacity, visible, locked, constraints, blendMode.

  • fills / strokes: array of "#RRGGBB" | "#RRGGBBAA" | "rgba(r,g,b,a)" | {type:"SOLID", color, opacity?, variable?} | {type:"GRADIENT_LINEAR"|"GRADIENT_RADIAL"|"GRADIENT_ANGULAR"|"GRADIENT_DIAMOND", stops:[{color, position}] or ["#hex", ...], angle? (linear only, degrees: 0 = left→right, 90 = top→bottom)} | {type:"IMAGE", imagePath (local file) | imageUrl | imageBase64, scaleMode?: "FILL"|"FIT"|"CROP"|"TILE"}. [] removes all. Shorthand: fill / stroke = single paint.

  • strokeWeight, strokeAlign ("INSIDE"|"OUTSIDE"|"CENTER"), dashPattern, cornerRadius (number or [tl,tr,br,bl]).

  • effects: [{type:"DROP_SHADOW"|"INNER_SHADOW", color, offset:{x,y}, radius, spread?} | {type:"LAYER_BLUR"|"BACKGROUND_BLUR", radius}].

  • Auto layout (FRAME/COMPONENT): layoutMode ("HORIZONTAL"|"VERTICAL"|"GRID"|"NONE"), itemSpacing, padding (number | [vertical, horizontal] | [top,right,bottom,left] | {top,right,bottom,left}), primaryAxisAlignItems ("MIN"|"CENTER"|"MAX"|"SPACE_BETWEEN"), counterAxisAlignItems ("MIN"|"CENTER"|"MAX"|"BASELINE"), layoutWrap ("WRAP"|"NO_WRAP"), counterAxisSpacing, clipsContent.

  • Inside an auto-layout parent: layoutSizingHorizontal / layoutSizingVertical ("FIXED"|"HUG"|"FILL"), layoutPositioning ("ABSOLUTE"), layoutGrow.

  • TEXT: characters, fontFamily, fontStyle ("Bold", "Medium Italic"…), fontWeight (100-900), fontSize, lineHeight (px | "150%" | "auto"), letterSpacing (px | "2%"), textAlignHorizontal ("LEFT"|"CENTER"|"RIGHT"|"JUSTIFIED"), textAlignVertical, textAutoResize ("WIDTH_AND_HEIGHT"|"HEIGHT"|"NONE"|"TRUNCATE"), textCase, textDecoration, paragraphSpacing, hyperlink (url). Fonts are loaded automatically. Partial styling: rangeStyles [{text: "substring" | start, end, fontFamily?, fontStyle?, fontWeight?, fontSize?, fills?, textDecoration?, textCase?, letterSpacing?, lineHeight?, hyperlink?, textStyleId?, fillStyleId?}] (applied after characters).

  • Styles: fillStyleId / strokeStyleId / effectStyleId / textStyleId / gridStyleId — style id or exact local style name.

  • Variables: boundVariables {field: variableId | variable name | null}, fields e.g. fills, strokes, width, height, itemSpacing, paddingLeft, cornerRadius, opacity, characters.

  • INSTANCE: componentProperties {propName: value} (names without the #id suffix are fine), swapComponentId.

  • Any other writable Plugin API property is assigned as-is; problems are reported in "warnings" instead of failing the whole call.

update_nodesA

Change properties of existing nodes (one undo step). Also move nodes: props.parentId (+ optional props.index) re-parents. PROPS (all optional):

  • Geometry: name, x, y, width, height, rotation, opacity, visible, locked, constraints, blendMode.

  • fills / strokes: array of "#RRGGBB" | "#RRGGBBAA" | "rgba(r,g,b,a)" | {type:"SOLID", color, opacity?, variable?} | {type:"GRADIENT_LINEAR"|"GRADIENT_RADIAL"|"GRADIENT_ANGULAR"|"GRADIENT_DIAMOND", stops:[{color, position}] or ["#hex", ...], angle? (linear only, degrees: 0 = left→right, 90 = top→bottom)} | {type:"IMAGE", imagePath (local file) | imageUrl | imageBase64, scaleMode?: "FILL"|"FIT"|"CROP"|"TILE"}. [] removes all. Shorthand: fill / stroke = single paint.

  • strokeWeight, strokeAlign ("INSIDE"|"OUTSIDE"|"CENTER"), dashPattern, cornerRadius (number or [tl,tr,br,bl]).

  • effects: [{type:"DROP_SHADOW"|"INNER_SHADOW", color, offset:{x,y}, radius, spread?} | {type:"LAYER_BLUR"|"BACKGROUND_BLUR", radius}].

  • Auto layout (FRAME/COMPONENT): layoutMode ("HORIZONTAL"|"VERTICAL"|"GRID"|"NONE"), itemSpacing, padding (number | [vertical, horizontal] | [top,right,bottom,left] | {top,right,bottom,left}), primaryAxisAlignItems ("MIN"|"CENTER"|"MAX"|"SPACE_BETWEEN"), counterAxisAlignItems ("MIN"|"CENTER"|"MAX"|"BASELINE"), layoutWrap ("WRAP"|"NO_WRAP"), counterAxisSpacing, clipsContent.

  • Inside an auto-layout parent: layoutSizingHorizontal / layoutSizingVertical ("FIXED"|"HUG"|"FILL"), layoutPositioning ("ABSOLUTE"), layoutGrow.

  • TEXT: characters, fontFamily, fontStyle ("Bold", "Medium Italic"…), fontWeight (100-900), fontSize, lineHeight (px | "150%" | "auto"), letterSpacing (px | "2%"), textAlignHorizontal ("LEFT"|"CENTER"|"RIGHT"|"JUSTIFIED"), textAlignVertical, textAutoResize ("WIDTH_AND_HEIGHT"|"HEIGHT"|"NONE"|"TRUNCATE"), textCase, textDecoration, paragraphSpacing, hyperlink (url). Fonts are loaded automatically. Partial styling: rangeStyles [{text: "substring" | start, end, fontFamily?, fontStyle?, fontWeight?, fontSize?, fills?, textDecoration?, textCase?, letterSpacing?, lineHeight?, hyperlink?, textStyleId?, fillStyleId?}] (applied after characters).

  • Styles: fillStyleId / strokeStyleId / effectStyleId / textStyleId / gridStyleId — style id or exact local style name.

  • Variables: boundVariables {field: variableId | variable name | null}, fields e.g. fills, strokes, width, height, itemSpacing, paddingLeft, cornerRadius, opacity, characters.

  • INSTANCE: componentProperties {propName: value} (names without the #id suffix are fine), swapComponentId.

  • Any other writable Plugin API property is assigned as-is; problems are reported in "warnings" instead of failing the whole call.

delete_nodesA

Delete nodes by id (one undo step; the user can press Ctrl+Z in Figma).

clone_nodesC

Duplicate nodes. Without parentId the copy stays next to the original; top-level copies on a page are shifted right by default.

restructure_nodesA

Structural operations on nodes: group, ungroup, wrap_in_frame (frame around nodes, keeps positions; pass props such as layoutMode/padding), to_component (each node becomes a component), combine_as_variants (components → component set), create_instance (instance of a component placed next to it), flatten, union, subtract, intersect, exclude, detach_instance. Optional name/props are applied to the resulting node.

set_selectionB

Select nodes in Figma (switches page when needed) and zoom the viewport to them. A page id just switches to that page. Empty ids clears the selection.

execute_codeA

Run JavaScript inside the Figma plugin (body of an async function; use await and return a value). Full Figma Plugin API via figma (document uses dynamic page loading: use figma.getNodeByIdAsync, await page.loadAsync() before reading other pages, await figma.loadFontAsync(font) before editing text). Helpers in scope: getNode(id) (throws if missing), setProps(node, props) (same PROPS as update_nodes), serialize(node, depth=1, "full"|"outline"), parseColor("#hex") → {r,g,b,a}, loadFonts(textNode), log(...args). The returned value is JSON-serialized (nodes become {id,name,type}); log() output is returned too. One undo step. Use it for anything the other tools do not cover: styles, variables, components, prototyping, plugin data, bulk edits.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 17 tools

Disambiguation4/5

Most tools have distinct resource/action boundaries: dedicated getters for nodes, styles, variables, components, selection, and document state, plus separate mutation tools. The main overlap is execute_code acting as a universal fallback, and some creation/transform overlap between create_nodes and restructure_nodes, but descriptions clarify intended use.

Naming Consistency5/5

All tools use snake_case with a verb_noun pattern (get_nodes, create_nodes, update_nodes, delete_nodes, export_image, etc.). Variations such as get/find and set/select are semantically motivated rather than inconsistent.

Tool Count4/5

17 tools is slightly above the ideal range but reasonable for a broad Figma plugin surface covering selection, reading, creation, editing, structure, export, and file connection. Each tool maps to a meaningful operation and there is little pure duplication.

Completeness4/5

The surface covers core design-file lifecycle operations: inspect, create, update, clone, restructure, delete, export, and manage connections. Dedicated style/variable/component authoring is missing, but execute_code provides a documented escape hatch for those cases.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues