figma-spec-mcp
Maps Figma frames to Flutter Widget trees with Material and Cupertino components, plus ThemeData extraction.
Provides component mapping to MUI (Material-UI) components as part of the React code generation pipeline.
Maps Figma frames to React component trees with JSX, Tailwind/CSS classes, and suggestions for component libraries like shadcn, MUI, Chakra, and Radix, along with TypeScript prop interfaces.
Maps Figma frames to SwiftUI views with VStack, HStack, ZStack, modifier chains, and color asset extraction for iOS/macOS development.
Extracts design tokens from Figma and exports them as Tailwind CSS configuration files for consistent styling.
Maps Figma frames to Unity UGUI components, providing RectTransform data, layout groups, and component mappings for game UI implementation.
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-spec-mcp map the login screen frame 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-spec-mcp
Bridge Figma to any platform — Unity UGUI mappings built-in, structured output for React, Flutter, SwiftUI, and more. Layout audit, design tokens, accessibility checks, prototype flows, version diffs, and platform-ready specs — all through MCP.
Works with any MCP-compatible client: Claude Code, Claude Desktop, Cursor, VS Code + Copilot, Windsurf, Cline, Continue.dev, Zed.
Security note: Your Figma access token is passed as a tool argument. Never commit it to version control. Use environment variables or your AI client's secret management to supply it at runtime.
Platform Support
Platform | What you get |
Unity |
|
React |
|
React Native |
|
Flutter |
|
SwiftUI |
|
Tailwind CSS |
|
Any platform |
|
Your AI agent reads the structured output and generates platform-specific code. No manual translation needed.
Related MCP server: @manansiingh/figma-react-mcp-server
Quick Start
1. Get a Figma access token → figma.com/developers/api#access-tokens
2. Add to your MCP config (Claude Desktop, Cursor, VS Code, or any MCP client):
{
"mcpServers": {
"figma-spec-mcp": {
"command": "npx",
"args": ["-y", "figma-spec-mcp@beta"]
}
}
}3. Restart your AI client and use the tools.
Your file key is in the Figma URL: figma.com/file/<FILE_KEY>/...
Why figma-spec-mcp?
Most Figma MCP tools forward raw API responses. figma-spec-mcp adds stable envelopes, focused derivations, and reusable engineering outputs:
Deterministic JSON responses with a shared response envelope
Built-in disk cache with freshness metadata on every result
Source traceability for tokens, mappings, and extracted relationships
Platform-ready outputs for Unity, codebase mapping, and image export workflows
Tools
inspect_layout— Inspects a Figma frame and returns hierarchy, layout structure, spacing, constraints, annotations, and basic accessibility warnings.extract_design_tokens— Extracts color, typography, and spacing tokens from a Figma file and exports them as CSS variables, Style Dictionary JSON, or Tailwind config.map_to_react— Maps a Figma frame to a React component tree with Tailwind/CSS classes, component library suggestions (shadcn, MUI, Chakra, Radix), asset hints, and TypeScript prop interfaces from variants.map_to_react_native— Maps a Figma frame to React Native components (View, Text, TouchableOpacity, TextInput) with StyleSheet output and React Native Paper/NativeBase library mapping.map_to_flutter— Maps a Figma frame to a Flutter Widget tree (Container, Column, Row, Stack) with Material/Cupertino component mapping and ThemeData extraction.map_to_swiftui— Maps a Figma frame to SwiftUI views (VStack, HStack, ZStack) with modifier chains and Color asset extraction.map_to_unity— Produces a Unity UGUI-oriented mapping with RectTransform data, layout groups, suggested components, notes, and warnings.resolve_components— Resolves instance nodes to their backing component definitions and returns source file and source node references.extract_flows— Extracts prototype transitions from a page or frame and returns directed flow connections plus a deterministic frame order.bridge_to_codebase— Scans a local project and maps Figma component names to likely implementation files using filename heuristics.diff_versions— Compares two Figma file versions and reports added, removed, and modified nodes.extract_variants— Reads a component set and returns structured variant metadata, parsed properties, dimensions, layout details, fills, and typography.export_images— Exports one or more Figma nodes as PNG, JPG, SVG, or PDF and returns the image URLs.audit_accessibility— Audits a frame for accessibility issues such as contrast, touch targets, font size, missing alt text, and color-only distinctions.simplify_context— Produces a token-efficient, LLM-oriented summary tree by collapsing wrappers, grouping repeated nodes, and truncating deep hierarchies.lint_handoff_readiness— Audits a frame for engineering handoff readiness: unnamed layers, absolute positioning soup, missing auto-layout, orphaned nodes, oversized images.generate_implementation_contract— Produces a structured implementation spec with scope, assets, states, interactions, dependencies, typography, colors, and acceptance criteria.extract_missing_states— Scans components for missing UI states (hover, pressed, disabled, loading, error, empty) against a standard expected-state set.flow_to_test_cases— Converts prototype flows into QA-ready test cases with navigation steps, expected outcomes, and flow coverage gaps.
Features
v0.1 — Core
inspect_layout,extract_design_tokens,map_to_unityDisk cache with SHA-256 keying and 1h TTL
v0.2 — Intelligence
Token name preservation from Figma styles
Depth-limited chunking for large files
Mixed/rich text runs extraction
Annotation extraction, framework-aware hints (Unity, React, SwiftUI, Web)
v0.3 — Workflows
resolve_components— multi-file component traversalextract_flows— prototype flow graphbridge_to_codebase— Figma → repo file matchingdiff_versions— structured version diffextract_variants— component set batch extraction
v0.4 — Quality & DX
export_images— PNG/JPG/SVG/PDF exportaudit_accessibility— WCAG 2.1 contrast, touch targets, font sizesimplify_context— AI-optimized, token-efficient outputTool registry pattern for easy contribution
Rate limit handling (429 + Retry-After)
v0.5 — Handoff & QA
lint_handoff_readiness— design-to-code readiness audit with scoringgenerate_implementation_contract— structured implementation scope + acceptance criteriaextract_missing_states— component state coverage analysisflow_to_test_cases— prototype flows → QA test scenarios
v0.6 — Multi-Platform Mappers
map_to_react— Figma → React with Tailwind/CSS, shadcn/MUI/Chakra/Radix, TypeScript propsmap_to_react_native— Figma → React Native with StyleSheet, Paper/NativeBase component mappingmap_to_flutter— Figma → Flutter Widget tree with Material/Cupertino, ThemeData extractionmap_to_swiftui— Figma → SwiftUI with modifier chains, Color asset extractionNormalized UI AST foundation — shared platform-agnostic tree powering all 4 platform mappers
Response Shape
All 19 tools return a consistent top-level envelope:
{
"schema_version": "0.1.0",
"source": { "file_key": "abc123", "node_id": "1:23" },
"freshness": {
"fresh": true,
"timestamp": "2026-03-26T10:00:00.000Z",
"ttl_ms": 3600000
},
"warnings": [],
"data": {}
}Tool-specific results live in data, and most tools also include low-level cache metadata there.
Caching
Responses are cached to disk (default: $TMPDIR/figma-spec-mcp-cache/) by file key and request shape with a 1-hour TTL. Cache metadata is included in responses:
"cache": {
"cachedAt": "2026-03-26T10:00:00.000Z",
"expiresAt": "2026-03-26T11:00:00.000Z",
"fileVersion": "123456789",
"fresh": true
}Development
git clone https://github.com/zaferdace/figma-spec-mcp
cd figma-spec-mcp
npm install
npm run build
node dist/index.jsRoadmap
map_to_react— React component tree with Tailwind/CSS, component library mapping, TypeScript propsmap_to_react_native— React Native with StyleSheet, Paper/NativeBase mappingmap_to_flutter— Flutter Widget tree with Material/Cupertino, ThemeDatamap_to_swiftui— SwiftUI views with modifier chains, Color assetsdetect_design_drift— Compare Figma design against codebase implementationmap_to_unreal_umg— Unreal Engine UMG widget mappingmap_to_godot_control— Godot Control node mappingWebhook-triggered spec generation
License
MIT © Zafer Dace
Available Tools
19 toolsaudit_accessibilityA
Audits a Figma frame for WCAG 2.1 accessibility issues: contrast ratios, touch targets, missing alt text, font sizes. Returns issues with severity levels and an overall accessibility score.
Inputs: node_id (required), file_key (required), access_token (required).
bridge_to_codebaseB
Scans Figma components and a local codebase, then maps component names to likely implementation files using exact, case-insensitive, and partial filename matching.
Inputs: file_key (required), access_token (required), project_path (required), file_extensions.
diff_versionsA
Fetches two Figma file versions and reports added, removed, and modified nodes by comparing names, types, geometry, fills, and style properties.
Inputs: file_key (required), version_a (required), version_b (required), access_token (required).
export_imagesA
Exports Figma nodes as images (PNG, JPG, SVG, PDF) via the Figma image export API. Returns download URLs for each requested node.
Inputs: file_key (required), node_ids (required), access_token (required), scale, +1 more.
extract_design_tokensA
Extracts all design tokens (colors, typography, spacing) from a Figma file and exports them in your chosen format: CSS custom properties (DTCG-aligned), Style Dictionary JSON, or Tailwind config. Spacing tokens are sourced from auto-layout padding and gap values. Each token includes source node IDs for traceability.
Inputs: file_key (required), access_token (required), export_format.
extract_flowsA
Extracts prototype flows from a page or frame by finding transition links in the node tree, then returns directed frame-to-frame connections and a deterministic traversal order.
Inputs: node_id (required), file_key (required), access_token (required).
extract_missing_statesA
Finds components and component sets in a Figma subtree, compares detected states against a standard expected-state list, and reports missing state coverage with a confidence score.
Inputs: node_id (required), file_key (required), access_token (required).
extract_variantsA
Reads a Figma component set and returns structured variant data including parsed variant properties, dimensions, layout details, fills, and typography from text descendants.
Inputs: node_id (required), file_key (required), access_token (required).
flow_to_test_casesA
Converts Figma prototype transitions into deterministic navigation test cases and reports dead ends, unreachable screens, and basic flow coverage.
Inputs: node_id (required), file_key (required), access_token (required).
generate_implementation_contractA
Analyzes a Figma frame or component subtree and produces an implementation contract with scope, assets, states, prototype interactions, dependencies, typography, colors, and acceptance criteria.
Inputs: node_id (required), file_key (required), access_token (required), target.
inspect_layoutA
Inspects a Figma frame and returns deterministic layout data: node hierarchy, auto-layout vs absolute positioning, spacing, padding, constraints, and accessibility warnings (touch targets, font sizes). Output is a versioned JSON envelope — stable and predictable for downstream tooling.
Inputs: node_id (required), file_key (required), access_token (required), framework, +1 more.
lint_handoff_readinessA
Scans a Figma page or subtree for common engineering handoff issues including default layer names, auto-layout gaps, hidden debris, oversized images, orphaned nodes, and missing text styles.
Inputs: file_key (required), access_token (required), node_id, ruleset.
map_to_flutterA
Map a Figma frame to a Flutter widget tree with Material or Cupertino suggestions, constructor-style properties, asset hints, and ThemeData suggestions.
Inputs: node_id (required), file_key (required), access_token (required), max_depth, +3 more.
map_to_reactB
Map a Figma frame to a React component tree with JSX structure, Tailwind or CSS styling output, component library suggestions, asset hints, and TypeScript prop definitions.
Inputs: node_id (required), file_key (required), access_token (required), max_depth, +4 more.
map_to_react_nativeA
Map a Figma frame to a React Native component tree with StyleSheet-style output, mobile component library suggestions, asset hints, and TypeScript prop definitions.
Inputs: node_id (required), file_key (required), access_token (required), max_depth, +3 more.
map_to_swiftuiA
Map a Figma frame to a SwiftUI view tree with modifier suggestions, asset hints, and generated color asset helpers.
Inputs: node_id (required), file_key (required), access_token (required), max_depth, +2 more.
map_to_unityA
Produces a Unity UGUI mapping spec from a Figma frame. Maps Figma constraints to RectTransform anchors, auto-layout to HorizontalLayoutGroup/VerticalLayoutGroup, and suggests appropriate Unity components per node type. Includes confidence scores for inferred components and warnings for unknown constraints or unsupported effects.
Inputs: node_id (required), file_key (required), access_token (required), canvas_width, +1 more.
resolve_componentsA
Scans a Figma subtree or full file for instances, resolves each unique component through the file component map and Figma component API, and returns the source file and node for each instance.
Inputs: file_key (required), access_token (required), node_id.
simplify_contextA
Produces an AI-optimized, token-efficient representation of a Figma frame. Strips noise, collapses wrappers, groups repeated elements, and truncates deep hierarchies. Designed to fit within LLM context windows.
Inputs: node_id (required), file_key (required), access_token (required), framework, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool targets a distinct aspect of the Figma-to-code workflow (accessibility auditing, layout inspection, token extraction, flow extraction, component resolution, framework-specific mapping, etc.). Even the five map_to_* tools are clearly separated by target framework, and the extraction tools each focus on a different data type (tokens, flows, variants, states).
Names follow a consistent snake_case convention and most use a verb_noun structure (audit_accessibility, extract_variants, resolve_components). A few conversion tools use a 'to' pattern (map_to_react, bridge_to_codebase) which is coherent, but flow_to_test_cases deviates by starting with a noun instead of a verb.
With 19 tools, the count is on the heavier side but well-justified for a comprehensive Figma design-to-development server. Each tool serves a distinct purpose in the workflow, and the scope is broad enough to warrant the number without feeling bloated.
The tool surface covers the full read-only design-to-code pipeline: extraction, analysis, mapping to multiple frameworks, asset export, version diffing, component resolution, test case generation, and handoff readiness checks. There are no obvious missing operations for its stated purpose, and the addition of bridge_to_codebase and simplify_context further fills collaboration and context-efficiency gaps.
Maintenance
Related MCP Connectors
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
Access and maintain design system docs, tokens, components, skills, and contexts across any project.
Turn any live website into brand colors, fonts, design tokens, SVGs, Lottie and paste-ready code.
On-demand drift checks: declared CSS color, radius, spacing & type vs your own tokens or a pack
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects Figma designs to AI agents, enabling extraction of production-ready code, assets, and design tokens through natural language descriptions. Supports React, Vue, CSS, and Tailwind with real-time design system analysis.144,091 npm40MIT
- AlicenseAqualityDmaintenanceConverts Figma designs into production-ready React components with design token extraction, widget registry integration, and micro-frontend module generation.386 npm1MIT
- AlicenseAqualityDmaintenanceConverts Figma designs into structured code context with token-aware styling, enabling AI agents to generate production-level frontend code.18 npmMIT
- AlicenseNot gradedqualityBmaintenanceBridges AI assistants with Figma for design system extraction, bidirectional token sync, visual debugging, and design creation.313 npm1MIT