Figma MCP Server
This server provides a bridge between Figma designs and React implementations, enabling design conversion, asset management, and direct interaction with Figma files and comments.
get_file_content: Fetches and processes Figma file content, converting layout (Flexbox), styles (CSS/styled-components), and component hierarchies into React-ready structures.
get_node_images: Retrieves image assets from Figma nodes with support for PNG, JPG, and SVG formats, plus scaling options.
add_figma_file: Loads a Figma file into your context by providing its URL.
view_node: Gets a thumbnail/preview for a specific node in a Figma file.
read_comments: Retrieves all comments on a Figma file.
post_comment: Posts a new comment on a Figma file at specific x/y coordinates, optionally pinned to a specific node.
reply_to_comment: Replies to an existing comment thread using its comment ID.
Enables pixel-perfect conversion of Figma designs into React applications by processing Figma file data, converting Figma styles to CSS/styled-components, handling image assets and SVG components, and translating Figma auto-layout to Flexbox.
Processes Figma design data into React-compatible format for direct implementation in React applications, providing React-ready component structures.
Converts Figma styles into compatible format for styled-components, enabling direct implementation of design styling in React applications.
Retrieves and processes SVG assets from Figma designs, supporting vector graphics integration in the resulting React components.
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 MCP Server get the React components from Figma file ABC123"
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 MCP Server
A Model Context Protocol (MCP) server that provides a bridge between Figma designs and React implementations. This server enables pixel-perfect conversion of Figma designs into React applications by processing Figma file data and providing it in a React-friendly format.
π Features
Figma API Integration: Direct connection to Figma's API for accessing design files
React-Ready Output: Processes Figma data into React-compatible format
Style Processing: Converts Figma styles to CSS/styled-components
Asset Management: Handles image assets and SVG components
Layout Processing: Converts Figma auto-layout to Flexbox
Type Safety: Built with TypeScript for reliable type checking
Related MCP server: MCP Figma to React Converter
π οΈ Tools Provided
get_file_content:Fetches and processes Figma file content
Converts layout, styles, and components
Returns React-ready component structure
{ fileKey: string; // Figma file key nodeId?: string; // Optional specific component ID }get_node_images:Retrieves image assets from Figma
Supports multiple formats (PNG, JPG, SVG)
Configurable scaling options
{ fileKey: string; // Figma file key nodeIds: string[]; // Component IDs to fetch format?: 'png' | 'jpg' | 'svg'; scale?: number; // 1-4 }
π¦ Installation
Installing via Smithery
To install Figma Design to React Converter for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @sanjeev23oct/figma-mcp --client claudeManual Installation
Clone the repository:
git clone https://github.com/yourusername/figma-mcp.git cd figma-mcpInstall dependencies:
npm installConfigure your Figma access token:
cp .env.example .env # Add your Figma access token to .env
π― Cursor IDE Setup
Create the
.cursor/mcp.jsonfile in your project root:mkdir -p .cursor touch .cursor/mcp.jsonFor Stdio-based server configuration:
{ "mcpServers": { "figma": { "command": "node", "args": ["d:/<folder>>/figma-mcp/build/index.js"], "env": { "FIGMA_ACCESS_TOKEN": "your figma token" }, "disabled": false, "alwaysAllow": [], "protocol": "stdio" } } }
π» Usage
Build the server:
npm run buildConfigure MCP settings based on your IDE:
For VS Code (global settings):
// In settings.json { "mcpServers": { "figma": { "command": "node", "args": ["path/to/figma-mcp/build/index.js"], "env": { "FIGMA_ACCESS_TOKEN": "your-token-here" } } } }For Cursor IDE: Use the
.cursor/mcp.jsonconfiguration as described in the "Cursor IDE Setup" section above. This configuration will take precedence over VS Code settings when using Cursor IDE.
Use the MCP tools in your application:
// Example: Fetch processed Figma content const result = await useMcpTool("figma", "get_file_content", { fileKey: "your-figma-file-key" });
π§© Example Project
Check out the raccoon-game directory for a complete example of using this MCP server to create a pixel-perfect React implementation of a Figma design.
π Processing Pipeline
Input: Figma file data through official API
Processing:
Style conversion (colors, typography, effects)
Layout transformation (absolute to Flexbox)
Component hierarchy mapping
Asset optimization
Output: React-ready component data
π License
MIT License
π€ Contributing
Contributions welcome! Please read our contributing guidelines.
π Acknowledgments
Figma API team for the comprehensive API
Model Context Protocol for the MCP specification
Check out my other project: https://github.com/sanjeev23oct/zap , light weight coding agent free from bloated system prompts built in rust with skill first approach.
Available Tools
5 toolsadd_figma_fileC
Add a Figma file to your context
Inputs: url (required).
post_commentC
Post a comment on a node in a Figma file
Inputs: file_key (required), message (required), x (required), y (required), +1 more.
read_commentsC
Get all comments on a Figma file
Inputs: file_key (required).
reply_to_commentC
Reply to an existing comment in a Figma file
Inputs: file_key (required), comment_id (required), message (required).
view_nodeC
Get a thumbnail for a specific node in a Figma file
Inputs: file_key (required), node_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose targeting specific actions in Figma: adding files, posting comments, reading comments, replying to comments, and viewing nodes. There is no overlap in functionality, making it easy for an agent to select the correct tool without confusion.
The naming follows a consistent verb_noun pattern (e.g., add_figma_file, post_comment) with clear and descriptive names. The only minor deviation is 'view_node' which uses 'view' instead of a more action-oriented verb like 'get', but it still fits the pattern well and remains readable.
With 5 tools, the server is well-scoped for its purpose of interacting with Figma files, comments, and nodes. Each tool serves a distinct and necessary function, avoiding bloat while covering essential operations like file management and comment handling.
The toolset covers core workflows for Figma interactions, including file addition, comment management (post, read, reply), and node viewing. A minor gap is the lack of tools for updating or deleting files or comments, but agents can still perform basic operations effectively without major dead ends.
Maintenance
Related MCP Connectors
The Figma MCP server brings Figma design context directly into your AI workflow.
Deterministic Figma to Elementor, Gutenberg, Oxygen, Etch and HTML layouts for AI assistants.
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
Designs React sites with hand-made animated components fitted to your brand, then checks each page.
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.344 npm8MIT
- 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 AI applications to Figma API for extracting design data, generating production-ready HTML/CSS from designs, and capturing screenshots in multiple formats.3,040 npmISC
- AlicenseAqualityDmaintenanceConverts Figma designs into production-ready React components with design token extraction, widget registry integration, and micro-frontend module generation.386 npm1MIT