Claude Code Tools

cc-talk-to-figma-mcp

official

Talk to Figma MCP Server - Claude Code compatible fork with image export fix

Version
0.1.1
Last Updated
2026-04-22
Source
official

cc-talk-to-figma-mcp

基于 cursor-talk-to-figma-mcp 的 Claude Code 兼容 fork。

为什么有这个 fork

原版 cursor-talk-to-figma-mcpexport_node_as_image 工具返回 MCP image content block(type: "image"),Cursor 可以正常处理,但 Claude Code 不支持该 content block 类型,导致整个 tool result 被静默丢弃,表现为调用成功但返回空。

本 fork 的修复方案:

  • 将导出的图片 base64 数据解码后写入临时文件(/tmp/figma-exports/
  • 返回 type: "text" content block,包含文件路径
  • Claude Code 通过 Read 工具读取图片文件(多模态能力),即可看到设计稿内容

除此修复外,其余功能与原版完全一致。

安装

Claude Code

~/.claude.jsonmcpServers 中添加:

{
  "mcpServers": {
    "TalkToFigma": {
      "command": "bunx",
      "args": ["cc-talk-to-figma-mcp@latest"]
    }
  }
}

Cursor

同样可以使用本包,在 ~/.cursor/mcp.json 中添加相同配置。

前置依赖

  1. 安装 Bun
  2. 启动 WebSocket 中继服务器:bun socket(或使用原版的 socket server)
  3. 在 Figma 中安装 Cursor MCP Plugin

使用

  1. 启动 WebSocket server
  2. 打开 Figma,运行 Cursor MCP Plugin
  3. 在 Claude Code / Cursor 中使用 join_channel 连接
  4. 通过 MCP 工具操作 Figma

导出图片(修复后的用法)

# Claude Code 中
1. export_node_as_image → 返回文件路径
2. Read 工具读取该路径 → 模型看到图片内容

MCP 工具列表

完整工具列表与原版一致,详见 原版文档

致谢

License

MIT(继承自原项目)