Skip to main content
Glama
FigmaExporterMcp

FigmaExporterMcp

FigmaExporterMcp

通过本地开发插件读取、导出和修改当前打开的 Figma 设计文件。链路为 MCP stdio → 本机 relay → Figma 插件 UI → Plugin API;不使用 Figma REST Token。

代码入口为 src/server.ts。共注册 69 个工具:16 个内容读取、49 个设计操作、2 个资源导出和2个文件路由工具;另有6个策略提示。

本机使用

全局 Skill、客户端脚本和运行副本统一维护于 /Users/dp1_dev2/Documents/Skills/figma-exporter-mcp/,发现入口为 ~/.codex/skills/figma-exporter-mcp。业务仓库不保存 Skill 副本。

/Users/dp1_dev2/Documents/Skills/figma-exporter-mcp/scripts/run.sh start
/Users/dp1_dev2/Documents/Skills/figma-exporter-mcp/scripts/run.sh status
/Users/dp1_dev2/Documents/Skills/figma-exporter-mcp/scripts/run.sh call get_document_info --file '<status 返回的 channel>' --save document-index

Figma 中导入全局运行副本的 scripts/runtime/figma-plugin/manifest.json,在目标文件运行 FigmaExporter。默认连接 ws://localhost:3066。文件名、连接通道用于发现目标;fileKey 为空是 Plugin API 权限边界,不能仅据此判断未连接,也不能声称已验证某个 URL 的 file key。

call 通过真正的 MCP 工具执行并校验参数。设计写入另需 --write;此标志表示调用者已核对用户要求的范围,不代替用户授权。调用完成后读取真实节点验证结果;批量操作不提供事务回滚。

Related MCP server: Figma Native MCP

开发

Node.js 22 或更新版本;本机运行时在 /Users/dp1_dev2/Documents/Skills/.runtime/node/bin/。依赖的实际目录在全局 Skill 的 cache/build/node_modules,本仓库 node_modules 为忽略的符号链接。

依赖安装与链接按 本机维护 执行,包缓存和依赖不落在业务项目。链接准备好后:

export PATH=/Users/dp1_dev2/Documents/Skills/.runtime/node/bin:$PATH
npm run typecheck
npm test

npm test 先构建再运行测试。构建使用 esbuild 和 TypeScript,输出 dist/;生成文件随代码维护。用 esbuild 独立执行器替代 tsup/Rollup 后,构建无需在签名 Node 进程加载第三方原生扩展。测试的 WebSocket 插件为隔离替身,不会修改真实 Figma 文件。

更新本机全局运行副本见 维护说明。更新插件代码后需要在 Figma 停止并重跑插件;仅更新服务端时重启自己管理的 relay。不要终止其他程序或其他会话拥有的进程。

结构与行为

  • 架构与数据流:模块职责、会话路由、读取和写入调用链。

  • 工具能力:能力分组、导出语义和操作限制。

  • 本机维护:构建、运行副本、MCP 配置和诊断。

  • Review 与验收:问题修复、自动化检查、真实文件读写和清理的实际覆盖。

原仓库绑定具体 Windows 项目路径、节点 ID 的7个一次性脚本及旧 Skill 已保存至全局私有缓存 upstream-legacy.tar.gz,不再作为执行入口。

Available Tools

65 tools
batch_createA

Execute multiple Figma commands in a single batch call. Dramatically improves performance for bulk operations like creating many icons or setting up variables.

Inputs: operations (required).

bind_variableB

Bind a Variable to a node property. This connects component properties to the theming system.

Inputs: field (required), nodeId (required), variableId (required).

clone_nodeC

Clone an existing node in Figma

Inputs: nodeId (required), x, y.

convert_to_componentA

Convert an existing Frame or Group into a Component. Preserves all children and properties.

Inputs: nodeId (required).

create_boolean_operationA

Create a boolean operation (union, subtract, intersect, exclude) from multiple nodes. Useful for complex icon shapes.

Inputs: nodeIds (required), name, operation.

create_componentB

Create a new Component (not an instance) in Figma. This is the foundation for building a component library.

Inputs: name (required), x, y, width, +14 more.

create_component_instanceA

Create an instance of a component in Figma. Use componentId for fast local component instantiation, or componentKey for library imports.

Inputs: x (required), y (required), parentId, componentId, +1 more.

create_component_setA

Combine multiple Component variants into a ComponentSet. Each component must have variant-style naming like 'Property=Value'.

