figma-to-react-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@figma-to-react-mcp convert this Figma file to React"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
figma-to-react-mcp
An MCP server that helps Claude (or any MCP client) turn a whole Figma file into a React project using Ant Design v5, AG Grid (for all tables), ApexCharts (for all charts), and Tailwind CSS (for layout/styling) — and optionally export the mobile-only screens as a React Native (Expo) app.
Whole-file conversion:
convert_figma_to_reactnow takes a whole Figma file and generates one page per top-level screen across every page/canvas — not one frame at a time. When it finds mobile-only screens (width ≤ 480px) it asks whether to also export them as a React Native app.
It does the heavy lifting the model can't do well on its own:
pulls the design from the Figma API and simplifies the giant node tree into a compact, token-efficient structure — collapsing repeated rows/cards, pruning pass-through wrappers, truncating large tables to a few sample rows, and stripping chart nodes down to their text (legend/axis labels) since the plotted vectors are useless to the model,
returns that tree as a compact outline (~half the tokens of pretty JSON) instead of a giant JSON dump,
attaches a semantic role and suggested Tailwind classes to each node,
generates ready-to-use
.tsx— antd components by role, Tailwind for layout, AG Grid (withcolumnDefsderived from table headers) for tables, ApexCharts (<ReactApexChart>with the chart type guessed from the layer name and labels/categories lifted from the design's text) for charts, repeated rows expanded to.map(),scaffolds and writes a whole Vite project to disk (package.json, tailwind config, CSS vars, antd
ConfigProvidertheme, a shared ApexCharts palette from the design's colors) so boilerplate never enters the model's context,extracts design tokens, exports icons/images,
ships a conversion guide (as a tool, prompt, and resource) so generated code follows the antd + AG Grid + ApexCharts + Tailwind conventions consistently.
Tools
Tool | What it does |
| Whole file, one-shot. Fetch → tokens → enumerate every screen across all pages → scaffold project → generate one page per screen, all written to |
| Fetch a file/frame → compact outline (or minified JSON) with roles + Tailwind hints, repeats collapsed. Call first for manual flows. |
| Generate the full Vite + antd + AG Grid + ApexCharts + Tailwind skeleton with tokens wired in, written to disk. |
| Turn one frame into a ready-to-use |
| Colors, type, spacing, radii, shadows → tailwind config + CSS vars + antd theme. |
| Render node ids to svg/png/jpg URLs; optionally save to disk. |
| The mapping rules (also a prompt |
Why this uses fewer tokens
The design comes back as an indented outline with repeated siblings collapsed (
x40) and big tables truncated to a header + a few sample rows — not the full node tree as pretty JSON.Generated code and project boilerplate are written to disk, so they never pass through the model's context.
convert_figma_to_reactreturns only a summary (files written, primary color).The model's job shrinks from writing every component from a huge tree to refining a working scaffold.
Related MCP server: Figma MCP Server
Setup
Get a Figma token: figma.com → Settings → Personal access tokens. Copy
.env.exampleto.envand paste it in (or pass it via the client config below).Install & build:
npm install npm run buildPoint your MCP client at it (examples below), using an absolute path to
dist/index.js.
Claude Desktop / Cursor (mcpServers JSON)
{
"mcpServers": {
"figma-to-react": {
"command": "node",
"args": ["/ABSOLUTE/PATH/figma-to-react-mcp/dist/index.js"],
"env": { "FIGMA_ACCESS_TOKEN": "figd_your_token_here" }
}
}
}Claude Code (CLI)
claude mcp add figma-to-react \
--env FIGMA_ACCESS_TOKEN=figd_your_token_here \
-- node /ABSOLUTE/PATH/figma-to-react-mcp/dist/index.jsRestart the client, then try: "Use figma_to_react on <your Figma frame URL>."
Typical flow the model follows
Fast path (server does the lifting):
convert_figma_to_reactwith{ figmaUrl, outDir }(pass a whole file URL or bare file key) → fetches, tokenizes, enumerates every top-level screen, scaffolds the project, and generates one page per screen to disk. Returns a short summary.If the file has mobile-only screens (≤480px), the tool asks whether to also export them as an Expo React Native app. Clients that support MCP elicitation show this prompt inline; otherwise pass
exportMobileToReactNative: true(orfalse) explicitly. The Expo app is written to<outDir>-mobile(override withreactNativeOutDir).download_figma_images→ pull any icons/images.Open the generated files and refine: wire real data into AG Grid
rowDataand ApexChartsseries, fix any roles the heuristics missed, snap arbitrary Tailwind values (p-[16px]) to the token scale (p-4).
Tune mobile detection with mobileMaxWidth (default 480). The web project builds the desktop screens; if the file is entirely mobile it builds all of them so the web app isn't empty.
Finer control:
get_conversion_guide→ learn the rules.get_figma_design→ compact outline of the design.scaffold_react_project→ project skeleton + tokens on disk.generate_componentper frame →.tsxscaffolds.download_figma_images→ icons/images.
Either way: every table becomes AG Grid, every chart becomes ApexCharts (typed ApexOptions, palette from src/charts/chart-theme.ts), everything else maps to antd where a role matches, Tailwind handles layout.
Notes & limitations
Uses Figma's REST API (read-only). It reads designs; it never edits them.
Tailwind suggestions use arbitrary values (
p-[16px]); after tokens exist, snap them to scale (p-4). The guide tells the model to do this.colorPrimaryin the antd theme is a best-effort guess (most vivid non-neutral color) — sanity-check it.For huge files, pass
depthtoget_figma_design/extract_design_tokensto keep responses small, or target a specific frame with?node-id=in the URL.Alternative: Figma's official Dev Mode MCP exposes design context too; this server differs by simplifying output and encoding the antd/AG Grid/Tailwind conventions specifically.
Dev
npm run dev # run from source with tsx
npm run build # compile to dist/Available Tools
7 toolsconvert_figma_to_reactConvert a whole Figma file → React projectA
End-to-end from a whole Figma FILE: fetch the design, extract tokens, enumerate EVERY top-level screen across all pages, scaffold the React + Vite + antd + AG Grid + ApexCharts + Tailwind project, and generate one page component per screen — writing everything to disk. Returns a concise summary only (the whole project stays out of the model's context). If the file contains mobile-only screens (width ≤ 480px) it ASKS whether to also export those as a separate React Native (Expo) app. Pass a bare file key or any file URL — a specific ?node-id= is optional and just narrows the scope.
Inputs: outDir (required), figmaUrl (required), depth, projectName, +3 more.
download_figma_imagesExport Figma images / iconsA
Render given node ids to image URLs (svg for icons/vectors, png for raster). Optionally save them to a local directory on the machine running this server.
Inputs: figmaUrl (required), scale, format, nodeIds, +1 more.
extract_design_tokensExtract design tokensA
Walk a Figma file/node and extract colors, typography, spacing, radii, and shadows. Returns a tailwind.config theme.extend snippet, CSS variables, and an antd ConfigProvider theme. Wire these in before writing components.
Inputs: figmaUrl (required), depth.
generate_componentGenerate a React component from a frameA
Turn a Figma frame/node into a ready-to-use .tsx component: antd components by role, Tailwind for layout, AG Grid for tables (with columnDefs derived from headers), ApexCharts for charts (type + labels derived from the design), and repeated rows expanded to .map(). If outDir is set the file is written to disk (kept out of context); otherwise the code is returned. This is the heavy lifting — refine the result rather than writing from scratch.
Inputs: figmaUrl (required), depth, outDir, componentName.
get_conversion_guideGet conversion guideA
Return the rules for turning the simplified Figma tree into a React + Ant Design + AG Grid + ApexCharts + Tailwind project (component mapping, table→AG Grid rules, chart→ApexCharts rules, project structure).
Inputs: no named parameters.
get_figma_designGet Figma design (simplified)A
Fetch a Figma file or a specific node (from a URL or file key) and return a compact, LLM-friendly tree with layout, style, semantic role hints, and suggested Tailwind classes. Use this FIRST before generating any React code.
Inputs: figmaUrl (required), depth, format, pruneWrappers, +2 more.
scaffold_react_projectScaffold a React project (tokens wired in)A
Generate a complete React + Vite + antd + AG Grid + ApexCharts + Tailwind project skeleton with the Figma design tokens already wired into tailwind.config, index.css, and the antd ConfigProvider theme, and WRITE it to disk. Returns just the list of files written — no boilerplate in context. Run this once, then add generated pages/components.
Inputs: outDir (required), figmaUrl (required), depth, projectName.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a distinct purpose: guide, fetch, tokens, images, scaffold, single component, full conversion. No overlap, clear boundaries.
All tool names follow a consistent verb_noun snake_case pattern (e.g., get_figma_design, extract_design_tokens).
Seven tools adequately cover the design-to-React workflow without being excessive or insufficient.
The tool set covers the entire process: fetching design, extracting tokens, downloading images, scaffolding, generating components, and full end-to-end conversion.
Related MCP Connectors
Design a React Native app in a browser and emit it as a real Expo project you own, iOS and Android.
Deterministic Figma to Elementor, Gutenberg, Oxygen, Etch and HTML layouts for AI assistants.
Visual builder for React Native and Expo apps. Read and update project design tokens.
Design an app in a browser, get an Expo project you own, iOS and Android. Free lookups, paid build.
Related MCP Servers
- AlicenseCqualityDmaintenanceConverts Figma designs to React Native components, allowing users to extract components from Figma designs and generate corresponding React Native components with proper typing and styling.38MIT
- AlicenseBqualityDmaintenanceA bridge between Figma designs and React implementations that enables pixel-perfect conversion of Figma designs into React applications by processing Figma file data into React-friendly format.52ISC
- AlicenseNot gradedqualityDmaintenanceConverts Figma designs into React components with TypeScript and Tailwind CSS by extracting components from Figma files and transforming them into ready-to-use code.77MIT
- AlicenseAqualityDmaintenanceConverts Figma designs into production-ready React components with design token extraction, widget registry integration, and micro-frontend module generation.351 npm1MIT