Figma Mcp Go

io.github.tunglt1810由 GitHub 账号 tunglt1810 发布v0.6.0更新于 Oct 24, 2026

Figma MCP server with full read/write access via plugin bridge — no API token or rate limits.

发布方自己的服务:Figma MCP Server

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

本地运行的 Figma MCP 服务器,通过 Figma 插件让助手实时读写当前打开的 Figma 文件,无需 API 令牌。

可以做什么
读取当前文件:文档树、节点、选区、元数据、样式、变量、组件、字体、注释和原型交互,并支持节点搜索与视口信息。导出资源:截图、将画板导出为多页 PDF、图片原始字节,以及以 JSON 或 CSS 导出变量和填充样式。创建图形、文本、矢量、图片、组件、变体、连接线和布尔运算。编辑节点:属性、填充、自动布局、网格、效果、文本与局部文本样式、查找替换、实例覆盖、分组、重命名和删除。管理样式、变量和页面,并执行带撤销的多步写入流水线。
适用场景
适合让助手直接查看、生成或修改 Figma 桌面版中的设计,例如把文字变成设计、把设计转成代码,或在打开的文件中批量修改样式、文本和组件。
运行要求
通过 npx 或 bunx 以 stdio 在本地运行(需要 Node.js 或 Bun)。需要 Figma 桌面版,并从 manifest 导入配套插件且在文件中运行。无需 API 令牌或环境变量。默认端口 1994,可为不同工具设置其他端口。
安装前请注意
插件连接没有登录验证;默认 127.0.0.1 时仅本机可访问,但绑定到其他地址后,任何能访问该端口的人都能读取和修改打开的文件。许多工具会在实时文件中写入、重命名或删除节点、样式、变量和页面;建议使用只读模式或插件的 guard 与撤销控制。只读标志仅限制单个服务器,同一端口上的其他客户端仍可编辑。通过 set_codegen_result 保存的代码对文件的所有人可见。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Figma Mcp Go,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

figma-mcp-go

Figma MCP — Local Plugin Integration [tunglt1810/figma-mcp-go server]

[npm version] [MCP Registry] [License: MIT] [GitHub stars]

Open-source Figma MCP server with full read and write access through a Figma plugin. Turn text into designs and designs into code. Works with Claude, Cursor, GitHub Copilot, and any MCP client.

Highlights

  • Runs locally through the Figma Plugin API. No REST API token needed.
  • Reads and edits the open Figma file live — 60 tools.
  • Covers styles, variables, components, prototypes, text, and multi-step batches with undo.
  • Built-in prompts such as read_design_strategy and design_strategy.
  • Lean on tokens: short tool descriptions, capped node trees, and images returned as images.

Styles, Variables, Components, Prototypes, and Content

https://github.com/user-attachments/assets/eae41471-fc72-4574-8261-4f42c38b8c99

Text to Design, Design to Code

https://github.com/user-attachments/assets/17bda971-0e83-4f18-8758-8ac2b8dcba62


Why this exists

Most Figma MCP servers use the cloud Figma REST API. AI tools make hundreds of quick calls per session, and every cloud round trip adds delay.

This server talks to a Figma plugin on your own machine instead. You get fast, live read and write access to the open file, with no API token.


Setup

Install with npx or bunx. No build step. Watch the setup video or follow the steps below.

[Watch the video]

1. Add the server to your AI tool

Claude Code CLI

bash
# via npxclaude mcp add -s project figma-mcp-go -- npx -y @tunglt1810/figma-mcp-go@latest
# or via bunxclaude mcp add -s project figma-mcp-go -- bunx @tunglt1810/figma-mcp-go@latest

Codex CLI

bash
# via npxcodex mcp add figma-mcp-go -- npx -y @tunglt1810/figma-mcp-go@latest
# or via bunxcodex mcp add figma-mcp-go -- bunx @tunglt1810/figma-mcp-go@latest

.mcp.json (Claude and other MCP-compatible tools)

json
{  "mcpServers": {    "figma-mcp-go": {      "command": "npx",      "args": ["-y", "@tunglt1810/figma-mcp-go"]    }  }}

.vscode/mcp.json (Cursor / VS Code / GitHub Copilot)

json
{  "servers": {    "figma-mcp-go": {      "type": "stdio",      "command": "npx",      "args": [        "-y",        "@tunglt1810/figma-mcp-go"      ]    }  }}

2. Install the Figma plugin

  1. In Figma Desktop: Plugins → Development → Import plugin from manifest
  2. Pick manifest.json from plugin.zip
  3. Run the plugin in any Figma file

3. Use more than one AI tool (optional)

Each AI tool starts its own server, but only one can hold the plugin connection on a port.

Same file: change nothing. The first server takes port 1994; the others forward their calls to it. If it stops, another takes over in a few seconds.

Different files: give each tool its own port, and set the same port in that file's plugin (settings gear):

json
{  "mcpServers": {    "figma-mcp-go": {      "command": "npx",      "args": ["-y", "@tunglt1810/figma-mcp-go", "--port", "1995"]    }  }}

The plugin remembers the last port for all files, so check it when you open the plugin elsewhere.

--ip 0.0.0.0 accepts connections from other machines.

Security: the plugin connection has no login. On the default 127.0.0.1 only your machine can reach it. On any other address, anyone who can reach the port can read and edit your open file. The server warns you and the plugin turns on confirm mode. Prefer an SSH tunnel.

4. Read-only mode (optional)

Add --read-only to offer only the 17 tools that cannot change the Figma file. These are the read tools, export_screenshots, export_frames_to_pdf, and get_image_bytes. The tool list that the AI loads is about 84% smaller.

json
{  "mcpServers": {    "figma-mcp-go": {      "command": "npx",      "args": ["-y", "@tunglt1810/figma-mcp-go", "--read-only"]    }  }}

The flag limits one server only. Another AI tool on the same port can still edit the file, unless it also uses the flag.

Plugin panel

The panel shows the connected file, the selection, and what the AI is doing.

ControlWhat it does
Guardoff (default) runs everything. confirm asks before deletes and bulk changes. read-only blocks all changes.
UndoUndoes the last change. A whole batch_execute_pipeline run is one undo step.
LogShows every request with tool, time, and error. Copy exports it for bug reports.
PinSaves the current selection. get_selection(source: "pinned") returns it even after the user clicks elsewhere.

Settings and panel size are saved per machine. The panel follows Figma's light and dark theme.

Dev Mode

set_codegen_result saves code on a node. It shows in Dev Mode's Code panel for everyone on the file. Code on a component shows for all its instances. The Language menu filters blocks; if a language has no block, all blocks show.


How it works

The first server to start becomes the leader and holds the only WebSocket to the plugin. Other servers are followers and forward their calls to the leader.

mermaid
flowchart LR    client([MCP client]) -- stdio --> tools    client2([2nd MCP client]) -- stdio --> follower[Follower]
    subgraph leaderProc [Leader process]        tools[tools<br/>60 tools, Check] -- Send --> leader[cluster.Leader<br/>:1994 /rpc /ws /ping]        leader --> bridge[bridge<br/>request/response match]    end
    follower -. POST /rpc .-> leader
    subgraph plugin [Figma plugin]        ui[Plugin UI<br/>Svelte iframe] -- postMessage --> main[Plugin main<br/>dispatch handlers]    end
    bridge == WebSocket ==> ui    main -- read / write --> figma[(Figma document)]

One tool call, end to end:

mermaid
sequenceDiagram    participant C as MCP client    participant T as tools    participant L as cluster    participant B as bridge    participant U as Plugin UI    participant M as Plugin main    participant F as Figma
    C->>T: tools/call (stdio)    T->>L: Send after Check    Note over L: A follower first sends POST /rpc to the leader    L->>B: forward    B->>U: WebSocket request    U->>M: postMessage    M->>F: read / write nodes    F-->>M: nodes    M-->>U: response    U-->>B: WebSocket reply    B-->>L: matched by id    L-->>T: (any, error)    T-->>C: tool result

Tools

Read

ToolWhat it does
get_documentNode tree of the selection, page, or whole file. Stops at 500 nodes by default; depth, maxNodes, detail, dedupe_components control size
get_nodes_infoFull details of nodes by ID. Unknown IDs go in missing; depth and maxNodes limit children
get_selectionSelected nodes, or pinned ones with source: "pinned"
get_metadataFile name, current page, and all pages
search_nodesFind nodes by name and/or type on a page, in a node, or in the whole file
get_viewportView center, zoom, and visible area
get_stylesPaint, text, effect, and grid styles
get_variable_defsVariable collections, modes, and values
get_local_componentsAll components and component sets
get_instance_overridesAn instance's component properties and values
get_annotationsDev Mode annotations
get_fontsFonts on the current page, most used first
get_reactionsA node's prototype reactions

