layerwright MCP란?
HTML 및 Claude 디자인을 편집 가능한 Figma 레이어로 변환하고, 기존 React 컴포넌트를 사용하여 Figma 프레임을 코드로 변환합니다. 10개 도구를 제공합니다. 예: import_html_to_plan, figma_execute_plan, figma_preview_plan.
프로젝트 README에서 생성된 요약
layerwright MCP server 정보
개발자는 HTML 및 Claude 디자인을 편집 가능한 Figma 레이어로 변환하거나, Figma 프레임을 React 코드로 변환하여 디자인과 코드 사이의 간극을 좁힐 수 있습니다. 이 도구는 API 키, 클라우드 계정 또는 외부 로그인이 필요 없이 로컬 환경에서 작동하며, localhost를 통해 Figma desktop plugin과 직접 통신합니다. 디자인 시스템과 코드베이스 사이의 단일 진실 공급원(Single Source of Truth)을 유지하려는 Claude Code, Codex 또는 Cursor 사용자인 엔지니어와 디자이너를 위해 설계되었습니다.
이 server는 독립적인 HTML을 Auto Layout이 적용된 Figma 프레임으로 변환하는 import_html_to_plan 및 디자인 속성을 읽는 figma_inspect와 같은 특정 도구를 제공합니다. 요소를 기존 컴포넌트 및 변수에 매핑하여 디자인 시스템 동기화를 자동화합니다. 디자인에서 구현 단계로 넘어갈 때, React 또는 Next.js 프로젝트를 스캔하여 기존 컴포넌트를 제안하므로 Claude가 관리되지 않는 새로운 요소를 만드는 대신 실제 코드를 사용하여 프레임을 구현하도록 보장합니다. 이를 통해 디자인은 컴포넌트를 기반으로 구축되고 코드는 원래의 디자인 의도와 일치하는지 검증되는 폐쇄 루프를 형성합니다.
활용 사례
- 1HTML 디자인을 Figma로 변환독립적인 HTML 내보내기 결과물을 Auto Layout, 텍스트 스타일 및 벡터 아이콘이 포함된 편집 가능한 Figma 프레임으로 변환합니다.
- 2디자인 시스템 동기화 자동화Figma 내의 하드코딩된 색상과 일반 텍스트를 기존 디자인 시스템 변수 및 텍스트 스타일로 교체합니다.
- 3Figma 디자인을 React로 구현AI agent에게 코드베이스에 이미 존재하는 React 컴포넌트를 사용하여 특정 Figma 프레임을 구축하도록 지시합니다.
- 4화면의 모바일 버전 생성Figma plugin 창에서 데스크톱 디자인의 모바일 크기 버전을 직접 요청합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
layerwright MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 layerwright MCP 설치
$ claude mcp add layerwright -- npx -y layerwrightCursor에 layerwright MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"layerwright": {
"command": "npx",
"args": [
"-y",
"layerwright"
]
}
}
}VS Code에 layerwright MCP 설치
.vscode/mcp.json
{
"servers": {
"layerwright": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"layerwright"
]
}
}
}VS Code CLI에 layerwright MCP 설치
$ code --add-mcp '{"name":"layerwright","type":"stdio","command":"npx","args":["-y","layerwright"]}'Claude Desktop에 layerwright MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"layerwright": {
"command": "npx",
"args": [
"-y",
"layerwright"
]
}
}
}Codex에 layerwright MCP 설치
$ codex mcp add layerwright -- npx -y layerwrightCodex config.toml에 layerwright MCP 설치
~/.codex/config.toml
[mcp_servers.layerwright] command = "npx" args = ["-y", "layerwright"]
Gemini CLI에 layerwright MCP 설치
$ gemini mcp add -s user layerwright npx -- -y layerwrightGemini settings.json에 layerwright MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"layerwright": {
"command": "npx",
"args": [
"-y",
"layerwright"
]
}
}
}layerwright MCP 도구 10
README에서 감지됨import_html_to_planfigma_execute_planfigma_preview_planfigma_editfigma_export_imagefigma_linkfigma_import_assetsfigma_migratefigma_cleanuplayerwright_memory
| import_html_to_plan | — | |
| figma_execute_plan | — | |
| figma_preview_plan | — | |
| figma_edit | — | |
| figma_export_image | — | |
| figma_link | — | |
| figma_import_assets | — | |
| figma_migrate | — | |
| figma_cleanup | — | |
| layerwright_memory | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능shayan-m81/layerwright is public and reachablegithub.com/shayan-m81/layerwright ↗통과
- 패키지가 이 저장소를 소스로 명시layerwright names shayan-m81/layerwright as sourcenpmjs.com/package/layerwright ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for layerwrightnpmjs.com/package/layerwright/v/1.4.1#provenance ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-12github.com/shayan-m81/layerwright ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from layerwright통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음10 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기Layerwright
Turn Claude Design and Claude Code designs into native, editable Figma files, and Figma designs into code that uses your own components.

