# Figma To Code MCP

> Figma To Code MCP is an open-source MCP server for design and media. MCP server that feeds compact, CSS-oriented Figma design data to AI coding tools. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted
- **Repository:** https://github.com/felixanhalt/figma-to-code-mcp
- **GitHub stars:** 7
- **License:** MIT
- **MCP Registry name:** io.github.felixAnhalt/figma-to-code-mcp
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README says this server pulls Figma files into a condensed format meant for language models that generate interface code. It strips out Figma-specific metadata such as bounding boxes and constraints, keeps layout, styling, text and component data, and resolves shared values into a token registry so styles are referenced by key rather than repeated.

Beyond the design data, the server exports SVG vector assets to disk, renders a PNG of the requested node that can be used to compare a build against the design, and can return image fill URLs. It exposes three tools over MCP, and it can run over stdio or as an HTTP server.

It is aimed at developers who build UI from Figma files with an AI coding assistant. A Figma personal access token is required, and variable resolution needs a Figma Enterprise plan.

## Features

- **Compact design data:** Returns layout, style and text fields in a smaller, CSS-like structure instead of raw Figma node data.
- **Shared token registry:** Maps repeated colours and typography values to keys so each element references them instead of copying values.
- **SVG asset export:** Exports vector graphics to a chosen directory and reports the viewport needed to place each one.
- **Reference PNG rendering:** Renders the requested node as a 1x PNG so generated code can be checked against the design.
- **Component set handling:** Lists component sets with their props and values, splitting large sets into separate files.
- **Variable resolution:** Resolves Figma variables to concrete values when the account has access to them.

## Good for

- Generating front-end components from a Figma frame inside an AI coding assistant
- Exporting SVG icons and illustrations from a design file to a project assets folder
- Comparing a generated page against its Figma design using the rendered reference image
- Building component libraries from Figma component sets with their variant props

## Install

### Claude Code (Terminal)

```sh
claude mcp add figma-to-code-mcp --env FIGMA_API_KEY='<FIGMA_API_KEY>' -- npx -y @tmegit/figma-to-code-mcp
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "figma-to-code-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@tmegit/figma-to-code-mcp"
      ],
      "env": {
        "FIGMA_API_KEY": "<FIGMA_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `get_figma_design`: Fetches CSS-aligned, LLM-optimized design data and 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.

## FAQ

### What credentials does it need?

A Figma personal access token, provided as FIGMA_API_KEY or --figma-api-key. The README lists the required scopes for it.

### Is variable resolution available on every plan?

No. The README says variable resolution requires an Enterprise plan, and resolveVariables can be set to false otherwise.

### Which tools does the server expose?

get_figma_design, get_image_fills and render_node_images.

### How is it run?

Through npx with the @tmegit/figma-to-code-mcp package over stdio, or in HTTP mode by omitting the --stdio flag. The README says it requires Node.js 18 or later.

### Is Figma To Code MCP free?

Yes. Figma To Code MCP is open source, so you can use and self-host it for free.

### How do I add Figma To Code MCP to Claude Code?

Run this command in your terminal: claude mcp add figma-to-code-mcp --env FIGMA_API_KEY='<FIGMA_API_KEY>' -- npx -y @tmegit/figma-to-code-mcp

### What are the best alternatives to Figma To Code MCP?

The closest alternatives to Figma To Code MCP are Figma Context MCP, Figma CodeKit MCP, cursor-talk-to-figma-mcp, ready→made MCP and MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Figma Context MCP](https://ai-powered.com/mcp/figma-context-mcp-2): Figma Context MCP is an open-source MCP server for design and media.
- [Figma CodeKit MCP](https://ai-powered.com/mcp/figma-codekit-mcp): Figma CodeKit MCP is an open-source MCP server for design and media.
- [cursor-talk-to-figma-mcp](https://ai-powered.com/mcp/cursor-talk-to-figma-mcp): cursor-talk-to-figma-mcp is an open-source MCP server for design and media.
- [ready→made MCP](https://ai-powered.com/mcp/ready-made-mcp): ready→made MCP is an MCP server for design and media.
- [MCP](https://ai-powered.com/mcp/mcp-mweri1f8): MCP is a freemium MCP server for design and media.
- [Shippp](https://ai-powered.com/mcp/shippp): Shippp is a freemium MCP server for design and media.

---
Source: https://ai-powered.com/mcp/figma-to-code-mcp
