Token导航 LogoToken导航TokenDH.com
Figma to React Native MCP logo
设计创作stdio官方级别未说明来源级核验

Figma to React Native MCP

MCP Server

@smithery/cli@latest

将Figma设计转换为React Native组件,支持组件层次结构、属性和类型的自动生成。

工具数

0

提示词数

0

GitHub Stars

8

资源数

0
开发工具TypeScriptClaudeClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

kailashAppDev

提供方

kailashAppDev

最后核验

2026/5/17 20:19

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx -y @smithery/cli@latest install @kailashg101/mcp-figma-to-code --client claude --config "{

详细介绍

Figma响应原生MCP

使用Cursor的MCP将Figma设计转换为React Native组件。该工具从Figma设计中提取组件,并生成具有适当类型和样式的相应React Native组件。

安装

为了发展

添加到您的 eas.json:

{
  "mcpServers": {
    "figma-to-code": {
      "command": "node",
      "args": ["PATH_TO_REPO/build/index.js"],
      "env": {
        "FIGMA_TOKEN": "your_figma_token",
        "FIGMA_FILE": "your_figma_file_id",
        "PROJECT_DIR": "your_project_directory"
      }
    }
  }
}

面向最终用户

在Cursor IDE中安装MCP服务器:

npx -y @smithery/cli@latest install @kailashg101/mcp-figma-to-code --client claude --config "{
  \"figmaToken\": \"YOUR_FIGMA_TOKEN\",
  \"figmaFile\": \"YOUR_FIGMA_FILE_ID\",
  \"projectDir\": \"YOUR_PROJECT_DIRECTORY\"
}"

用法

安装后,您可以在Cursor中使用以下提示:

提取所有成分

using the extract_components mcp tool get all components from figma and generate their corresponding react native components in components folder

提取特定成分

using the extract_components mcp tool get the [ComponentName] component from figma and generate its corresponding react native component in components folder

配置

config对象接受以下参数:

{
  "figmaToken": string,    // Your Figma access token
  "figmaFile": string,     // Your Figma file ID (from the URL)
  "projectDir": string     // Where to generate the components
}

特性

当前:

  • ✅ 从Figma中提取成分
  • ✅ 生成React Native组件
  • ✅ 维护组件层次结构
  • ✅ 搬运组件道具和类型
  • ✅ 支持嵌套组件

马上就来:

  • 🚧 GraphQL模式生成

发展

贡献或修改:

  1. 克隆存储库
  2. 安装依赖项:
npm install
  1. 构建:
npm run build
  1. 在本地运行:
npm start

环境变量

在本地运行时,您需要在您的 .env:

FIGMA_TOKEN=your_figma_token
FIGMA_FILE=your_figma_file_id
PROJECT_DIR=your_project_directory

错误处理

常见错误及解决方法:

  • “创建客户端失败”:检查是否正确设置了所有环境变量
  • “找不到组件页面”:确保你的Figma文件有一个名为“Components”的页面
  • “无法获取Figma文件”:验证您的Figma令牌和文件ID

许可证

麻省理工学院

______________________________________________________________________

对于问题和功能请求,请在GitHub上打开问题。

目录标签

目录标签

开发工具TypeScriptClaude设计转换本地部署ReactNativeFigma组件生成

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@smithery/cli@latest

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP