パッケージの詳細

figma-developer-mcp

GLips199.8kMIT0.4.3

Model Context Protocol server for Figma integration

figma, mcp, typescript

readme

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://www.framelink.ai/github/HeaderDark.png" /> Framelink </picture>

Framelink Figma MCP 服务器

🌐 可用语言: English | 한국어 (Korean) | 日本語 (Japanese)

为您的编码代理提供 Figma 数据访问权限。
一次性在任何框架中实现设计。

每周下载 MIT 许可证 Discord
Twitter


通过此 Model Context Protocol 服务器,为 Cursor 和其他 AI 驱动的编码工具提供 Figma 文件访问权限。

当 Cursor 可以访问 Figma 设计数据时,它比粘贴截图等替代方法能一次性准确实现设计。

查看快速入门指南 →

演示

观看使用 Figma 设计数据在 Cursor 中构建 UI 的演示

观看视频

工作原理

  1. 打开 IDE 的聊天(例如:Cursor 的代理模式)。
  2. 粘贴 Figma 文件、框架或组的链接。
  3. 要求 Cursor 对 Figma 文件执行某些操作(例如:实现设计)。
  4. Cursor 将从 Figma 获取相关元数据并使用它来编写代码。

此 MCP 服务器专为与 Cursor 一起使用而设计。在从 Figma API 响应上下文之前,它会简化和翻译响应,以便只向模型提供最相关的布局和样式信息。

减少提供给模型的上下文数量有助于提高 AI 的准确性并使响应更具相关性。

开始使用

许多代码编辑器和其他 AI 客户端使用配置文件来管理 MCP 服务器。

可以通过将以下内容添加到配置文件中来设置 figma-developer-mcp 服务器。

注意:您需要创建 Figma 访问令牌才能使用此服务器。有关如何创建 Figma API 访问令牌的说明,请参见此处

MacOS / Linux

{
  "mcpServers": {
    "Framelink Figma MCP": {
      "command": "npx",
      "args": ["-y", "figma-developer-mcp", "--figma-api-key=YOUR-KEY", "--stdio"]
    }
  }
}

Windows

{
  "mcpServers": {
    "Framelink Figma MCP": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "figma-developer-mcp", "--figma-api-key=YOUR-KEY", "--stdio"]
    }
  }
}

或者您可以在 env 字段中设置 FIGMA_API_KEYPORT

有关如何配置 Framelink Figma MCP 服务器的更多信息,请参阅 Framelink 文档

星标历史

星标历史图表

了解更多

Framelink Figma MCP 服务器简单但功能强大。在 Framelink 网站上了解更多信息。

更新履歴

figma-developer-mcp

0.4.3

Patch Changes

  • #179 17988a0 Thanks @GLips! - Update curl command in fetchWithRetry to include error handling options, ensure errors are actually caught properly and returned to users.

0.4.2

Patch Changes

0.4.1

Patch Changes

  • #161 8d34c6c Thanks @YossiSaadi! - Add --json CLI flag and OUTPUT_FORMAT env var to support JSON output format in addition to YAML.

0.4.0

Minor Changes

  • #126 6e99226 Thanks @habakan! - Add SVG export options to control text outlining, id inclusion, and whether strokes should be simplified.

Patch Changes

  • #153 4d58e83 Thanks @miraclehen! - Refactor layout positioning logic and add pixel rounding.

  • #112 c48b802 Thanks @dgxyzw! - Change format of component properties in simplified response.

  • #150 4a4318f Thanks @GLips! - Add curl fallback to make API requests more robust in corporate environments

  • #149 46550f9 Thanks @miraclehen! - Resolve promise in image downloading function only after file is finished writing.

0.3.1

Patch Changes

0.3.0

Minor Changes

  • #122 60c663e Thanks @YossiSaadi! - Include component and component set names to help LLMs find pre-existing components in code

  • #109 64a1b10 Thanks @jonmabe! - Add OAuth token support using Authorization Bearer method for alternate Figma auth.

  • #128 3761a70 Thanks @miraclehen! - Handle size calculations for non-AutoLayout elements and absolutely positioned elements.

Patch Changes

0.2.2

Patch Changes

  • fd10a46: - Update HTTP server creation method to no longer subclass McpServer
    • Change logging behavior on HTTP server
  • 6e2c8f5: Minor bump, testing fix for hanging CF DOs

0.2.2-beta.1

Patch Changes

  • 6e2c8f5: Minor bump, testing fix for hanging CF DOs

0.2.2-beta.0

Patch Changes

  • fd10a46: - Update HTTP server creation method to no longer subclass McpServer
    • Change logging behavior on HTTP server