# figma-to-code-mcp [Health: Active]

**Category:** 📐 Architecture & Design  
**Repository:** https://github.com/felixAnhalt/figma-to-code-mcp  
**GitHub Stars:** 7  
**npm Downloads (last month):** 1779  
**Views:** 12  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/figma-to-code-mcp

## Description
MCP server to extract Figma design information and convert it to mostly css for coding agents.

## Tools
Capabilities this server exposes over MCP:

- **get_figma_design** — Fetches CSS-aligned, LLM-optimized design data. Exports SVG assets and a PNG render.
- **get_image_fills** — Retrieves image fill URLs from a Figma file
- **render_node_images** — Renders Figma nodes as PNG images

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "figma-to-code-mcp": {
    "command": "npx",
    "args": ["-y","@tmegit/figma-to-code-mcp"]
  }
}
```

## Documentation

## What figma-to-code-mcp does

figma-to-code-mcp extracts the parts of a Figma design that are useful for building a user interface. It converts Figma API data into a compact response with CSS-mappable fields such as layout direction, backgrounds, font sizes, spacing, colors, typography, effects, text, and component information. Figma-specific metadata that is not useful for implementation, including bounding boxes and constraint data, is omitted.

The output preserves node-local layout and styling while placing reusable design values in a shared token registry. Auto-layout structures are represented with flexbox-oriented primitives. Overlays and freeform elements can retain local absolute positioning, including parent-relative left and top offsets. Variable references can be resolved to their actual values when the required Figma access and plan are available.

## How it works

An agent receives a link to a Figma file, frame, or group through an MCP-capable coding client. `get_figma_design` then retrieves the requested design and returns an LLM-oriented representation using schema v3. The response can include a rendered 1x PNG for comparing an implementation against the source design, along with exported SVG files and paths relative to the asset directory.

Component sets are returned by default with their property keys and available values. Each set is written as YAML or JSON files in a component-set directory. Large sets are split into an index and separate variant files; large section roots similarly place frame designs in files under the frames directory. Passing `includeComponentVariants: true` retrieves additional component states, sizes, colors, and other variants, increasing the amount of data fetched and returned.

## Setup and configuration

Create a Figma personal access token with these scopes:

- `file_content:read` for file nodes, layout, and styles
- `library_content:read` for published components and styles
- `library_assets:read` for referenced published library components
- `file_variables:read` for variable access on Enterprise plans
- `file_comments:read` for node comments

Variable resolution requires a Figma Enterprise plan. Set `resolveVariables: false` when that capability is unavailable. If comment access cannot be used, extraction continues without comments and emits a warning.

The server can be run with `--skip-image-downloads` when node PNG downloads are not wanted. In that mode, only `get_figma_design` is registered; SVG export remains available, but node PNG rendering is disabled.

## Tools and capabilities

- `get_figma_design` returns compact design data, exports SVG assets, and renders the requested node as a PNG. Its response identifies asset folders and relative filenames for locating those files.
- `get_image_fills` retrieves image-fill URLs from a Figma file.
- `render_node_images` renders selected Figma nodes as PNG images.
- Text with mixed character styling can be represented as ordered `textRuns`, while the full text and base node style remain available.
- Gradients, asymmetric borders, SVG viewports, positioned children, tokens, components, and UI-critical layout details are represented in the v3 response.

There is no separate `read_vector_svg` MCP tool. SVG files are exported as part of the design retrieval flow.

## Limitations and notes

The server's variable-resolution behavior depends on Figma Enterprise access. Component-variant retrieval produces larger responses because it fetches more source data and visuals. The `--skip-image-downloads` option removes the node-rendering capability from the registered tool set, although SVG export still works. Consumers should follow the v3 response contract; the older v2 CSS-property mapping describes a previous format rather than the current response structure.

_Full upstream README: https://allmcps.com/mcp/figma-to-code-mcp/readme_

