# Figma CodeKit MCP

> Figma CodeKit MCP is an open-source MCP server for design and media. Convert Figma frames to code, then pixel-diff the render until it matches. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/mehmoodqureshi/figma-codekit-mcp
- **MCP Registry name:** io.github.Mehmoodqureshi/figma-codekit-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

Most Figma-to-code tools stop once the code is generated. This server adds a verification loop: it converts a frame to self-contained HTML deterministically (no LLM involved), renders the result in Chromium, pixel-diffs it against the Figma reference and reports what is missing or misplaced so the calling agent can fix it and verify again.

Verification combines three signals: the pixel mismatch ratio with worst regions, bounding-box overlap for every element, and paint-order and clipping checks that catch elements stacked the wrong way or cut off by an ancestor. It can also verify a running page, such as your own app on localhost, against the frame, so it can sit beside Figma's official MCP server or Framelink.

Tools return file paths and numbers instead of large blobs, to protect the agent's context. Frames are cached per frame, so after the first convert the loop works offline. It needs a Figma personal access token with File content read scope and runs over stdio via npx.

## Features

- **Deterministic conversion:** Turn a frame into HTML, with React, Next.js or Tailwind output as options.
- **Design tokens:** Emit tokens in W3C DTCG format, CSS and a Tailwind v4 theme.
- **Pixel-diff verify:** Render in Chromium and measure how far the output is from the frame.
- **Element checks:** Compare each element's box and paint order against the design.
- **Verify live pages:** Check a running app URL against a frame.
- **Setup check:** A --check flag reports whether Node, token and Chromium are ready.

## Good for

- Build a page from a frame and check it matches
- Find which element is 6px off
- Catch stacking and clipping bugs the diff misses
- Check an existing app against its design

## Install

### Claude Code (Terminal)

```sh
claude mcp add figma-codekit-mcp --env FIGMA_TOKEN='<FIGMA_TOKEN>' -- npx -y figma-codekit-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "figma-codekit-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "<FIGMA_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "figma-codekit-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "<FIGMA_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "figma-codekit-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "<FIGMA_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "figma-codekit-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "<FIGMA_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "figma-codekit-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "<FIGMA_TOKEN>"
      }
    }
  }
}
```

## Tools

- `figma_convert`: Fetch a frame and produce HTML, IR, images, reference and design tokens.
- `figma_verify`: Render and pixel-diff against the reference with targeted fix instructions.
- `figma_inspect`: Print the intermediate representation as an outline.

## FAQ

### Does it use an LLM internally?

No. The conversion is deterministic and the refine loop runs through your calling agent.

### What credentials are needed?

A Figma personal access token with File content: read scope.

### Does it replace Figma's own MCP server?

No; the README says it works alongside it or Framelink.

### Does it work offline?

After the first convert, responses are cached so the loop runs offline.

### Is Figma CodeKit MCP free?

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

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

Run this command in your terminal: claude mcp add figma-codekit-mcp --env FIGMA_TOKEN='<FIGMA_TOKEN>' -- npx -y figma-codekit-mcp

### What are the best alternatives to Figma CodeKit MCP?

The closest alternatives to Figma CodeKit MCP are REA, HyperFrames by HeyGen, Context7, Chrome DevTools MCP and Codebase Memory.

## Where this comes from

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

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [HyperFrames by HeyGen](https://ai-powered.com/mcp/hyperframes-by-heygen): HyperFrames by HeyGen is a freemium MCP server for design and media.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/figma-codekit-mcp
