FigmaMind
使用官方 API 从 Figma 中提取组件和模式的应用程序,并实现模型调用协议 (MCP)。
关于项目
FigmaMind 是一种分析 Figma 设计并将其转换为标准化 JSON 表示的工具。它可以识别按钮、输入字段、标题等组件,并提取它们的属性和关系。
该应用程序公开两种类型的 API:
- REST API :通过 HTTP 进行传统使用
- MCP(模型调用协议) :用于与 LLM 和其他 MCP 兼容系统集成
主要特点
- 通过官方 API 提取 Figma 组件
- 自动识别组件类型(按钮、输入、标题等)
- 定位和属性标准化
- 资产提取(图像和图标)
- 模型调用协议(MCP)的实现
- 完全用 TypeScript 编写
要求
- Node.js 18.0.0 或更高版本
- Figma API 令牌
安装
- 克隆存储库:
- 安装依赖项:
- 使用您的 Figma 令牌在项目根目录中创建一个
.env
文件:
- 编译项目:
使用
启动服务器
对于自动重新加载的开发:
使用示例
通过 REST API
转换 Figma 设计:
通过 MCP
列出可用的工具:
运行工具:
项目结构
测试
运行自动化测试:
文档
请参阅docs/
文件夹以获取有关以下内容的详细文档:
转换为 TypeScript
该项目从 JavaScript 转换为 TypeScript,以提高类型、代码稳健性和可维护性。转换包括:
- 为所有数据结构添加接口和类型
- 将所有
.js
文件转换为.ts
- 实现函数参数和返回的强类型
- 使用 TypeScript 创建自动化测试
执照
麻省理工学院
由 João Pereira 开发
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
从 Figma 设计中提取组件并将其转换为标准化的 JSON 格式,以便 AI 模型和工具轻松使用以进行界面重建。
Related MCP Servers
- AsecurityFlicenseAqualityEnables AI assistants to interact with Figma files through the ModelContextProtocol, allowing viewing, commenting, and analyzing Figma designs directly in chat interfaces.Last updated -5997173TypeScript
- -securityFlicense-qualityEnables Cursor AI to interact with Figma designs, allowing users to read design information and programmatically modify elements through natural language commands.Last updated -TypeScript
- -securityAlicense-qualityA Model Context Protocol server that integrates Figma design files with AI coding tools like Cursor, Windsurf, and Cline, allowing AI tools to access and understand Figma design data for generating more accurate code.Last updated -1246TypeScriptMIT License
- -securityAlicense-qualityGives AI-powered coding tools like Cursor, Windsurf, and Cline access to Figma design files, enabling more accurate code generation directly from Figma designs.Last updated -60,738TypeScriptMIT License