Inputs: componentIds (required), name.

create_connectionsB

Create connections between nodes using the default connector style

Inputs: connections (required).

create_ellipseA

Create an ellipse/circle in Figma. Useful for avatars, radio buttons, status indicators.

Inputs: x, y, name, width, +3 more.

create_frameC

Create a new frame in Figma

Inputs: x (required), y (required), width (required), height (required), +16 more.

create_icon_componentA

Create an icon component from SVG content. Inserts SVG, flattens vectors, resizes to standard size, sets fill color, and converts to a Component. Returns component ID and key.

Inputs: svgContent (required), x, y, name, +3 more.

create_lineC

Create a line in Figma. Useful for dividers.

Inputs: x, y, name, length, +4 more.

create_rectangleC

Create a new rectangle in Figma

Inputs: x (required), y (required), width (required), height (required), +2 more.

create_textC

Create a new text element in Figma

Inputs: x (required), y (required), text (required), name, +4 more.

create_variableB

Create a new Variable in an existing Variable Collection.

Inputs: name (required), collectionId (required), resolvedType (required).

create_variable_collectionA

Create a new Variable Collection with modes. Use this to set up the theming system (Colors, Spacing, Radius, Typography, Font collections).

Inputs: name (required), modes.

delete_multiple_nodesB

Delete multiple nodes from Figma at once

Inputs: nodeIds (required).

delete_nodeC

Delete a node from Figma

Inputs: nodeId (required).

export_node_as_imageC

Export a node as an image from Figma

Inputs: nodeId (required), scale, format.

flatten_nodeB

Flatten a node (or group) into a single vector. Useful for cleaning up imported SVG icons.

Inputs: nodeId (required).

get_annotationsB

Get all annotations in the current document or specific node

Inputs: nodeId (required), includeCategories.

get_connected_filesA

List all Figma design files currently connected via the FigmaExporter plugin. Shows which file is active (receives commands).

Inputs: no named parameters.

get_document_infoA

Get detailed information about the current Figma document

Inputs: no named parameters.

get_instance_overridesA

Get all override properties from a selected component instance. These overrides can be applied to other instances, which will swap them to match the source component.

Inputs: nodeId.

get_local_componentsA

Get all local components from the Figma document

Inputs: no named parameters.

get_local_variablesA

Get all local Variable Collections and their variables with values. Useful for inspecting the current variable/theming setup.

Inputs: no named parameters.

get_node_infoC

Get detailed information about a specific node in Figma

Inputs: nodeId (required), options.

get_nodes_infoC

Get detailed information about multiple nodes in Figma

Inputs: nodeIds (required), options.

get_reactionsA

Get Figma Prototyping Reactions from multiple nodes. CRITICAL: The output MUST be processed using the 'reaction_to_connector_strategy' prompt IMMEDIATELY to generate parameters for connector lines via the 'create_connections' tool.

Inputs: nodeIds (required).

get_selectionB

Get information about the current selection in Figma

Inputs: no named parameters.

get_stylesA

Get all styles from the current Figma document

Inputs: no named parameters.

group_nodesC

Group multiple nodes together.

Inputs: nodeIds (required), name.

insert_svgB

Insert an SVG string into Figma. Use this to create icons from SVG markup. The SVG will be converted to Figma vector nodes.

Inputs: svgString (required), x, y, name, +2 more.

move_nodeC

Move a node to a new position in Figma

Inputs: x (required), y (required), nodeId (required).

read_my_designC

Get detailed information about the current selection in Figma, including all node details

Inputs: options.

resize_nodeC

Resize a node in Figma

Inputs: width (required), height (required), nodeId (required).

scan_nodes_by_typesC

Scan for child nodes with specific types in the selected Figma node

Inputs: types (required), nodeId (required).

scan_text_nodesC

Scan all text nodes in the selected Figma node

Inputs: nodeId (required).

set_active_fileB

Switch which Figma file receives commands. Pass a file name or channel keyword to match.

Inputs: keyword (required).

set_annotationB

Create or update an annotation

Inputs: nodeId (required), labelMarkdown (required), categoryId, properties, +1 more.

set_axis_alignA

Set primary and counter axis alignment for an auto-layout frame in Figma

Inputs: nodeId (required), counterAxisAlignItems, primaryAxisAlignItems.

set_component_propertyA

Add a Component Property (Boolean, Text, Instance Swap, or Variant) to a Component or ComponentSet. For INSTANCE_SWAP: defaultValue must be the component KEY (not node ID), and targetChildId should be the child Instance node whose mainComponent will be linked.

