Skip to content
MCP server

Figma To Code MCP

MCP server that feeds compact, CSS-oriented Figma design data to AI coding tools

Runs locallyActively maintainedStatus and history

The repository was last updated 21 days ago and is published under MIT.

Install
Pricing
Open source
Platforms
CLI, API, self-hosted
Runs
Locally
GitHub stars
7
Last commit
21 days ago
Language
TypeScript

Similar MCP servers

About Figma To Code MCP

Figma To Code MCP is an open-source MCP server for design and media. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a terminal

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

Add to claude_desktop_config.json

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

Add to ~/.cursor/mcp.json

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

Add to .vscode/mcp.json

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

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Using several servers? Build one config file with the MCP config generator.

Configuration

  • FIGMA_API_KEYYour Figma Personal Access Token, learn more here: https://www.figma.com/developers/api#access-tokensRequired

Tools this server provides (3)

Taken from the project documentation; the running server may differ.

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.

What it does

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

Pricing

Open source

Free, MIT-licensed open-source server; uses your own Figma API token.

More servers for the same service

Figma To Code MCP 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.

How AIPoweredBot checks servers