- Explore MCP Servers
- mcp-genui-figma
Mcp Genui Figma
What is Mcp Genui Figma
MCP-GenUI is a Model Context Protocol (MCP) server that integrates with Figma, allowing AI assistants to access and manipulate design files and components seamlessly.
Use cases
Use cases include generating components from Figma designs, extracting design tokens for consistent styling, and providing AI-driven design suggestions to improve user interfaces.
How to use
To use MCP-GenUI, clone the repository, install the dependencies, set up your Figma API key in a .env file, build the server, and integrate it with your Cursor MCP configuration.
Key features
Key features include browsing Figma design files, listing components and frames, generating code in multiple formats (React, Swift, Web Components), extracting design tokens and styles, and providing design descriptions and improvement suggestions.
Where to use
MCP-GenUI can be used in design and development environments where Figma is utilized, particularly in projects that require integration between design and code generation.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Genui Figma
MCP-GenUI is a Model Context Protocol (MCP) server that integrates with Figma, allowing AI assistants to access and manipulate design files and components seamlessly.
Use cases
Use cases include generating components from Figma designs, extracting design tokens for consistent styling, and providing AI-driven design suggestions to improve user interfaces.
How to use
To use MCP-GenUI, clone the repository, install the dependencies, set up your Figma API key in a .env file, build the server, and integrate it with your Cursor MCP configuration.
Key features
Key features include browsing Figma design files, listing components and frames, generating code in multiple formats (React, Swift, Web Components), extracting design tokens and styles, and providing design descriptions and improvement suggestions.
Where to use
MCP-GenUI can be used in design and development environments where Figma is utilized, particularly in projects that require integration between design and code generation.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP-GenUI: Figma Design Integration Server
Overview
MCP-GenUI is a Model Context Protocol (MCP) server that integrates with Figma to provide seamless access to design files and components. It enables AI assistants to:
- Browse and access Figma design files
- List components, frames, and design elements
- Generate code in multiple formats (React, Swift, Web Components, etc.)
- Extract design tokens and styles
- Provide design descriptions and improvement suggestions
Setup
Prerequisites
- Node.js v16+
- Figma account with API access
- Figma API key
Installation
- Clone this repository
- Install dependencies:
npm install - Create a
.envfile with your Figma API key:FIGMA_API_KEY=your_figma_api_key_here FIGMA_DEFAULT_FILE=optional_default_file_key - Build the server:
npm run build - Make the run script executable:
chmod +x run-mcp.sh
Integration with Cursor
Add the server to your Cursor MCP configuration in ~/.cursor/mcp.json:
{
"mcpServers": {
"mcp-genui": {
"command": "/path/to/mcp-genui/run-mcp.sh"
}
}
}
Features
Resources
The server exposes Figma designs as resources with:
figma://file/{fileKey}URIs for Figma filesfigma://node/{fileKey}/{nodeId}URIs for components and frames- JSON representation of design data
Tools
Set Active Figma File
Claude, please set the active Figma file to 0RCoKeI0gB5jpaOjdHt7aE
This tool sets the current working file for subsequent operations.
List Components
Claude, please list the components in my Figma file
Lists all components, frames, and component sets in the active Figma file, organized by type with their node IDs and URIs.
Generate Component
Claude, please generate a React component for node figma://node/0RCoKeI0gB5jpaOjdHt7aE/123:456
Generates code for a component in various formats:
- React
- Swift
- Web Components
- Vue
- Angular
- Svelte
You can also use a simplified format with just the node ID when working with the active file:
Claude, please generate a Swift component for node 123:456 named NavigationBar
Extract Design Tokens
Claude, please extract design tokens from my Figma file in CSS format
Extracts design tokens (colors, typography, spacing) in various formats:
- JSON
- CSS
- SCSS
- Swift
Prompts
The server provides prompts for:
- Describing designs in detail
- Suggesting design improvements
Architecture
The server is built using:
- MCP SDK for server implementation
- Figma API for accessing design data
- Node.js for runtime environment
Key components:
- Resource handlers for browsing designs
- Tool handlers for generating code
- Prompt handlers for design analysis
- Caching system to reduce API calls
Debugging
The server includes debug logging to help troubleshoot issues:
- Logs are written to
mcp-debug.login the project directory - Debug mode can be toggled in the code
Usage Examples
Complete Workflow
-
Set the active Figma file:
Claude, please set the active Figma file to 0RCoKeI0gB5jpaOjdHt7aE -
List available components:
Claude, please list the components in my Figma file -
Generate a component:
Claude, please generate a React component for node 123:456 -
Extract design tokens:
Claude, please extract design tokens in Swift format
Advanced Usage
-
Filter components by type:
Claude, please list only COMPONENT_SET type components -
Generate a component with a custom name:
Claude, please generate a web component for node 123:456 named NavigationBar -
Access a specific file directly:
Claude, please list components in Figma file 0RCoKeI0gB5jpaOjdHt7aE
Troubleshooting
Common Issues
-
“File with key not found”: Ensure the file key is correct and you have access to the file.
-
Invalid node URI: Use the correct format
figma://node/{fileKey}/{nodeId}or just the node ID when using the active file. -
No active Figma file: Set an active file before performing operations that require one.
-
API access issues: Verify your Figma API key has the necessary permissions.
Debugging Steps
-
Check the
mcp-debug.logfile for detailed error information. -
Verify your Figma API key is correctly set in the
.envfile. -
Ensure you have access to the Figma files you’re trying to use.
-
Try setting a default file in the
.envfile withFIGMA_DEFAULT_FILE=your_file_key.
Future Enhancements
- Support for more output formats
- Better visualization of design components
- Integration with design systems
- Support for collaborative design workflows
- Enhanced design token extraction
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










