Skip to main content
Glama
Talk to Figma MCP

Talk to Figma MCP

by kctw-dev

Talk to Figma MCP(KCTW Fork)

讓 AI Agent(Claude Code / Cursor)透過 MCP 協定直接操作 Figma Desktop,實現 AI 自主 UI 設計。

基於 grab/cursor-talk-to-figma-mcp v0.3.4 的私有 fork。

與 Upstream 的差異

新增工具

工具

功能

狀態

set_reactions

Prototype 互動(ON_CLICK 導航等)

✅

create_component_from_node

Frame 轉 Component

✅

create_component_instance

建立 Component Instance(含 componentId 支援)

✅

create_variables

建立 Variable Collection(COLOR/FLOAT/STRING/BOOLEAN,多模式)

✅

rename_node

節點重命名

✅

bind_variable_to_fill

綁定 Variable 到填色

✅

bind_variable_to_stroke

綁定 Variable 到邊框色

✅

set_image_fill

圖片填充(URL → image fill)

✅

set_effects

陰影/模糊特效

✅

set_font

字體選擇 + 大小

✅

set_gradient_fill

漸層填色

✅

create_page / switch_page / get_pages

頁面管理

✅

多 Agent 支援

WebSocket Server 支援 Correlation ID 定向路由,多個 MCP Agent 可同時操作同一個 Figma 文件而不互相干擾。

  • 每個連線分配 clientId

  • 指令送出時記錄 messageId → sender

  • Plugin 回應時只路由給原始發送者(非廣播)

  • 30 秒 timeout 自動清理過期 request

  • 向後相容:無 id 的訊息仍廣播

連線簡化

  • 免驗證模式:WebSocket 連線不需 ECDSA 簽名,立即放行(適合本地開發)

  • 自動加入 Channel:MCP Server 用 MCP_CHANNEL 環境變數,Plugin 用 UI 輸入欄位

  • 支援多專案同時使用(每個專案設不同 channel 名稱)

Related MCP server: figma-pilot

架構

Windows (Figma Desktop + Plugin)
      ↕ WebSocket (port 3055)
WSL2 / Linux (socket.ts)
      ↕ stdio
Claude Code (MCP Server → dist/server.js)

支援環境:

  • Windows + WSL2:Plugin 在 Windows Figma,Server 在 WSL2

  • 本地開發:全部在同一台

  • 遠端:透過 SSH Tunnel 或 Cloudflare Tunnel

安裝

前置需求

1. Clone + Build

git clone https://github.com/kctw-dev/talk-to-figma-mcp.git
cd talk-to-figma-mcp
npm install
npm run build

2. 啟動 WebSocket Server

bun run src/socket.ts
# WebSocket server running on port 3055

3. 安裝 Figma Plugin

Windows + WSL2 環境:

# 從 WSL2 複製 Plugin 到 Windows
cp src/cursor_mcp_plugin/code.js /mnt/c/Users/<USERNAME>/figma-plugin/
cp src/cursor_mcp_plugin/manifest.json /mnt/c/Users/<USERNAME>/figma-plugin/
cp src/cursor_mcp_plugin/ui.html /mnt/c/Users/<USERNAME>/figma-plugin/

在 Figma Desktop:

  1. Plugins → Development → Import plugin from manifest

  2. 選擇 C:\Users\<USERNAME>\figma-plugin\manifest.json

  3. 開啟 Plugin,Channel 欄填專案名稱,按 Connect

本地環境:

  1. Figma Desktop → Plugins → Development → Import plugin from manifest

  2. 選擇 src/cursor_mcp_plugin/manifest.json

4. 註冊 MCP(Claude Code)

claude mcp add -e MCP_CHANNEL=my-project -- talk-to-figma-mcp node /path/to/talk-to-figma-mcp/dist/server.js

或在 .mcp.json:

{
  "mcpServers": {
    "talk-to-figma-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/talk-to-figma-mcp/dist/server.js"],
      "env": {
        "MCP_CHANNEL": "my-project"
      }
    }
  }
}

MCP 工具一覽(60+)

讀取

工具

說明

get_document_info

文件資訊

get_selection / read_my_design

目前選取

get_node_info / get_nodes_info

指定節點資訊

get_local_components

本地 Component 清單

get_styles

本地樣式

get_reactions

Prototype 互動

