Figma MCP Server
About
experimental gen ai mcp server to generate figma tokens
Details
- Author
- j4ckp0t85
- Downloads
- 428
- Categories
- Media
Jump to
- Fetches Figma file metadata and node trees
- Extracts detailed CSS properties (colors, typography, shadows, gradients, etc.)
- Generates design tokens in CSS, SCSS, TypeScript, or JSON
- Supports optional CSS property extraction for lightweight responses
- Runs in HTTP/SSE mode or stdio mode
- Works with Cursor, Windsurf, Cline, and other MCP-compatible tools
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Figma MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Run the server quickly with npx figma-developer-mcp --figma-api-key=<your-figma-api-key>. For tools that use a config file (e.g., Windsurf, Cline, Claude Desktop), add a JSON entry specifying the command, arguments, and environment variable FIGMA_API_KEY. Connect the server to Cursor in Cursor’s settings under the features tab, then paste a Figma link into Composer (in agent mode) and ask Cursor to implement the design.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"figma mcp server": {
"Figma-Context-MCP-tokens": {
"command": "npx",
"args": [
"figma-developer-mcp",
"--figma-api-key=<your-figma-api-key>"
]
}
}
}
}
McpServers
{
"Figma-Context-MCP-tokens": {
"command": "npx",
"args": [
"figma-developer-mcp",
"--figma-api-key=<your-figma-api-key>"
]
}
}
Figma MCP Server
Give Cursor, Windsurf, Cline, and other AI-powered coding tools access to your Figma files with this Model Context Protocol server.
When Cursor has access to Figma design data, it's way better at one-shotting designs accurately than alternative approaches like pasting screenshots.
Get started quickly, see Configuration for more details:
npx figma-developer-mcp --figma-api-key=<your-figma-api-key>
Enhanced CSS Extraction
This enhanced version of the MCP server can extract and provide detailed CSS properties from Figma designs, making it more accurate when translating designs to code.
Key Features:
- Detailed CSS Properties: Extracts exact CSS values for all elements
- Complete Styling: Includes colors, dimensions, borders, shadows, typography, and more
- Accurate Rendering: Better translation from Figma to code with proper styles instead of screenshots
- Optional Extraction: Configure whether to include detailed CSS properties in the response
Advanced CSS Features:
- Gradient Support: Accurate extraction of linear, radial, and conic gradients
- Multi-layered Backgrounds: Support for multiple fills with proper stacking order
- Text Styling: Complete typography properties including font family, size, weight, line height, and transformations
- Effects & Filters: Support for box-shadow, blur effects, and backdrop filters
- Transformations: Extracts rotation and scale transforms
Example Usage:
When requesting Figma data, you can specify whether to extract detailed CSS properties:
// With detailed CSS properties
const response = await fetch("http://localhost:3333/messages", {
method: "POST",
body: JSON.stringify({
tool: "get_figma_data",
params: {
fileKey: "your-file-key",
nodeId: "your-node-id",
extractCssProperties: true // default is true
}
})
});
// Without detailed CSS properties (more lightweight)
const response = await fetch("http://localhost:3333/messages", {
method: "POST",
body: JSON.stringify({
tool: "get_figma_data",
params: {
fileKey: "your-file-key",
nodeId: "your-node-id",
extractCssProperties: false
}
})
});
Design Tokens Generation
This enhanced version also includes tools to automatically generate design tokens from your Figma designs, which can be exported in various formats to use in your projects.
Supported Token Types:
- Colors: Extracts colors from fills and named color elements
- Typography: Creates complete typography tokens with font families, sizes, weights, etc.
- Spacing: Identifies spacing patterns from appropriately named elements
- Border Radius: Extracts corner radius values
- Shadows: Captures box shadows and elevations
- Opacity: Extracts opacity values
- Gradients: Saves gradient definitions for reuse
Export Formats:
- CSS: Variables in :root {} for direct use in CSS
- SCSS: Variables and mixins for SCSS workflows
- TypeScript: Type-safe constants with TypeScript types
- JSON: Raw data for custom processing
Example Usage:
// Generate design tokens
const response = await fetch("http://localhost:3333/messages", {
method: "POST",
body: JSON.stringify({
tool: "generate_design_tokens",
params: {
fileKey: "your-file-key",
format: "css", // Options: "css", "scss", "ts", "json"
outputPath: "./src/styles/design-tokens.css", // Optional
prefix: "my-app-" // Optional prefix for variable names
}
})
});
Demo Video
Watch a demo of building a UI in Cursor with Figma design data

<a href="https://glama.ai/mcp/servers/kcftotr525"></a>
How it works
1. Open Cursor's composer in agent mode.
1. Paste a link to a Figma file, frame, or group.
1. Ask Cursor to do something with the Figma file—e.g. implement a design.
1. Cursor will fetch the relevant metadata from Figma and use it to write your code.
This MCP server is specifically designed for use with Cursor. Before responding with context from the Figma API, it simplifies and translates the response so only the most relevant layout and styling information is provided to the model.
Reducing the amount of context provided to the model helps make the AI more accurate and the responses more relevant.
Installation
Running the server quickly with NPM
You can run the server quickly without installing or building the repo using NPM:
```bash
npx figma-developer-mcp --figma-api-key=<your-figma-api-key>
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
