Figma Context MCP
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
제작자가 쓴 설명(영어 원문)
Design-to-code artifact pipeline for UI screenshots, Figma node data, and visual review.
이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.
이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.
쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.
필요한 것
어떤 앱을 쓰세요?
위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.
Claude Desktop → Settings → Developer → Edit Config를 열고 claude_desktop_config.json에 이 내용을 붙여 넣으세요
{
"mcpServers": {
"ui-design-to-code": {
"command": "npx",
"args": [
"-y",
"ui-design-to-code-mcp"
]
}
}
}터미널에서 이 명령어를 실행하세요
claude mcp add ui-design-to-code -- npx -y ui-design-to-code-mcp프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요
{
"mcpServers": {
"ui-design-to-code": {
"command": "npx",
"args": [
"-y",
"ui-design-to-code-mcp"
]
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
프로젝트의 .vscode/mcp.json에 붙여 넣으세요
{
"servers": {
"ui-design-to-code": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ui-design-to-code-mcp"
]
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.
선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.
이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.
내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.
누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 7일 점검
레지스트리 이름이 GitHub 계정 Kinglions 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요
내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요
내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요
레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.
해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.
레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.
내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).
GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(0.1.12)은 4개월 전 레지스트리에 올라왔어요.
Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Node.js도 있어야 해요.
같은 카테고리에는: Figma Context MCP, Claude Real Video, Figma MCP Server
같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.
카드 보는 법:★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
Let any LLM watch a video locally — and search everything it has ever watched.
The Figma MCP server brings Figma design context directly into your AI workflow.
제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.
中文 | English
MCP server for Codex, Cursor, and Claude Code that turns UI screenshots, source images, Figma MCP node JSON, and Figma-plus-screenshot hybrid input into traceable design-to-code artifacts.
npx -y ui-design-to-code-mcp@latest install --client codex
Use it when you need more than a one-shot screenshot-to-code prompt:
Links:
io.github.Kinglions/ui-design-to-code-mcpui-design-to-code-mcp 是一个用于 UI design-to-code 流程的 MCP server。它可以把 UI 截图、Figma MCP 节点 JSON,或 Figma 节点 + 截图的混合输入,接入一套结构化、可追踪、可校验的产物流水线。
它不替代真正写代码的 agent/model。它的职责是标准化运行目录、输入清单、Figma 数据集、中间 IR 合约、目标平台布局产物、代码生成记录、精确切图产物、视觉验收门禁、产物校验和清理流程。
generated/ui-design-to-code/ 或 /private/tmp/ui-design-to-code/ 。source_bbox 的源图精确 bitmap/icon 切图。npx @latest。artifact-run-manifest.json:一次运行的产物清单、保留策略和清理边界。design-source-manifest.json / source image manifest:设计源、像素尺寸、坐标系和输入假设。figma-source-dataset.json:Figma 节点、样式、组件、注释、截图和资产下载信息。npx -y ui-design-to-code-mcp@latest install --client codex
配置 Figma token:
ui-design-to-code-mcp setup-figma-token
该命令会提示粘贴 token,并写入 ~/.codex/config.toml 的 [mcp_servers.ui_design_to_code.env]。如果要在脚本里使用:
printf %s '<YOUR_FIGMA_TOKEN>' | ui-design-to-code-mcp configure-figma-token --client codex --stdin
npx -y ui-design-to-code-mcp@latest install \
--client cursor \ --scope project \ --project-dir .
配置 Figma token:
ui-design-to-code-mcp configure-figma-token --client cursor --scope project --project-dir . --token <YOUR_FIGMA_TOKEN>
npx -y ui-design-to-code-mcp@latest install \
--clients cursor,claude-code,codex \ --scope project \ --project-dir .
npx -y ui-design-to-code-mcp@latest doctor
npx -y ui-design-to-code-mcp@latest serve
如果你在使用中遇到模式选择不清晰、Figma token 检测不符合预期、视觉还原不稳定、资产同步路径错误、运行时验收失败或文档示例缺失,可以直接提交反馈:
提交时建议附带:
decode-only、plan-only、target-ir、codegen、codegen-with-auto-review 或 runtime-review。web-react、web-next、ios-uikit、ios-swiftui、android-compose、android-view。artifact-run-manifest.json、validate_pipeline 输出、visual-review-result.json、doctor 输出。当请求同时包含设计源和 design-to-code / design-decoding 意图时,客户端应先自动发现并调用 ui_design_to_code MCP,而不是先走纯本地实现流程。典型设计源包括 UI 截图、预览图、GPT Image mockup、Figma URL / node-id、Figma MCP 节点 JSON、Figma 截图或导出图。
不要为 MCP 存在性、版本、安装、doctor 或路由排查请求创建 run,除非用户同时提供设计源并要求解析、实现或视觉验收。
check_figma_token。configure_figma_token 自动写入全局 Codex 配置,不要创建 run。ui-design-to-code-mcp setup-figma-token。get_run_modes,把返回的模式选择提示展示给用户。recommendedMode 只能作为默认高亮选项,不能当作用户已同意。decode-only、plan-only、target-ir、codegen、codegen-with-auto-review 或 runtime-review 之一。create_design_run 创建独立产物运行目录。ingest_image_source 或 ingest_figma_source 登记源输入。ingest_figma_source 支持两种来源:外部已获取的 Figma 节点 JSON,或 Figma URL / fileKey / nodeId + token 直连 Figma REST API 由本 MCP 自行拉取节点树、截图和 image fills。build_reference_analysis 登记 Reference Image Analysis。audit_image_decoding 审计图片解析质量。run_codegen 或 run_codegen_with_auto_review 记录结果。validate_pipeline 校验完整产物链路。cleanup_design_run 清理生成产物。当前流程已经具备 token gate、mode gate、独立 runRoot、manifest 追踪、结构校验、视觉验收和 cleanup dry-run。后续更值得优化的是下面几类:
codegen-with-auto-review 和 runtime-review 需要宿主项目具备可运行命令、截图入口和目标页面定位。缺少这些条件时,应明确返回 blocked,而不是把未截图的实现标记为可交付。validate_pipeline 目前偏结构性、依赖少。未来可以在不显著增加安装成本的前提下,引入更完整的 JSON Schema 校验。| 模式 | 是否需要 target | 主要用途 |
|---|---|---|
decode-only | 否 | 只采集源输入、vision/compression/semantic 产物,不生成平台计划或代码。 |
plan-only | 否 | 生成跨平台节点数据和转换计划,不生成目标布局或代码。 |
target-ir | 是 | 登记目标平台布局 IR,不修改代码。 |
codegen | 是 | 生成或修改实现代码,并记录常规验证结果。 |
codegen-with-auto-review | 是 | 记录代码生成、视觉验收依据,并执行相似度门禁。 |
runtime-review | 是 | 对已有运行时实现进行截图验收,不修改代码。 |
目标平台示例:
ios-uikit / ios-swiftui / web-react / web-next / android-compose / android-view / cocos-creator
For cocos-creator, the target contract is Cocos Creator 3.x TypeScript. It uses a Canvas design-resolution policy, preserves aspect ratio, selects one proportional mode per orientation (fit_width, fit_height, show_all, or explicitly justified no_border), uses SafeArea/Widget for controls, a Node + Component hierarchy, UITransform/Widget/Layout, explicit ScrollView view/content nodes, and assets under assets/. It does not generate DOM/CSS, ExactFit-style distortion, or per-device-pixel breakpoints. See references/cocos-creator-development-rules.md and references/platform-adapters/cocos-creator.adapter-contract.json.
| 输入类型 | 适用场景 | 推荐工具 |
|---|---|---|
| 截图或图片 | 设计源是渲染后的图像。 | ingest_image_source |
| Figma 节点 JSON 或 Figma REST 直连 | 需要结构、命名、文本、组件、样式和布局元数据。 | ingest_figma_source |
| Figma 节点 + 截图 / REST 导出截图 | 同时需要结构化信息和像素级视觉基准。 | ingest_figma_source |
能同时拿到 Figma 节点和截图时,优先使用混合输入:Figma 节点提供结构化信息,截图提供像素级视觉基准,便于后续视觉复核。
所有流程都从 create_design_run 开始。它会创建独立 runRoot 和 artifact-run-manifest.json。
项目内默认目录:
generated/ui-design-to-code/<timestamp>-<slug>/
artifact-run-manifest.json source/ figma/ analysis/ vision/ compression/ semantic/ cross-platform/ targets/ assets/ qa/ review/
临时运行目录:
/private/tmp/ui-design-to-code/<timestamp>-<slug>/
Codex 安装器会写入用户级 MCP 配置,并让运行时启动路径脱离网络依赖。
Codex plugin marketplace 安装:
codex plugin marketplace add Kinglions/ui-design-to-code-mcp --ref main
codex plugin list --marketplace ui-design-to-code codex plugin add ui-design-to-code@ui-design-to-code
安装后检查 MCP server:
codex mcp list
该插件会把 ui_design_to_code 注册为:
npx -y ui-design-to-code-mcp@latest serve
仍然可以使用 npm 方式直接安装 MCP:
npx -y ui-design-to-code-mcp@latest install --client codex
安装包路径:
~/.codex/mcp-packages/ui-design-to-code-mcp
Codex serve 命令:
~/.codex/bin/serve-ui-design-to-code-mcp
macOS 每日更新任务:
~/Library/LaunchAgents/com.wuyb.codex.update-mcp-packages.plist
更新命令:
~/.codex/bin/update-mcp-packages
当安装规格是 ui-design-to-code-mcp@latest 时,更新脚本每天 04:15 检查一次 npm latest,只有版本变化时才下载更新。更新后的包会在 Codex 下一次启动或重新加载该 MCP server 时生效。
Codex 配置示例:
[mcp_servers.ui_design_to_code]
command = "/Users/ /.codex/bin/serve-ui-design-to-code-mcp" args = [] startup_timeout_sec = 30
卸载:
npx -y ui-design-to-code-mcp@latest uninstall --client codex
项目级配置:
{
"mcpServers": { "ui-design-to-code": { "command": "npx", "args": ["-y", "ui-design-to-code-mcp@latest", "serve"] } } }
安装:
npx -y ui-design-to-code-mcp@latest install \
--client cursor \ --scope project \ --project-dir .
卸载:
npx -y ui-design-to-code-mcp@latest uninstall \
--client cursor \ --scope project \ --project-dir .
项目级安装:
npx -y ui-design-to-code-mcp@latest install \
--client claude-code \ --scope project \ --project-dir .
用户级安装:
claude mcp add-json ui-design-to-code \
'{"type":"stdio","command":"npx","args":["-y","ui-design-to-code-mcp@latest","serve"]}' \ --scope user
get_run_modes返回支持的执行模式、目标平台、触发示例和模式选择提示。
当用户提供 UI 截图、参考图、Figma 设计或 design-to-code 任务,但没有明确指定模式时,应先调用它。
典型输入:
{ "requestText": "convert this screenshot to web code" }
create_design_run创建运行目录和 artifact-run-manifest.json。
关键入参:
workspace:生成目录所在项目根目录。slug:可读的 run 名称后缀。mode:执行模式。targets:target/codegen/review 模式必填。useTmp:为 true 时写入 /private/tmp。返回:
runRootmanifestPathmodeingest_image_source把截图或图片登记为源输入。
输出:
source/design-source-manifest.json
source/page.source-manifest.json
关键入参:
runRootimagePathsourceIdwidthPx、heightPxknownViewportlogicalUnitingest_figma_source登记 Figma 输入源。支持:
figma.fileKey / figma.nodeId,并通过 apiToken 或环境变量(默认尝试 FIGMA_API_TOKEN、FIGMA_ACCESS_TOKEN、FIGMA_OAUTH_TOKEN)让 MCP 直接调用 Figma REST API。projectRoot,MCP 会在下载完成后把资产自动同步到目标工程的默认资源目录,同时保留 runRoot 中的归档副本。输出:
source/design-source-manifest.json
figma/figma-source-dataset.json figma/figma-node-index.json figma/figma-asset-plan.json figma/raw-node-response.json figma/raw-file-metadata.json figma/raw-image-fills.json figma/figma-asset-downloads.json targets/asset-sync-manifest.json
关键入参:
runRootfigmaUrlfigma.fileKeyfigma.nodeIdnodeJson 或 nodeJsonPathscreenshotPathfigmaBoundsfetchFromApiapiToken / tokenEnvVardownloadScreenshot앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요