Design-to-code artifact pipeline for UI screenshots, Figma node data, and visual review.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by UI Design to Code.
get_run_modesReturns supported modes, target platforms, trigger examples, and the mode-selection prompt.
create_design_runCreates the run directory and `artifact-run-manifest.json`.
ingest_image_sourceRegisters a screenshot or image into:
ingest_figma_sourceRegisters Figma MCP node JSON, an optional screenshot, or both.
slice_image_assetsCrops bitmap/icon assets from a source image using a `layers.manifest.json` with `source_bbox` entries.
build_reference_analysisRegisters model-generated Reference Image Analysis before Vision IR. This captures the original pixel size, root frame, semantic top-level groups, text/media/icon/material inventory, bottom navigation, strict extraction settings, high-risk zones, and the audit plan used for later decoding.
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.
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/<run-id> 或 /private/tmp/ui-design-to-code/<run-id>。source_bbox 的源图精确 bitmap/icon 切图。npx @latest。artifact-run-manifest.json:一次运行的产物清单、保留策略和清理边界。design-source-manifest.json / source image manifest:设计源、像素尺寸、坐标系和输入假设。figma-source-dataset.json:Figma 节点、样式、组件、注释、截图和资产下载信息。配置 Figma token:
该命令会提示粘贴 token,并写入 ~/.codex/config.toml 的
[mcp_servers.ui_design_to_code.env]。如果要在脚本里使用:
配置 Figma token:
如果你在使用中遇到模式选择不清晰、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 | 是 | 对已有运行时实现进行截图验收,不修改代码。 |
目标平台示例:
| 输入类型 | 适用场景 | 推荐工具 |
|---|---|---|
| 截图或图片 | 设计源是渲染后的图像。 | 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。
项目内默认目录:
临时运行目录:
Codex 安装器会写入用户级 MCP 配置,并让运行时启动路径脱离网络依赖。
Codex plugin marketplace 安装:
安装后检查 MCP server:
该插件会把 ui_design_to_code 注册为:
仍然可以使用 npm 方式直接安装 MCP:
安装包路径:
Codex serve 命令:
macOS 每日更新任务:
更新命令:
当安装规格是 ui-design-to-code-mcp@latest 时,更新脚本每天 04:15 检查一次 npm latest,只有版本变化时才下载更新。更新后的包会在 Codex 下一次启动或重新加载该 MCP server 时生效。
Codex 配置示例:
卸载:
项目级配置:
安装:
卸载:
项目级安装:
用户级安装:
get_run_modes返回支持的执行模式、目标平台、触发示例和模式选择提示。
当用户提供 UI 截图、参考图、Figma 设计或 design-to-code 任务,但没有明确指定模式时,应先调用它。
典型输入:
create_design_run创建运行目录和 artifact-run-manifest.json。
关键入参:
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ui-design-to-code)<a href="https://allmcps.com/mcp/ui-design-to-code"><img src="https://allmcps.com/api/badge/ui-design-to-code?style=directory" alt="UI Design to Code on AllMCPs" /></a>