MCP server to extract Figma design information and convert it to mostly css for coding agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Figma To Code MCP specializes in extracting only the information LLMs need to build UIs while removing Figma-specific metadata that isn't relevant for code generation. The result:
Give Cursor and other AI-powered coding tools access to your Figma files with this Model Context Protocol server.
| Tool | Description |
|---|---|
get_figma_design | Fetches CSS-aligned, LLM-optimized design data. Supports SVG export to custom dir. |
get_image_fills | Retrieves image fill URLs from a Figma file |
render_node_images | Renders Figma nodes as PNG images |
read_vector_svg | Reads vector node data as SVG |
Create a Figma personal access token with these scopes:
| Scope | Purpose |
|---|---|
file_content:read | Read file nodes, layout, styles |
library_content:read | Read published components/styles |
file_variables:read | Read variables (Enterprise only, optional) |
Note: Variable resolution requires Enterprise plan. Set
resolveVariables: falseif not on Enterprise.
This MCP server transforms Figma API data into an LLM-friendly format:
backgroundColor, flexDirection, fontSize) instead of Figma internalsSee V2_CSS_PROPERTY_MAPPING.md for complete property mapping details.
Many code editors and other AI clients use a configuration file to manage MCP servers.
This server requires Node.js 18 or later.
The tmegit-figma-to-code-mcp server can be configured by adding the following to your configuration file.
Or you can set FIGMA_API_KEY and PORT in the env field.
The server reads configuration from CLI flags and environment variables. If both are set, the CLI flag wins.
| Option | CLI | Env | Default |
|---|---|---|---|
| Figma API key | --figma-api-key | FIGMA_API_KEY | required |
| Figma OAuth token | --figma-oauth-token | FIGMA_OAUTH_TOKEN | unset |
| Port | --port | FIGMA_TO_CODE_MCP_PORT or PORT | 3333 |
| Host | --host | FIGMA_TO_CODE_MCP_HOST | 127.0.0.1 |
| Output format | --json | OUTPUT_FORMAT | yaml |
| Skip image tools | --skip-image-downloads | SKIP_IMAGE_DOWNLOADS=true | false |
| SVG output dir | --svg-output-dir | FIGMA_SVG_OUTPUT_DIR | temp dir |
| Prefetch library variables | --library-file-keys | FIGMA_LIBRARY_VARIABLE_PREFETCH_FILE_KEYS | unset |
| Cache path | --library-cache-path | FIGMA_MCP_CACHE_PATH | temp cache file |
| Cache TTL | n/a | FIGMA_MCP_CACHE_TTL_MS | 7 days |
| Force cache refresh | n/a | FIGMA_MCP_REFRESH_CACHE | off |
Notes:
--library-file-keys and FIGMA_LIBRARY_VARIABLE_PREFETCH_FILE_KEYS are comma-separated Figma library file keys.FIGMA_MCP_CACHE_PATH may point to either a file or a directory. If it is a directory, the cache file is stored as figma-mcp-library-cache.json inside it.FIGMA_MCP_REFRESH_CACHE forces a re-fetch on startup even if a cache file exists.Example .env:
One execution of get_figma_design makes the following API calls:
| Call | Endpoint | Tier | Description |
|---|---|---|---|
| 1 | GET /v1/files/{fileKey}/nodes | T1 | Fetch requested nodes (geometry=paths) |
| 2 | GET /v1/files/{fileKey}/styles | T3 | Fetch all styles |
| 3 | GET /v1/files/{fileKey}/variables/local | T2 | Fetch local variables (if resolveVariables=true) |
| 4 | GET /v1/components/{key} | T3 | Resolve component key β library file (up to 3 tries) |
| 5 | GET /v1/files/{libFileKey}/components | T3 | Fetch all components from library |
| 6+ | GET /v1/files/{libFileKey}/nodes | T1 | Fetch component definitions from each library |
Amount of T1 calls: 1 + N (N=number of unique library files) Amount of T2 calls: 1 (if resolveVariables=true) Amount of T3 calls: 2 + N (styles + component key resolution + N library components)
For Professional plan with Dev/Full seat: 10 req/min (Tier 1), 25 req/min (Tier 2), 50 req/min (Tier 3).
This project was initially inspired by the ideas explored in the original Figma Context MCP by GLips: https://github.com/glips/figma-context-mcp
While the original project provides a Model Context Protocol (MCP) server that simplifies Figma data for use with AI coding agents, this implementation has been substantially redesigned with a different data model, API, and processing approach, and should be considered an independent system.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/figma-to-code-mcp)<a href="https://allmcps.com/mcp/figma-to-code-mcp"><img src="https://allmcps.com/api/badge/figma-to-code-mcp?style=directory" alt="Figma To Code MCP on AllMCPs" /></a>