Export

ToolWhat it does
export_screenshotsExport nodes as images: saved to a file with outputPath, or returned (PNG/JPG as image, SVG as text). No items = the selection
export_frames_to_pdfSave frames as one multi-page PDF
get_image_bytesOriginal image files from image fills, as base64
export_tokensVariables and paint styles as JSON or CSS
set_export_settingsSet a node's Export presets

Create

ToolWhat it does
create_nodeFRAME, RECTANGLE, ELLIPSE, STAR, POLYGON, LINE, or SECTION
create_textText node (loads the font)
create_vectorVector from SVG, e.g. an icon
import_imageImage from a URL or base64, as a new rectangle or into a node
create_componentTurn a frame into a component
create_component_instanceInstance of a local or library component
combine_as_variantsCombine components into a variant set
manage_component_propertiesAdd, edit, delete, or bind component properties
create_connectorConnector line. This tool operates only in a FigJam file
boolean_operationUNION, SUBTRACT, INTERSECT, or EXCLUDE shapes
flatten_nodesMerge nodes into one vector
outline_strokeTurn a stroke into a filled shape

Edit

ToolWhat it does
set_node_propertiesPosition, size, radius, visibility, lock, opacity, rotation, blend, constraints, layer order, mask, stroke
set_paintSolid or gradient fill or stroke
set_auto_layoutAuto layout: direction, padding, gap, align, HUG/FILL sizing, min/max
set_layout_gridsColumn, row, or square grids
set_effectsShadows, blurs, noise, texture, glass
set_textText content and whole-node text settings
set_text_rangesStyle part of a text: bold, color, link, list
find_replace_textFind and replace text, regex allowed
set_instance_overridesSet an instance's component properties
swap_componentSwap an instance to another local or library component
detach_instanceTurn instances into plain frames
clone_nodeCopy a node
reparent_nodesMove nodes into another parent
group_nodes / ungroup_nodesGroup or ungroup
batch_rename_nodesRename by name, find/replace, regex, prefix, or suffix
set_annotationsDev Mode annotations (paid seat)
set_reactionsPrototype reactions: set, append, or remove
delete_nodesDelete nodes

Styles, variables, pages

ToolWhat it does
create_stylePAINT, TEXT, EFFECT, or GRID style
update_paint_styleRename or recolor a paint style
apply_style_to_nodeApply a style to a node
delete_styleDelete a style
manage_variableCreate collections, modes, and variables; set values; delete; bind to nodes
manage_pageAdd, delete, rename, or go to a page

Workflow

ToolWhat it does
batch_execute_pipelineRun many write steps in one call, pass results between steps, undo on error
set_selectionSelect and zoom to nodes to show the user
save_version_checkpointSave a named version before big changes
set_codegen_resultSave code for Dev Mode's Code panel
manage_plugin_dataStore key/value notes on a node in the file

Prompts

PromptWhat it does
read_design_strategyHow to read designs well
design_strategyHow to create and edit designs
text_replacement_strategyReplace text across a design in chunks
annotation_conversion_strategyTurn manual notes into Figma annotations
swap_overrides_instancesCopy overrides between instances
reaction_to_connector_strategyTurn prototype links into flow diagrams

Upgrading

Update the plugin when you update the server. npx updates the server, but the plugin is installed by hand. An old plugin rejects new commands with Unknown request type.

See CHANGELOG.md for what changed in each release, including removed tools and what to use instead.


Development

  • Server: Go 1.27+ (make test-go, make build-go)
  • Plugin: Bun 1.4+ (cd plugin && bun install && bun run build)
  • All tests: make test
  • Logs: stderr. FIGMA_MCP_LOG=debug shows tool parameters and traffic.
  • Package rules: make deps-check fails on wrong-way imports. internal/ has bridge (plugin WebSocket), cluster (leader election), figma (rules), and tools (tool table). Allowed: tools → figma, cluster → bridge.

macOS binaries need macOS 13 or later (Go 1.27).

Contributing

Issues and PRs are welcome.

Star History

[Star History Chart]

来源:README.md,提交 b320beb

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v0.6.0最新Oct 14, 2026
  2. v0.5.0Oct 6, 2026
  3. v0.4.1Sep 27, 2026
  4. v0.3.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Figma 集成