Figma Design Processor MCP server

Transforms Figma designs into structured data for React implementation, providing tools to extract component details, styles, and layout properties through the Figma API.
Back to servers
Setup instructions
Provider
Sanjeev
Release date
Mar 22, 2025
Language
TypeScript
Stats
2 stars

This MCP server enables conversion of Figma designs into React applications by processing Figma file data and providing it in a React-friendly format. It integrates directly with Figma's API, handles style conversion, layout processing, and asset management to ensure pixel-perfect implementation of your designs.

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

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 claude

Manual Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/figma-mcp.git
    cd figma-mcp
    
  2. Install dependencies:

    npm install
    
  3. Configure your Figma access token:

    cp .env.example .env
    # Add your Figma access token to .env
    

Setting Up Your IDE

Cursor IDE Setup

  1. Create the .cursor/mcp.json file in your project root:

    mkdir -p .cursor
    touch .cursor/mcp.json
    
  2. For 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"
       }
     }
    }
    

VS Code Setup

Configure in settings.json:

{
  "mcpServers": {
    "figma": {
      "command": "node",
      "args": ["path/to/figma-mcp/build/index.js"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

Usage

  1. Build the server:

    npm run build
    
  2. 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"
    });
    

Processing Pipeline

  1. Input: Figma file data through official API
  2. Processing:
    • Style conversion (colors, typography, effects)
    • Layout transformation (absolute to Flexbox)
    • Component hierarchy mapping
    • Asset optimization
  3. Output: React-ready component data

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "figma" '{"command":"node","args":["path/to/figma-mcp/build/index.js"],"env":{"FIGMA_ACCESS_TOKEN":"your-token-here"},"protocol":"stdio"}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "figma": {
            "command": "node",
            "args": [
                "path/to/figma-mcp/build/index.js"
            ],
            "env": {
                "FIGMA_ACCESS_TOKEN": "your-token-here"
            },
            "protocol": "stdio"
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "figma": {
            "command": "node",
            "args": [
                "path/to/figma-mcp/build/index.js"
            ],
            "env": {
                "FIGMA_ACCESS_TOKEN": "your-token-here"
            },
            "protocol": "stdio"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later