# UI Design to Code [Health: Active]

**Category:** 📐 Architecture & Design  
**Repository:** https://github.com/Kinglions/ui-design-to-code-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 531  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ui-design-to-code

## Description
Design-to-code artifact pipeline for UI screenshots, Figma node data, and visual review.

## Tools
Capabilities this server exposes over MCP:

- **get_run_modes** — Returns supported modes, target platforms, trigger examples, and the mode-selection prompt.
- **create_design_run** — Creates the run directory and `artifact-run-manifest.json`.
- **ingest_image_source** — Registers a screenshot or image into:
- **ingest_figma_source** — Registers Figma MCP node JSON, an optional screenshot, or both.
- **slice_image_assets** — Crops bitmap/icon assets from a source image using a `layers.manifest.json` with `source_bbox` entries.
- **build_reference_analysis** — Registers 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.
- **build_semantic_ir** — Registers model-generated Platform-neutral Semantic UI IR.
- **build_cross_platform_nodes** — Registers Cross-platform Node Data.
- **build_target_ir** — Registers target-platform layout IR for a selected target.
- **run_codegen** — Records implementation output and validation summary without enforcing visual review.
- **run_codegen_with_auto_review** — Records implementation output plus visual review evidence.
- **validate_pipeline** — Validates an existing run by checking required artifacts and traceability links between vision, compression, semantic, cross-platform, and target planning artifacts.
- **audit_image_decoding** — Audits screenshot/image decoding artifacts. It checks that reference analysis matches source dimensions, top-level groups stay in bounds, audit sections are present, text runs carry font metrics, media/icon regions are accounted for, semantic nodes keep traceability, single-line text avoids wrap ri…
- **cleanup_design_run** — Runs artifact cleanup in dry-run mode by default.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ui-design-to-code": {
    "command": "npx",
    "args": ["-y","ui-design-to-code-mcp@latest"]
  }
}
```

## Documentation

## What UI Design to Code does

The UI Design to Code MCP server structures a design-decoding workflow around an isolated run directory. It accepts screenshots, other source images, Figma node JSON, or a combination of Figma data and screenshots. Each run receives an `artifact-run-manifest.json` that records its files, retention rules, and cleanup boundary.

The pipeline can preserve relationships between source pixels, visual analysis, semantic nodes, cross-platform data, target layout plans, implementation records, and review evidence. It is intended for agents that need an auditable sequence of artifacts instead of generating final code directly from a single image. The host agent or model remains responsible for producing the intermediate IR content and writing or modifying application code.

## How it works

A typical UI Design to Code workflow starts with `get_run_modes`, which reports available modes and target platforms. After a mode is selected, `create_design_run` creates the run directory. `ingest_image_source` registers image input, while `ingest_figma_source` handles supplied Figma node JSON or can retrieve Figma data through a URL, file key, or node ID when a token is available.

For image-based work, `build_reference_analysis` records image dimensions, top-level groups, text and media regions, navigation, high-risk areas, and the planned audit. Later tools register semantic UI data, cross-platform node data, and a target-platform layout IR. Supported target examples include Web React, Web Next, iOS UIKit, iOS SwiftUI, Android Compose, and Android View.

The workflow can run in decode-only, plan-only, target-IR, codegen, codegen-with-auto-review, or runtime-review modes. `run_codegen` records implementation and validation results, while `run_codegen_with_auto_review` also records visual review evidence. `validate_pipeline` checks required artifacts and traceability links, and `cleanup_design_run` supports dry-run cleanup.

## Tools and capabilities

The UI Design to Code MCP server exposes tools for:

- Discovering modes, platforms, and trigger examples.
- Registering screenshots, source images, Figma nodes, and hybrid inputs.
- Cropping bitmap or icon assets from `source_bbox` entries in a layer manifest.
- Recording reference analysis, semantic UI IR, cross-platform node data, and target layout IR.
- Auditing image-decoding artifacts, including source dimensions, bounds, text metrics, media coverage, and traceability.
- Recording code-generation results and optional visual review evidence.
- Validating the artifact chain and previewing cleanup operations.

Installers and setup commands are documented for Codex and Cursor, and the README identifies Claude Code as a supported client. Figma workflows require a configured token when the server must retrieve data from Figma directly. The material does not specify a standalone environment-variable name for that token.

## Limitations and notes

This tool does not replace the coding agent or model. It registers, validates, and tracks artifacts, but the calling agent or model generates Vision IR, compression data, semantic IR, and actual implementation code. Automatic review and runtime review also depend on a host project with a runnable command, screenshot entry point, and a way to locate the target page.

It is not intended for ordinary frontend tasks without a design source, or for installation and diagnostic questions that do not include a design-to-code request. Structural validation is the documented focus of `validate_pipeline`; the material does not claim complete JSON Schema validation or fully automatic visual-to-code conversion.

_Full upstream README: https://allmcps.com/mcp/ui-design-to-code/readme_

