@manansiingh/figma-react-mcp-server
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., "@@manansiingh/figma-react-mcp-server Convert Figma node 123:4 in file abcxyz to React component with design tokens."
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.
@manansiingh/figma-react-mcp-server
Enterprise-grade Figma-to-React MCP Server — converts Figma designs into production-ready React components with design token extraction, widget registry integration, and micro-frontend (MFE) module generation.
Why This Server?
There are several Figma MCP servers out there. Here's what makes this one different:
Feature | Other Figma MCPs | This Server |
Basic component generation | ✅ | ✅ |
Design token extraction (colors, spacing, typography → reusable token file) | ❌ | ✅ |
Registry-driven output (components self-register into a widget registry) | ❌ | ✅ |
MFE-aware generation (independently deployable micro-frontend modules) | ❌ | ✅ |
Auto Layout → Flexbox mapping | Partial | ✅ Full |
This server was built from real-world experience building enterprise design systems and micro-frontend dashboards at scale, not just weekend prototypes.
Related MCP server: MCP Figma to React Converter
What It Does
1. Design Token Extraction
Instead of hardcoding colors and spacing into individual components, this server extracts Figma's design tokens into a standalone tokens.ts file:
// Auto-generated design tokens from Figma
export const tokens = {
colors: {
primary: '#6366F1',
background: '#F8FAFC',
text: '#0F172A',
},
spacing: {
sm: '8px',
md: '16px',
lg: '24px',
},
typography: {
heading: { fontFamily: 'Inter', fontSize: '24px', fontWeight: 700 },
body: { fontFamily: 'Inter', fontSize: '16px', fontWeight: 400 },
},
};2. Widget Registry Output
Generated components automatically export a registry entry, making them plug-and-play in dashboard frameworks:
// Auto-generated registry entry
export const widgetManifest = {
id: 'figma-card-widget',
name: 'Card Widget',
component: CardWidget,
category: 'display',
version: '1.0.0',
};3. Micro-Frontend Module Generation
Components are generated as independently deployable MFE modules with their own entry point, not just standalone .tsx files:
// Auto-generated MFE bootstrap
import { CardWidget } from './CardWidget';
import { tokens } from './tokens';
export default {
mount: (container: HTMLElement) => {
// Render into the provided container
},
unmount: (container: HTMLElement) => {
// Cleanup
},
};Quick Start
Requirements
A Figma Personal Access Token (Settings → Personal Access Tokens)
A Figma File Key (from the URL:
figma.com/file/<FILE_KEY>/...)A Node ID (from the URL when selecting a frame:
?node-id=1:2)
Add to Your MCP Client
Add this to your MCP client config (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"figma-to-react": {
"command": "npx",
"args": ["-y", "@manansiingh/figma-react-mcp-server"]
}
}
}Usage
Once configured, simply prompt your AI agent:
"Use the figma-to-react tool to convert Node '123:4' in file 'abcxyz' into a React component with design tokens extracted. My Figma token is 'figd_XXX'."
Available MCP Tools
Tool | Description |
| Converts a Figma node into a production React component with inline styles derived from Auto Layout, fills, strokes, typography, and border radius. |
| Pulls all color, spacing, and typography tokens from a Figma file into a reusable |
| Generates a self-contained micro-frontend module with mount/unmount lifecycle hooks. |
How It Works
Fetches the exact node tree from the Figma REST API
Recursively parses geometry, auto-layout constraints, fills, strokes, and text styles
Maps Figma's
layoutMode→ CSS Flexbox (display: flex,flexDirection,justifyContent,alignItems,gap)Extracts design tokens into a separate reusable file
Wraps output in registry-compatible and MFE-compatible formats
Returns clean, production-ready React JSX via MCP tool response
Tech Stack
Model Context Protocol SDK (stdio transport)
TypeScript, Node.js (ES2022)
License
MIT
Available Tools
3 toolsextract_design_tokensA
Extract all design tokens (colors, spacing, typography, radii) from a Figma node tree into a reusable TypeScript tokens file.
Inputs: nodeId (required), fileKey (required), figmaToken (required).
generate_mfe_moduleB
Generate a self-contained micro-frontend module from a Figma node, with mount/unmount lifecycle hooks and a widget registry entry.
Inputs: nodeId (required), fileKey (required), figmaToken (required).
generate_react_componentA
Fetch a Figma node and convert it into a production React component with Auto Layout → Flexbox, fills, typography, strokes, and border radius mapping.
Inputs: nodeId (required), fileKey (required), figmaToken (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct output: React component, design tokens, and micro-frontend module. There is no overlap in purpose, so agents can easily select the correct tool.
All tool names follow a consistent verb_noun pattern: generate_react_component, extract_design_tokens, generate_mfe_module. The naming is uniform and predictable.
With 3 tools, the server is tightly scoped to its purpose of Figma-to-code conversion. Each tool covers a distinct and necessary capability without bloat.
The set covers the core workflows: component generation, token extraction, and MFE creation. Minor omissions like asset export or project scaffolding exist, but agents can likely accomplish most tasks with these tools.
Maintenance
Related MCP Connectors
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
The Figma MCP server brings Figma design context directly into your AI workflow.
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
Deterministic Figma to Elementor, Gutenberg, Oxygen, Etch and HTML layouts for AI assistants.
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
- 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
- AlicenseNot gradedqualityDmaintenanceConnects Figma designs to React components using your actual component library, enabling AI tools to generate production-ready code with proper imports.1MIT
- AlicenseAqualityDmaintenanceConverts Figma designs into structured code context with token-aware styling, enabling AI agents to generate production-level frontend code.111 npmMIT