get_annotations

註解

get_instance_overrides

Component Override

get_plugin_version

Plugin 版本

scan_nodes_by_types

依類型掃描

scan_text_nodes

掃描文字節點

建立

工具

說明

create_frame

Frame(含 Auto Layout)

create_rectangle

矩形

create_text

文字

create_component_from_node

Frame 轉 Component

create_component_instance

Component Instance

create_connections

連接線

create_variables

Variable Collection

修改

工具

說明

move_node

移動

resize_node

縮放

clone_node

複製

delete_node / delete_multiple_nodes

刪除

rename_node

重命名

set_fill_color

填色

set_stroke_color

邊框色

set_corner_radius

圓角

set_text_content / set_multiple_text_contents

文字內容

set_layout_mode

Auto Layout 模式

set_padding

內距

set_item_spacing

間距

set_axis_align

軸對齊

set_layout_sizing

尺寸模式

set_reactions

Prototype 互動

set_annotation / set_multiple_annotations

註解

set_instance_overrides

Component Override

set_default_connector

預設連接線

set_focus / set_selections

聚焦/選取

bind_variable_to_fill

綁定 Variable 到填色

bind_variable_to_stroke

綁定 Variable 到邊框

set_image_fill

圖片填充(URL → image fill)

set_effects

陰影/模糊特效(DROP_SHADOW 等)

set_font

字體選擇 + 大小(fontFamily/fontStyle/fontSize)

set_gradient_fill

漸層填色(LINEAR/RADIAL/ANGULAR/DIAMOND)

頁面管理

工具

說明

create_page

新增頁面

switch_page

切換頁面(by ID 或 name)

get_pages

取得所有頁面清單

匯出

工具

說明

export_node_as_image

PNG/JPG/SVG/PDF

連線

工具

說明

join_channel

加入通訊頻道

已知限制

功能

狀態

說明

Pen tool

❌ 不支援

無法畫自定義形狀

Boolean 運算

❌ 不支援

無 Union/Subtract

Mask

❌ 不支援

無法建遮罩

Grid/Guide

❌ 不支援

無法設定網格線

匯入 SVG 檔案

❌ 不支援

無法直接匯入 SVG

開發

# WebSocket Server(開發模式)
bun run src/socket.ts

# MCP Server Build
npm run build        # 單次
npm run build:watch  # 監聽

# 測試
bun test src/socket.test.ts

修改 Plugin 後需重新複製到 Figma 讀取的路徑,然後在 Figma 重開 Plugin。

License

MIT(同 upstream)

Upstream

Available Tools

65 tools
bind_variable_to_fillA

Bind a Figma variable to a node's fill color

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

bind_variable_to_strokeB

Bind a Figma variable to a node's stroke color

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

clone_nodeC

Clone an existing node in Figma

Inputs: nodeId (required), x, y.

create_component_from_nodeA

Convert an existing Figma frame/node into a reusable Component. The node cannot already be a component or be inside a component.

Inputs: nodeId (required).

create_component_instanceC

Create an instance of a component in Figma

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

create_connectionsB

Create connections between nodes using the default connector style

Inputs: connections (required).

create_frameC

Create a new frame in Figma

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

create_pageC

Create a new page in the Figma document

Inputs: name, setCurrent.

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_variablesA

Create a Figma variable collection with variables. Supports COLOR, FLOAT, STRING, and BOOLEAN types with multiple modes (e.g., light/dark theme).

Inputs: variables (required), collectionName (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).

detach_instanceA

Detach a library instance into an editable frame. After detaching, all sublayer text becomes modifiable.

Inputs: nodeId (required).

export_node_as_imageC

Export a node as an image from Figma

Inputs: nodeId (required), scale, format.

get_annotationsB

Get all annotations in the current document or specific node

Inputs: nodeId (required), includeCategories.

get_document_infoA

Get detailed information about the current Figma document

Inputs: no named parameters.

get_instance_infoA

Get the mainComponent key and info from an instance node

Inputs: nodeId (required).

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_library_collectionsA

List all available library variable collections (from enabled team/community libraries)

Inputs: no named parameters.

get_library_componentsA

List components in a specific library collection by collection key or name

Inputs: collectionKey (required).

get_local_componentsA

Get all local components from the Figma document

Inputs: no named parameters.

get_node_infoB

