F

Figma MCP工具

@MatthewDailey/figma-mcp
0 Stars 466 次浏览 MatthewDailey 更新于 2026-08-23

通过ModelContextProtocol启用AI助手与Figma文件的交互,从而实现对Figma设计的查看、评论和分析。

该服务暂未提供标准配置,请参考 README 手动接入

服务介绍

Figma MCP 服务器

一个 ModelContextProtocol 服务器,使 AI 助手能够与 Figma 文件进行交互。该服务器通过 ModelContextProtocol 提供了查看、评论和分析 Figma 设计的工具。

功能

  • 通过提供 URL 将 Figma 文件添加到与 Claude 的聊天中
  • 阅读和发布 Figma 文件上的评论

使用 Claude 设置

  1. claude.ai/download 下载并安装 Claude 桌面应用程序

  2. 获取 Figma API 密钥(figma.com -> 点击左上角你的名字 -> 设置 -> 安全)。授予 File contentComments 权限。

  3. 配置 Claude 以使用 Figma MCP 服务器。如果这是您的第一个 MCP 服务器,请在终端中运行以下命令。

echo '{
  "mcpServers": {
    "figma-mcp": {
      "command": "npx",
      "args": ["figma-mcp"],
      "env": {
        "FIGMA_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}' > ~/Library/Application\ Support/Claude/claude_desktop_config.json

如果不是,请将 figma-mcp 块复制到 claude_desktop_config.json 中。

  1. 重启 Claude 桌面应用程序。

  2. 查看 Claude 界面上带有可用工具数量的锤子图标,确认服务器正在运行。

示例用法

启动一个新的 Claude 桌面聊天并将以下内容粘贴进去

What's in this figma file?

https://www.figma.com/design/MLkM98c1s4A9o9CMnHEyEC

更现实的使用示例演示

https://www.loom.com/share/0e759622e05e4ab1819325bcf6128945?sid=bcf6125b-b5de-4098-bf81-baff157e3dc3

开发设置

使用 Inspector 运行

出于开发和调试目的,您可以使用 MCP Inspector 工具。Inspector 提供了一个可视化界面,用于测试和监控 MCP 服务器交互。

访问 Inspector 文档 获取详细的设置说明和使用指南。

本地使用 Inspector 测试的命令是

npx @modelcontextprotocol/inspector npx figma-mcp

本地开发

  1. 克隆仓库
  2. 安装依赖项:
npm install
  1. 构建项目:
npm run build
  1. 对于带自动重建的开发:
npm run watch

可用工具

服务器提供了以下工具:

  • add_figma_file:通过提供其 URL 将 Figma 文件添加到您的上下文中
  • view_node:获取 Figma 文件中特定节点的缩略图
  • read_comments:获取 Figma 文件上的所有评论
  • post_comment:在 Figma 文件的某个节点上发布评论
  • reply_to_comment:回复 Figma 文件中的现有评论

每个工具都旨在通过 ModelContextProtocol 接口提供与 Figma 文件交互的具体功能。

相关 MCP 服务