Inputs: nodeId (required), propertyName (required), propertyType (required), defaultValue, +1 more.

set_component_property_referencesA

Set componentPropertyReferences on a sublayer within a Component. Links a child node's property to an existing component property. Keys: 'visible'|'characters'|'mainComponent'.

Inputs: nodeId (required), references (required).

set_corner_radiusA

Set the corner radius of a node in Figma

Inputs: nodeId (required), radius (required), corners.

set_default_connectorB

Set a copied connector node as the default connector

Inputs: connectorId.

set_effectsB

Set effects on a node: drop shadow, inner shadow, layer blur, background blur.

Inputs: nodeId (required), effects (required).

set_fill_colorC

Set the fill color of a node in Figma can be TextNode or FrameNode

Inputs: b (required), g (required), r (required), nodeId (required), +1 more.

set_focusA

Set focus on a specific node in Figma by selecting it and scrolling viewport to it

Inputs: nodeId (required).

set_instance_overridesA

Apply previously copied overrides to selected component instances. Target instances will be swapped to the source component and all copied override properties will be applied.

Inputs: targetNodeIds (required), sourceInstanceId (required).

set_item_spacingA

Set distance between children in an auto-layout frame

Inputs: nodeId (required), itemSpacing, counterAxisSpacing.

set_layout_modeB

Set the layout mode and wrap behavior of a frame in Figma

Inputs: nodeId (required), layoutMode (required), layoutWrap.

set_layout_sizingA

Set horizontal and vertical sizing modes for an auto-layout frame in Figma

Inputs: nodeId (required), layoutSizingVertical, layoutSizingHorizontal.

set_multiple_annotationsC

Set multiple annotations parallelly in a node

Inputs: nodeId (required), annotations (required).

set_multiple_text_contentsB

Set multiple text contents parallelly in a node

Inputs: text (required), nodeId (required).

set_node_nameB

Rename a node in Figma.

Inputs: name (required), nodeId (required).

set_opacityA

Set the opacity of a node (0 to 1).

Inputs: nodeId (required), opacity (required).

set_paddingB

Set padding values for an auto-layout frame in Figma

Inputs: nodeId (required), paddingTop, paddingLeft, paddingRight, +1 more.

set_selectionsA

Set selection to multiple nodes in Figma and scroll viewport to show them

Inputs: nodeIds (required).

set_stroke_colorB

Set the stroke color of a node in Figma

Inputs: b (required), g (required), r (required), nodeId (required), +2 more.

set_text_contentA

Set the text content of an existing text node in Figma

Inputs: text (required), nodeId (required).

set_text_styleA

Set text style properties: font family, size, weight, line height, letter spacing, alignment, decoration, case.

Inputs: nodeId (required), fontSize, textCase, fontStyle, +7 more.

set_variable_mode_nameB

Rename a mode in a Variable Collection.

Inputs: name (required), modeId (required), collectionId (required).

set_variable_valueA

Set the value of a Variable for a specific mode. For COLOR type, pass hex string like '#FF0000'.

Inputs: modeId (required), variableId (required), value.

set_visibilityB

Show or hide a node.

Inputs: nodeId (required), visible (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 65 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but there is some overlap (e.g., get_selection vs. read_my_design, clone_node vs. create_component_instance). The descriptions help differentiate, but an agent might still confuse a few.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (e.g., create_rectangle, set_fill_color). No mixed conventions or irregularities.

    Tool Count3/5

    65 tools is high, covering extensive Figma functionality. While the domain justifies many, the number exceeds typical MCP server scopes and may be overwhelming for an agent.

    Completeness5/5

    The tool set is remarkably complete, covering creation, manipulation, deletion, variables, styles, annotations, and batch operations. No obvious gaps in core Figma design workflows.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Unofficial local MCP bridge for reading the currently open Figma file through a Figma plugin. Provides tools to inspect selection, file info, and export selected nodes as SVG/PNG.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A local MCP server that lets MCP clients inspect and edit the Figma document currently open in the Figma desktop app using a local bridge and development plugin.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Local-first MCP bridge for live Figma documents, enabling design inspection, editing, asset export, component authoring, and variable management through a plugin and WebSocket server without consuming Figma REST API requests.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A local-only MCP bridge that connects an MCP client to an open Figma file via a Figma plugin, enabling direct document editing, inspection, export, and audit without using the Figma REST API.
      4
      MIT