Get detailed information about a specific node in Figma

Inputs: nodeId (required).

get_nodes_infoC

Get detailed information about multiple nodes in Figma

Inputs: nodeIds (required).

get_pagesA

Get all pages in the current Figma document

Inputs: no named parameters.

get_plugin_versionA

Get the Figma plugin version to verify it is up-to-date

Inputs: no named parameters.

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.

import_component_by_keyA

Import a component from a library by its key and create an instance on the current page

Inputs: key (required), x, y, parentId.

import_component_set_by_keyB

Import a component set (with variants) from a library by its key

Inputs: key (required).

import_style_by_keyA

Import a style (color, text, effect, grid) from a library by its key

Inputs: key (required).

join_channelC

Join a specific channel to communicate with Figma

Inputs: channel.

move_nodeC

Move a node to a new position in Figma

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

read_my_designA

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

Inputs: no named parameters.

rename_nodeB

Rename a node in Figma

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

resize_nodeC

Resize a node in Figma

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

scan_instance_keysA

Scan all instances under a node and return their mainComponent keys (deduplicated). Use to discover published library component keys.

Inputs: nodeId.

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_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_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 visual effects (shadow, blur) on a node

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_fontB

Set font family, style, and size on a text node

Inputs: nodeId (required), fontSize, fontStyle, fontFamily.

set_gradient_fillB

Set a gradient fill on a node

Inputs: stops (required), nodeId (required), angle, gradientType.

set_image_fillA

Set an image fill on a node from a URL

Inputs: nodeId (required), imageUrl (required), scaleMode.

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_instance_propertiesA

Set component properties on an instance (e.g. switch Platform from Desktop to Mobile)

Inputs: nodeId (required), properties (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_paddingB

Set padding values for an auto-layout frame in Figma

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

set_reactionsB

Set prototype interactions (reactions) on a Figma node. Allows creating click-to-navigate, hover, and other prototype interactions.

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

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).

switch_pageB

Switch to a different page in the Figma document

Inputs: pageId, pageName.

walk_and_replace_textA

Walk entire node subtree and replace text by exact match. Works on library instance sublayers that getNodeByIdAsync cannot access.

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

walk_and_scan_textB

Walk entire node subtree and collect all text nodes. Works on library instance sublayers.

Inputs: nodeId (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 65 tools

    Disambiguation3/5

    Several tools have overlapping purposes, such as 'read_my_design' and 'get_selection' which both provide detailed selection info, and 'scan_text_nodes' vs 'walk_and_scan_text' which both scan text nodes. While many tools are distinct, these ambiguities could cause an agent to select the wrong tool.

    Naming Consistency4/5

    Most tool names follow a consistent verb_noun pattern in snake_case (e.g., 'create_rectangle', 'set_fill_color'). The main outlier is 'read_my_design', which breaks the pattern with 'my' and differs from others like 'get_selection'. Overall, naming is largely predictable.

    Tool Count2/5

    Sixty-five tools is excessive for a typical MCP server, exceeding the 'too many' threshold of 25+. While Figma has a broad feature set, the tool count feels bloated and could be streamlined, e.g., by merging similar tools or reducing granularity.

    Completeness4/5

    The tool set covers a wide range of Figma operations: node CRUD, styling, text, components, instances, libraries, variables, prototyping, and annotations. Minor gaps exist (e.g., no explicit boolean operations), but the surface is comprehensive for most design workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to interact with Figma to create, read, and manage designs using the Figma REST API and a dedicated plugin. It supports advanced features like UI generation from text, webpage reconstruction in Figma, and design token synchronization with codebases.
      20
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to create, modify, and manage Figma designs through natural language commands via a specialized MCP server and plugin bridge. It supports a wide range of operations including element creation, property modification, component management, and accessibility checks.
      4 npm
      105
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      Open-source, bidirectional Figma agent for MCP clients — a free alternative to Figma's Dev Mode MCP. Reads designs with high-fidelity grounding and writes back to the canvas: frames, text, auto-layout, styles, variables, and components. 92 tools, no API token, no paid Figma seat.
      112
      1,394
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to read and write Figma designs through a local WebSocket relay, turning Figma selections into framework-aware code and building/editing designs directly on the canvas. Provides 112 MCP tools for bidirectional design-code workflows with support for any MCP client.
      MIT