FigmaMCP

Figma MCP 安装:从下载到第一次编辑

语言: English · 简体中文 · 日本語

这是在 Mac 上安装 FigmaMCP 的 Figma MCP 设置说明。下载一个 App,打开它,按它的检查清单操作。App 会在 Figma 里注册插件,并连接你的 Agent。你不需要改配置文件,也不需要复制令牌。

也可以让 Agent 帮你安装

把下面这段复制到 Mac 上的 Claude Code 或 Codex 里。Agent 会下载并安装 FigmaMCP,请你在 Figma 里打开插件、重启 Agent 一次,然后做一处小改动。需要 macOS 14 或更高版本,以及 Figma 桌面版。这段提示词是英文的,Agent 可以直接读懂。

Agent 安装提示词
Install FigmaMCP on this Mac, then make one small edit in my open Figma file. Use only the commands below, and ask me before anything else.

1. Check that `sw_vers -productVersion` is 14 or later and that /Applications/Figma.app exists. If not, stop and tell me.
2. Download and install the app:
   curl -fL -o /tmp/FigmaMCP.dmg https://github.com/MrCoder/figmamcp-releases/releases/latest/download/FigmaMCP.dmg
   hdiutil detach /tmp/figmamcp-dmg 2>/dev/null; hdiutil attach -nobrowse -readonly -mountpoint /tmp/figmamcp-dmg /tmp/FigmaMCP.dmg
   pgrep -x FigmaMCP && osascript -e 'quit app "FigmaMCP"'
   rm -rf /Applications/FigmaMCP.app && ditto /tmp/figmamcp-dmg/FigmaMCP.app /Applications/FigmaMCP.app
   hdiutil detach /tmp/figmamcp-dmg
3. Run /Applications/FigmaMCP.app/Contents/Resources/bin/figmamcp setup and read its output. Exit code 3 means a step still needs doing. If Figma has never been opened, ask me to open it once, then run setup again. If Figma must restart, ask me before you run setup --restart-figma.
4. Ask me to open a file in the Figma desktop app and run Plugins > Development > FigmaMCP. Then run figmamcp doctor from the same folder until it exits 0.
5. Ask me to restart you so you load the figmamcp tools: quit, run claude --continue (Claude Code) or codex resume --last (Codex), and type "continue".
6. Call figmamcp's page_info, then create_text with "Hello from FigmaMCP" on the current page, using the page id and exact name from page_info. If the edit is refused because editing is off, ask me to turn on "AI can edit this file" in the plugin.

更想自己点?按下面的步骤操作。

需要准备什么

安装

  1. 下载 App

    下载 Mac 版 FigmaMCP 并打开。

    下载 Mac 版 Version 0.1.25 macOS 14 及以上 · Intel 和 Apple 芯片 · 约 155 MB

    下载慢或打不开?从 GitHub 发布页获取 FigmaMCP.dmg。校验 SHA-256。

  2. 按检查清单操作

    App 会检查 Figma、Claude Code 和 Codex,然后安装插件并连接你的 Agent。点击 Add to Figma。只有 Figma 正在运行且缺少插件时,Figma 才会重启一次。你也可以允许“辅助功能”权限,让 FigmaMCP 替 AI 打开插件,这一步可选。

  3. 重启 Claude Code 或 Codex

    如果它已经在运行,重启一次,让它加载新工具。

  4. 让 Agent 编辑

    打开一个 Figma 文件,然后让 Agent 修改它。例如:“把所有名为 Frame 12 的图层改成和它的标题一致的名字。”

把一页纸的 FigmaMCP 速查表(PDF,英文)放在 Figma 旁边:里面有安装步骤、好用的提示词、工具列表和常见问题的快速解决办法。

校验下载

App 需要 macOS 14 或更高版本,支持 Intel 和 Apple 芯片的 Mac。磁盘映像约 155 MB。如果 /download 很慢或打不开,请从 GitHub 发布页获取 FigmaMCP.dmg。发布页在每个文件旁边显示一个 sha256: 值,把它和你下载的文件比较:

