Figma Mcp Server avatar
Figma Mcp Server

Pricing

Pay per usage

Go to Apify Store
Figma Mcp Server

Figma Mcp Server

Extract Figma designs for AI coding agents. Get layout, styles, variables, and screenshots from any Figma file. Generate React, Vue, Svelte, Flutter, or SwiftUI code. 11 MCP tools for design-to-code workflows. Supports design tokens, component mapping, and FigJam diagrams.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Quadruped

Quadruped

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

18 days ago

Last modified

Share

Extract Figma designs for AI coding agents. Get layout, styles, variables, screenshots, and generate code for React, Vue, Svelte, Flutter, and more.

Features

  • Design Context Extraction - Layout, styles, and generated code for any Figma node
  • Design Variables - Extract colors, spacing, typography as CSS/Tailwind tokens
  • Screenshots - Export node images in PNG, JPG, SVG, or PDF format
  • Multi-Framework Code - React + Tailwind, Vue, Svelte, Flutter, SwiftUI, Compose
  • MCP Server Mode - Run as stdio server for Claude Desktop and AI agents
  • 11 MCP Tools - Comprehensive Figma integration for design-to-code workflows

Quick Start

Demo Mode

Run with figmaApiKey: "demo" to see sample output without a real API key.

{
"figmaApiKey": "demo",
"extractionMode": "design_context",
"framework": "react_tailwind"
}

With Real Figma File

{
"figmaApiKey": "figd_your_token_here",
"fileUrl": "https://www.figma.com/design/abc123/MyDesign",
"extractionMode": "design_context",
"framework": "react_tailwind"
}

Input Parameters

ParameterTypeRequiredDefaultDescription
figmaApiKeystringYes-Figma Personal Access Token. Use "demo" for sample data
fileUrlstringNo-Full Figma file URL
nodeIdstringNo-Specific node to extract (format: 123:456)
extractionModeenumNodesign_contextWhat to extract
frameworkenumNoreact_tailwindTarget framework for code output
imageFormatenumNopngScreenshot format
imageScalenumberNo2Screenshot scale (1-4)
depthnumberNo0Tree traversal depth (0 = unlimited)
mcpModebooleanNofalseRun as MCP stdio server

Extraction Modes

ModeDescription
design_contextLayout, styles, and generated code
variablesDesign tokens (colors, spacing, typography)
metadataXML structure overview
screenshotExport node images
code_connectComponent-to-code mappings
figjamFigJam diagram content
fullAll extraction types

Target Frameworks

FrameworkOutput
react_tailwindReact + Tailwind CSS classes
react_cssReact + CSS Modules
vue_tailwindVue 3 + Tailwind
svelteSvelte components
html_cssPlain HTML + inline CSS
flutterFlutter widgets
swift_uiSwiftUI views
composeJetpack Compose

Output Schema

Design Context Output

{
"nodeId": "123:456",
"nodeName": "Hero Section",
"nodeType": "FRAME",
"layout": {
"width": 1440,
"height": 800,
"layoutMode": "VERTICAL",
"padding": { "top": 64, "right": 120, "bottom": 64, "left": 120 }
},
"styles": {
"fills": [{ "type": "SOLID", "color": "#F8F8FC" }],
"cornerRadius": 0
},
"codeOutput": "<div className=\"flex flex-col items-center...\">",
"framework": "react_tailwind",
"timestamp": "2024-01-15T10:30:00Z"
}

Variables Output

{
"variableName": "primary-color",
"variableType": "COLOR",
"value": "#6366F1",
"collection": "Brand Colors",
"mode": "Light",
"extractionType": "variables"
}

Screenshot Output

{
"nodeId": "123:456",
"imageUrl": "https://figma-alpha-api.s3.us-west-2.amazonaws.com/...",
"imageFormat": "png",
"scale": 2,
"width": 2880,
"height": 1600
}

Getting a Figma API Key

  1. Go to figma.com and sign in
  2. Click your profile icon → Settings
  3. Scroll to Personal access tokens
  4. Click Generate new token
  5. Copy the token (starts with figd_)

MCP Server Configuration

Claude Desktop

Add to your Claude Desktop config:

{
"mcpServers": {
"figma": {
"command": "npx",
"args": ["-y", "@anthropic-ai/figma-mcp-server", "--figma-api-key=YOUR_KEY"]
}
}
}

Via Apify MCP

Configure at mcp.apify.com to add this Actor to your MCP setup.

MCP Tools

When running in MCP mode, the following tools are available:

ToolDescription
get_design_contextExtract layout, styles, and generated code
get_variable_defsGet design tokens (colors, spacing, typography)
get_screenshotCapture visual representation of nodes
get_metadataSparse XML metadata for large designs
get_code_connect_mapGet component-to-code mappings
add_code_connect_mapCreate new component mappings
get_figjamExtract FigJam diagram content
create_design_system_rulesGenerate design system rules file
whoamiGet authenticated user info
list_componentsList all file components
list_stylesList all file styles

Use Cases

Design-to-Code

Extract a Figma frame and get ready-to-use React code:

{
"figmaApiKey": "figd_xxx",
"fileUrl": "https://www.figma.com/design/abc/Landing",
"nodeId": "hero-section-id",
"extractionMode": "design_context",
"framework": "react_tailwind"
}

Design System Export

Extract all design tokens for your design system:

{
"figmaApiKey": "figd_xxx",
"fileUrl": "https://www.figma.com/design/abc/DesignSystem",
"extractionMode": "variables"
}

Visual Documentation

Capture screenshots for documentation or code review:

{
"figmaApiKey": "figd_xxx",
"fileUrl": "https://www.figma.com/design/abc/Components",
"nodeId": "button-component-id",
"extractionMode": "screenshot",
"imageFormat": "png",
"imageScale": 2
}

Pricing

Pay-per-event pricing based on extraction type:

EventCost
Design context extraction$0.01/node
Variable extraction$0.005/variable
Screenshot export$0.02/image
Metadata extraction$0.01/file

License

MIT