Select a desktop screen in Figma, press Mobile in the Layerwright window and send it to a Claude Code session. The session builds 390 px mobile versions of two right-to-left Persian screens with Auto Layout, its cursor showing where it works. The window lists the connected sessions and each request's answer. (2× speed.)
npx layerwright init # in your project, then open the plugin in Figma desktop (see Quickstart)
Layerwright is an open-source MCP server and Figma plugin for Claude Code, Codex and Cursor. It imports HTML, such as a Claude Design "standalone HTML" export, into Figma as real frames with Auto Layout, text, images and vector icons. It builds new screens from your own Design System: real component instances, variables and text styles. And it works the other way: select a Figma frame and Claude implements it in your codebase with your existing components and tokens, then checks that it did.
Why
Claude Design exports to HTML, PDF, PPTX and Canva, but not to Figma. Claude Code can write UI code, but it has no native way to put a design into a Figma file your team can edit. Most "HTML to Figma" tools either paste a flat picture or need a cloud account.
Layerwright closes that gap locally:
- Claude Design to Figma: export standalone HTML, run one command, and you get editable Figma frames.
- Claude Code to Figma: ask Claude for a screen or a flow, and it is built from your Design System's components.
- Figma to code: select a frame, and Claude implements it with the React components you already have (not a new copy of each button), mapped once and shared with your team.
- Ask from Figma: select layers, press Mobile version or Build in code in the plugin window, and a session starts on it.
- No API keys, no cloud, no account. Everything runs on your machine. The plugin only talks to
localhost.
Features
Bring designs into Figma
- HTML to Figma import (
import_html_to_plan)- Flexbox becomes Auto Layout: direction, gap, padding, alignment and wrap. Fixed CSS sizes stay fixed.
- Colours, borders, radii, shadows, gradients, fonts, line height and letter spacing come across.
- Text with inline
<b>,<span>and<a>is one text layer with styled ranges. - Pictures come along: images (PNG, JPEG, GIF, WebP, AVIF), SVG files and inline SVG as vectors, sprite icons, CSS background images, CSS-mask icons in their colour, icon fonts and
<canvas>, in both modes. - Desktop (1440) and mobile (390) screens are rendered side by side.
- RTL is supported (Persian, Arabic, Hebrew). Rows keep their visual order and text stays right-aligned.
- Pixel-faithful mode (
figma_import_html) for review boards and art-heavy pages: exact layers, variant sets built from states, and instance swaps. - AI design to Figma from a prompt. Claude writes a typed Design Plan (a JSON DSL). The plan is validated and resolved against your components, variables and text styles, then built deterministically. Claude never writes Figma plugin code.
- Prototypes. Click, hover and timed interactions, navigate / overlay / swap / back, smart animate and push transitions, scrolling frames and flow starting points, in plans or on existing frames.
- Icons and pictures in one step (
figma_import_assets): a folder of SVGs becomes editable vectors (or components, named by their path), pictures become image layers, in a grid on the page. - No AI needed for a plain import.
npx layerwright import ./design.html --to-figmabuilds it in the open Figma file. - Fonts from exports:
npx layerwright fonts ./export --installinstalls the TTF/OTF fonts a design ships.
Use your Design System
- Design System automation. After a Design System scan, buttons, inputs and links become your real Figma components when they clearly match, and you can map any element yourself (
mappings: [{ selector, component }]). - Design System sync. After an import,
figma_analyze_design({ mode: "sync" })swaps buttons and pills for your DS components (the variant that looks closest), gives text your text styles by size and weight, and binds colours to your variables and styles. You approve it; originals are kept hidden. - Audit and fix existing frames. Hard-coded colours become variables, raw text gets text styles, and custom buttons become component instances, in groups you can pick. Originals are hidden, never deleted.
- Work on existing designs (
figma_edit). Rename, move, duplicate, delete, restyle (font weight, size and family, text and fill colours), and turn existing frames into components or variant sets with text properties, in one undo step. - Figma back to a plan. Any subtree exports as an editable Design Plan to clone, refactor or implement in code: layout, tokens, text styles, instances, gradients, shadows, blurs, shapes, and vectors or boolean shapes as SVG icons.
Figma to code
figma_inspect → code_scan_components → code_mapping → code_verify_usage
- Reads the frame as a plan: layout, spacing and colour tokens, text styles, and every component instance with its variant and properties.
- Scans your React / Next.js codebase for exported components (and Tailwind or shadcn/ui) and suggests which code component each Figma component is.
- The mappings you confirm are saved in
.layerwright/mapping.json; commit it and the whole team reuses them. - Claude implements the frame with the mapped components and your theme tokens;
code_verify_usagethen flags design components that weren't used, raw<button>/<input>duplicates, and arbitrary Tailwind values.
Work together with your agents
- Several sessions, several files. Claude Code, Codex and Cursor sessions on your computer share one connection to the plugin, with no port to configure. Open Layerwright in several Figma files at once: each stays connected, and each session works in one file (the one you send it a request from, or the one it's told to use). A change never lands in another file than the one the session works in. Sessions in a project that uses Layerwright join when they start; any other session joins on its first Figma call, and a session that hasn't used Layerwright for 30 minutes leaves until its next Figma call, so the plugin window lists only the sessions you use with Figma now, and what each is doing (sessions name themselves after their task). Your selection and requests from the window go to the session you pick there, until you pick another, and a session never overwrites a layer another one just changed.
- Ask from Figma. Select layers in the plugin window, pick a session and send a request: Build in code, Polish design, Make component, Mobile version, or your own words. A Claude Code session with the plugin starts on it by itself (the plugin's monitor wakes the session); Codex gets it on its next Figma step or with
/layer:inbox. Progress and the session's answer come back to the window. - Notes on the canvas. Type a text layer that starts with
@<session>(or@claudewhen one session is connected) on the frame it's about, and that session gets it like a request from the window. Only notes you type count: edits by collaborators and text Layerwright writes never start a task. - AI cursor and a working toast. While a session works in Figma, a cursor in its colour shows it like a collaborator's, from its first step to the end of the task: it reads where the session reads, drag-selects and works on what it changes, thinks between steps, and goes once the session is done or quiet. Its tag is one short line: the session's name and what it's doing. It stays on while you keep working in the file (select, edit, change page), so you always see which session is at work and where; while the session waits for your answer it waits still, just above the frame, and it never takes your selection. Every undo step is closed with the cursor taken off the canvas, so no step holds one. A toast at the bottom of the canvas says what a session is doing too; it is never a layer. Questions show in the plugin window and on the cursor (Settings → AI cursor turns both off).
- Figma links. Ask for a link to the selection, a frame, a section or a page (
figma_link); what a session builds or selects comes back with links. Paste a Figma link to a session and it finds the layer, opens its page and works in its file. - A guide in the window. The ? in the plugin window's header explains each tab, the actions and canvas notes. It opens by itself the first time.
/layer:commands in Claude Code and Codex.initinstalls the Layerwright plugin for the agents it finds (it asks; Claude Code by default):/layer:help,/layer:connect,/layer:import,/layer:design,/layer:edit,/layer:code,/layer:check,/layer:components,/layer:prototype,/layer:shot,/layer:skills,/layer:inbox,/layer:update,/layer:doctor,/layer:report.
Check, learn and stay safe
- You see what was built.
figma_export_imagerenders any node, and compares it with the source HTML (or another node) with a diff heatmap.save: truewrites the PNG to.layerwright/exports/so the agent can show it to you (/layer:shot). - Accessibility and critique. WCAG contrast (on the real background), touch-target and text-size checks, plus consistency signals; Claude uses them with a picture in a critique loop to polish what it builds.
- Safe by default.
- Every run is one undo step, and a failed run rolls back completely.
- Results are checked against the plan: structure, sizes, variants, text overrides and prototype links.
- Existing nodes change only after you approve; deleting without approval only hides and labels a layer.
- Everything Layerwright creates is tagged, so
figma_cleanupcan list and remove a session's leftovers. - Only your paired plugin window and your own sessions can use the local connection: web pages in your browser can't.
- Learns per project. Font substitutions, mappings and component choices are reused next time, your corrections are kept as notes, and recurring problems come with a hint (
.layerwright/memory.json, shareable).npx layerwright reportdrafts a redacted issue from them for you to send. - Updates in one step. When a newer Layerwright is out, Claude Code says so as a session starts (once a day), and so do the plugin window and
doctor./layer:update, the window's Update button (a session does it for you) ornpx -y layerwright@latest update(any folder) updates the Figma plugin, the/layercommands and the server they run; then/reload-plugins(or a new session) and reopen the plugin in Figma. - Your own skills. Next to the skills that ship with it, press Create a skill with Claude in the plugin window's Skills tab: say what it should do, and it opens Claude (the app, a terminal or VS Code) with
/layer:skills new …filled in, or asks a connected session, and Claude drafts it with you. You can also add one from a link, or write it yourself in the Skills tab (edit it there later). They stay on your computer across updates.
Quickstart (3 steps)
Requirements: Node.js 20+, Figma desktop, Claude Code or Codex (or Cursor: npx layerwright init --cursor).
# 1. In your project folder
npx layerwright init
init asks which agents get the Layerwright plugin (the ones it finds are preselected; --agents claude,codex or --no-agents skip the question), installs it with their own claude plugin / codex plugin commands, and pairs the Figma plugin with this computer.
- In Figma desktop (macOS or Windows: Figma has no desktop app for Linux, and the browser can't run development plugins), go to Plugins → Development → Import plugin from manifest…. The plugin sits in a hidden folder (
~/.layerwright/figma-plugin/manifest.json), soinitcopies that path to your clipboard and shows the folder: in the file dialog press ⌘⇧G (Windows: click the File name box), paste, Enter. You do this once; afterwards run Plugins → Development → Layerwright and keep its small window open.npx layerwright pluginshows these steps again. - Start a new Claude Code or Codex session, type
/layer:help, or ask:- "Import ./design.html into Figma": a Claude Design HTML export becomes editable frames.
- "Create a sign-up flow in Figma using our Design System": new screens built from your components.
- Select a frame in Figma, then "Implement the selected Figma frame in code using our components": Figma → code with your mapped React components and theme tokens, checked afterwards.
Requests from the Figma window wake a Claude Code session by themselves: the plugin runs a monitor (layerwright inbox-watch) whose notifications reach the session. npx layerwright claude also turns on Claude Code channels (a research preview; Team and Enterprise organizations must enable them first). In Codex a request waits for the session's next Figma step or /layer:inbox. On Windows, Claude Code's monitor needs Git for Windows (its Git Bash); without it a request waits for the session's next Figma step or /layer:inbox too.
Install from GitHub instead: claude plugin marketplace add shayan-m81/layerwright then claude plugin install layer@layerwright; for Codex, codex plugin marketplace add shayan-m81/layerwright then codex plugin add layer@layerwright. npx -y layerwright@latest update updates it (and the Figma plugin) later.
Another MCP client (Claude Desktop, VS Code, Windsurf)? Add the same layerwright server to its MCP config and start from its prompts: figma_design (the whole guide), html_to_figma, build_in_figma, change_figma or figma_to_code. They are built from the same skill, so every client follows the same workflow.
Want these rules always in Claude's context? Paste this prompt into your project's CLAUDE.md.
Something not working? Run npx layerwright doctor.
For HTML import, Layerwright needs a Chromium. It uses Google Chrome if you have it installed. Otherwise run npx layerwright doctor: it prints the exact command that installs the Chromium it needs (npx -y playwright-core@<version> install chromium; add --with-deps on a fresh Linux).
Want to try the conversion without Figma? npx layerwright import ./design.html prints what would be built.
Want it in Figma without Claude? Run the plugin, then npx layerwright import ./design.html --to-figma --page "Designs"
(--faithful for exact layers, --scan to use your Design System's components).
How it works
flowchart LR
A[Claude Code / Codex / Cursor] -- MCP / stdio --> B[layerwright server<br/>one per session]
H[HTML file or folder] -- headless Chromium --> B
B -- "Zod-validated Design Plan<br/>resolved against your DS" --> B
B -- ws://127.0.0.1 --> K[hub<br/>one per computer]
K -- ws://127.0.0.1 --> C[Figma plugin]
C -- "fixed Plugin API calls<br/>one undo step" --> D[(Figma file)]
- Plan. Claude, or the HTML importer, produces a Design Plan: a small, typed JSON DSL of screens, frames, text, components, tokens and images.
- Validate and resolve. The server checks the plan with Zod. It then resolves every component, variant, property, variable and text style against a cached scan of your Figma file. Unknown names come back as errors with suggestions and never reach Figma.
- Execute. The plugin builds the resolved plan with fixed Plugin API calls. There is no
evaland no model-written code. - Verify. The result is re-inspected and compared with the plan and, for HTML imports, with the page's rendered boxes.
figma_export_imageshows the result next to the source.
Every session reaches Figma through one small local process, the hub. The first session that needs it starts it, and it stops by itself a minute after the last session leaves. It routes each request to the right Figma file's plugin window and the answer back to the session that asked, so several agents can work in one file, or in several files at once.
Read more in docs/architecture.md. The DSL is documented in docs/dsl.md.
MCP tools
| Tool | What it does |
|---|---|
import_html_to_plan |
HTML file or folder → editable Design Plan (Auto Layout, DS components, your own mappings). Returns a planId |
figma_execute_plan |
Builds a plan in Figma: one undo step, rollback on failure, automatic verification |
figma_preview_plan |
Validates and resolves a hand-written plan and returns a summary |
figma_edit |
Rename, move, duplicate, set, delete, resize to fit, group / ungroup, boolean shapes, componentize (variants, text properties), swap instances, bind variables, apply styles, annotations, prototype links and flows |
figma_export_image |
A node as an image; compared with the source HTML or another node, with a diff heatmap. save: true writes it to .layerwright/exports/ to show the user |
figma_inbox / figma_reply |
Requests the user sent from the Figma window to this session, and the answer shown back in the window |
figma_status / figma_scan_design_system / figma_get_design_context |
Connection, page and the open Figma files (file to switch), Design System scan (components, variants, variables, styles, duplicate names), task-scoped context |
figma_inspect / figma_verify / figma_select |
Snapshots (tree, summary, text, instances, or the subtree as a plan, saved to a file with save), plan-vs-canvas checks, select and zoom (switches page) |
figma_link |
Links to the selection, layers or the page, and the file's own link. Any layer argument also takes a Figma link |
figma_analyze_design / figma_apply_transformations |
Audit a frame against the DS, or mode: "sync" after an import; apply the groups you approve |
figma_import_html / figma_pages / figma_foundations |
Pixel-faithful import, page setup, variables and text styles |
figma_import_assets |
Icons and pictures from files or folders: SVGs as vectors (or components), PNG/JPEG/GIF/WebP/AVIF as images, in a grid |
figma_migrate |
Move every instance of one component set to another, variant by variant, keeping overrides (dry run first) |
figma_cleanup |
List (and with approval remove) what Layerwright made in this session |
layerwright_memory |
What the project remembers (fonts, mappings, component choices, notes, recurring problems); add notes or forget entries |
code_scan_components / code_mapping / code_verify_usage |
Figma to code: find your code components, map them to Figma components, check the implementation uses them |
FAQ
Is this an official Anthropic or Figma product? No. It is an independent open-source project that works with Claude Code and Figma.
Does it need an API key, an account or a server?
No. Claude Code runs the MCP server locally, and the Figma plugin connects to it on localhost. Nothing is uploaded.
Can I use it without Claude Code?
Yes. npx layerwright import ./design.html --to-figma builds an HTML file in Figma with no AI at all, and any MCP client can call the tools. The skill and the design workflows (building from a prompt, componentizing, prototyping) are written for Claude Code.
Can it make prototypes?
Yes. Plans and figma_edit set click, hover, press, drag and timed interactions (navigate, overlay, swap, scroll to, change to, back, close, open URL) with transitions, scrolling frames and flow starting points. Overlays open centred: the Plugin API can't set their position.
Does it work with the official Figma MCP? It doesn't need it. If it's connected, Claude can use its library search to find a component your file doesn't use yet and pass its key to Layerwright.
Does the output use Auto Layout? Yes, where the HTML uses flexbox or evenly spaced stacks. Grid and overlapping layers become frames with absolutely positioned children, so the result still looks right.
Will it use my Design System?
Yes. Scan the file that has your components (figma_scan_design_system), and imported buttons, inputs and links become instances of them. Anything that doesn't match stays a styled frame.
Does it work with right-to-left languages? Yes. Direction, text alignment and row order are preserved. Fonts such as Vazirmatn are matched to their real style names.
Can a web page or another app talk to it?
No. The hub listens on 127.0.0.1 only and refuses browser connections. Sessions need the per-computer key that init creates (~/.layerwright/key), and only the plugin window paired with that key can send requests into your sessions. Canvas notes count only when you type them, not when a collaborator does.
Does it work in the Figma browser app? Development plugins need Figma desktop.
Troubleshooting
Start with npx layerwright doctor. It checks Node, .mcp.json, the skill, the plugin files, the running server, the plugin connection and Chromium, and it prints a fix for each problem. More cases are covered in docs/troubleshooting.md.
layerwright MCP 질문
layerwright MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add layerwright -- npx -y layerwright를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
layerwright MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
layerwright MCP는 어떤 도구를 제공하나요?
10개 도구를 제공합니다. 예: import_html_to_plan, figma_execute_plan, figma_preview_plan, figma_edit, figma_export_image.
Layerwright를 사용하려면 API 키나 클라우드 계정이 필요한가요?
아니요, 모든 작업은 로컬 환경에서 실행되며 플러그인은 localhost와만 통신합니다.
Auto Layout이 적용된 상태로 HTML을 Figma로 변환할 수 있나요?
네, 방향, 간격, 패딩, 정렬 및 wrap을 포함하여 HTML을 Auto Layout이 적용된 실제 Figma 프레임으로 가져옵니다.
기존 React 컴포넌트는 어떻게 처리하나요?
코드베이스를 스캔하여 기존 컴포넌트를 찾아 매핑을 제안합니다. 이를 통해 Claude가 실제 컴포넌트와 토큰을 사용하여 Figma 프레임을 구현할 수 있습니다.