Figma MCP Server
About
experimental gen ai mcp server to generate figma tokens
Details
- License
- MIT
Explore
- 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
- 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
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
The server can be configured using either environment variables (via .env file) or command-line arguments. Command-line arguments take precedence over environment variables.
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
}
})
});
You can run the server quickly without installing or building the repo using NPM:
npx figma-developer-mcp --figma-api-key=<your-figma-api-key>
Many tools like Windsurf, Cline, and Claude Desktop use a configuration file to start the server.
The figma-developer-mcp server can be configured by adding the following to your configuration file:
json{
"mcpServers": {
"figma-developer-mcp": {
"command": "npx",
"args": ["-y", "figma-developer-mcp", "--stdio"],
"env": {
"FIGMA_API_KEY": "<your-figma-api-key>"
}
}
}
}
1. Clone the repository
2. Install dependencies with pnpm install
3. Copy .env.example to .env and fill in your Figma API access token. Only read access is required.
4. Run the server with pnpm run dev, along with any of the flags from the Command-line Arguments section.
- FIGMA_API_KEY: Your Figma API access token (required)
- PORT: The port to run the server on (default: 3333)
The server provides the following MCP tools:
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>"
]
}
}
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.