shasum -a 256 ~/Downloads/FigmaMCP.dmg

两个值不一致时,删除文件并重新下载。

安装程序会改动什么

App 的检查清单只写入下面这些位置,已经完成的步骤会跳过。

安装程序写入的文件和设置
位置内容
/Applications/FigmaMCP.appApp 本身。
~/.figmamcp/versions/<版本> 和 ~/.figmamcp/current每个版本的 MCP 服务器、中继、插件和 skill。current 是指向当前版本的符号链接。config.json 记录中继端口,logs/ 存放中继日志。
~/.claude.json用 claude mcp add 添加的用户级 MCP 条目 figmamcp。只在装了 Claude Code 时添加。
~/.codex/config.toml用 codex mcp add 添加的 MCP 条目 figmamcp。只在装了 Codex 时添加。
~/.claude/skills/figmamcp 和 ~/.codex/skills/figmamcpFigmaMCP skill,给 Agent 看的使用说明。如果其中一个是指向别处的链接,就不会改动它。
~/Library/LaunchAgents/com.figmamcp.relay.plist登录时启动本地中继的 LaunchAgent。中继监听 localhost 的 3155 端口;被占用时改用 3156 到 3158 中第一个空闲端口。
Figma 的插件列表把 FigmaMCP 开发版插件加入 ~/Library/Application Support/Figma/settings.json,原文件保存在旁边的 settings.json.figmamcp-backup。

以前的 figma-edit 配置不会被改动。如果你用过 figma-edit-mcp,它的 MCP 条目、3055 端口上的中继和旧的 figma-edit 插件都保持原样。区分方法:FigmaMCP 的工具名以 mcp__figmamcp__… 开头,插件在 Plugins、Development、FigmaMCP;figma-edit 的工具名以 mcp__figma-edit__… 开头。不想两个并存时,删掉旧条目即可,例如 claude mcp remove figma-edit。

卸载或回退

回退到旧版本:从版本列表下载旧版 FigmaMCP.dmg,替换 Applications 里的 App,打开它并运行检查清单,然后重启 Claude Code 或 Codex。装过的旧版本保留在 ~/.figmamcp/versions 里。

卸载:先在 Figma 里选择 Plugins、Development、Manage plugins in development,移除 FigmaMCP。然后在终端运行下面的命令。没有用某个 Agent,就跳过对应的 claude 或 codex 那一行。最后两行会删除 App 和所有 FigmaMCP 版本,无法撤销。

osascript -e 'quit app "FigmaMCP"'
launchctl bootout gui/$(id -u)/com.figmamcp.relay
rm ~/Library/LaunchAgents/com.figmamcp.relay.plist
claude mcp remove figmamcp -s user
codex mcp remove figmamcp
rm -rf ~/.claude/skills/figmamcp ~/.codex/skills/figmamcp
rm -rf /Applications/FigmaMCP.app ~/.figmamcp

之后重启 Claude Code 或 Codex,让它不再加载这个工具。

遇到问题时

第一次用?跟着教程 5 分钟用 Claude Code 编辑 Figma 文件 操作,里面有演示视频,以及第一次读取和编辑用的提示词。更多任务见全部教程(英文)。

接下来可以看:用 Claude Code 编辑 Figma、在 Codex 中使用 FigmaMCP,或 Agent 能写入什么(均为英文)。

常见问题

需要用终端吗?
不需要。安装由 Mac App 完成。下载、打开,按检查清单操作就行。
需要 Figma API 令牌吗?
不需要。FigmaMCP 通过 Plugin API 和你 Mac 上的 Figma 桌面版通信,没有访问令牌需要创建或粘贴。
Figma 为什么会重启?
FigmaMCP 在 Figma 关闭时添加插件,Figma 再次启动后插件才会出现。只有 Figma 正在运行且缺少插件时,App 才会让它重启一次。
需要重启 Claude Code 或 Codex 吗?
如果它已经在运行,需要。重启后它才会加载新工具。

最后更新: