Figma To Code MCP logo

Figma To Code MCP

Converts Figma files, frames, and groups into compact design data, assets, and renders for AI-assisted UI implementation.

Install Figma To Code MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "figma-to-code-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@tmegit/figma-to-code-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

figma-to-code-mcp connects AI coding clients to Figma through the Figma API and reshapes design data into a compact, CSS-aligned format. Its tools retrieve UI structure and styles, image-fill URLs, SVG assets, and PNG renders for visual comparison. Use it when an agent needs to turn a Figma file, frame, or group into implementation-ready frontend information rather than raw Figma metadata. Cursor is explicitly supported through its MCP workflow.

Use cases

  • Generate UI code from a Figma frame or group
  • Inspect component variants and their properties
  • Retrieve image-fill URLs for frontend assets
  • Compare an implementation with a rendered Figma node

Key features

  • CSS-aligned, LLM-optimized design extraction
  • SVG asset export and 1x PNG rendering
  • Image-fill URL retrieval
  • Component-set and variant file output
  • Figma variable resolution
  • Compact tokens, layout, and style representation

Tools3

What Figma To Code MCP lets your agent do. Expand a tool for its parameters.

Self-reported~52 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

9/9 checks healthy over the last 58d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · @tmegit/figma-to-code-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars7Stargazers on the source repository.
npm downloads1.3kPackage downloads in the last 30 days.
Last commit11d agoMost recent push to the default branch.
Tools exposed3Callable tools this server registers over MCP.
Directory activity8 viewsConfig copies, upvotes, and views on AllMCPs.

How Figma To Code MCP works

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.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Figma To Code MCP

figma-to-code-mcp is an MCP server that connects AI coding clients to Figma through the Figma API. Its main tools are get_figma_design for compact CSS-aligned design data plus SVG and PNG assets, get_image_fills for image URLs, and render_node_images for PNG renders.

Give Cursor the server and a Figma personal access token with the required scopes, then paste a Figma file, frame, or group link into an agent-mode chat. Cursor can use the returned design data to generate UI code.

Use file_content:read, library_content:read, and library_assets:read for core extraction. Add file_variables:read for variables and file_comments:read for comments. Variable resolution requires an Enterprise plan, while comment access is optional.

Call get_figma_design to export SVG assets and render the requested node as a 1x PNG. The response provides asset-folder names and relative filenames; use svgOutputDir to choose the SVG destination. Use render_node_images for PNG renders of selected nodes.

Set includeComponentVariants to true when retrieving the design. The server then fetches additional component variants across sizes, colors, and states, including their properties and available visuals, but the response becomes larger.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFigma To Code MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/figma-to-code-mcp?style=directory)](https://allmcps.com/mcp/figma-to-code-mcp)
HTML Embed
<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>