原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Figma CodeKit MCP

作者:Mehmoodqureshi版本 0.3.0i★ –i在你的电脑上运行
注册名称io.github.Mehmoodqureshi/figma-codekit-mcp

安装

概览

作者提供的说明(英文原文)

Figma to pixel-verified code: HTML/React/Tailwind + tokens, then a render + pixel-diff verify loop.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 设计、图片与音频
  • 你需要填写:FIGMA_TOKEN

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: FIGMA_TOKEN, FIGMA_MCP_CACHE_DIR

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "figma-codekit": {
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "your-value",
        "FIGMA_MCP_CACHE_DIR": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add figma-codekit --env FIGMA_TOKEN=your-value --env FIGMA_MCP_CACHE_DIR=your-value -- npx -y figma-codekit-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "figma-codekit": {
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "your-value",
        "FIGMA_MCP_CACHE_DIR": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "figma-codekit": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "figma-codekit-mcp"
      ],
      "env": {
        "FIGMA_TOKEN": "your-value",
        "FIGMA_MCP_CACHE_DIR": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • FIGMA_TOKEN 机密 必填 env
    Figma personal access token (Settings -> Security -> Personal access tokens, scope "File content: read"). May instead be placed in a .figma-token file in the project directory. FIGMA_API_KEY is accep…
  • FIGMA_MCP_CACHE_DIR env
    Where converted frames are cached. Defaults to .figma-cache/ in the directory the server starts from.

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 Mehmoodqureshi 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“设计、图片与音频”中的其他服务器比较i

  • 星标数多于此分类中其他 2797 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 2797 个服务器的 92% 更新
  • 基础检查结果等于或优于此分类中其他 2797 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Figma CodeKit MCP 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:FIGMA_TOKEN

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.3.0)于3天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Figma Context MCP, Claude Real Video, Figma MCP Server

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Figma Context MCP

Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.

作者:GLips广泛使用↓ 16.1万/周★ 1.6万5个月前更新

在你的电脑上运行

Claude Real Video

Let any LLM watch a video locally — and search everything it has ever watched.

作者:HUANGCHIHHUNGLeo广泛使用↓ 1106/周★ 22842个月前更新

在你的电脑上运行

Figma MCP Server

The Figma MCP server brings Figma design context directly into your AI workflow.

作者:figma广泛使用★ 215213个月前更新

在云端运行✓ mcp.figma.com

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

figma-codekit-mcp

Figma → code that is actually checked against the design. The pixel-diff verifier for Figma-to-code: it renders the output and diffs it against the frame until it converges — and it can verify *your own running app* the same way, so it works alongside Figma's official MCP server or Framelink rather than replacing them.

Most Figma-to-code tools stop at the moment of generation: they hand you JSX and walk away. Nobody ever renders the output and compares it to the frame, so the result stalls at "90% there" and you spend the afternoon nudging padding by eye.

This MCP server closes that loop. It converts a frame to self-contained HTML deterministically (no LLM, no hallucinated layout), then renders your code in Chromium, pixel-diffs it against the Figma reference, measures every element's box, and tells the agent exactly what is missing or misplaced. The agent edits, calls verify again, and repeats until the diff is at the anti-aliasing floor.

Figma reference First pass — 5.18% off Pixel diff Converged — 0.00%

Those are real artifacts from npm run example, which runs the loop end to end with no API key. The generate callback in that demo is a *scripted* stand-in for an LLM, so it shows the loop mechanics honestly — the measuring is real, the "model" is not.

Why the verify step matters

A Figma node tree tells you what the designer *declared*. It does not tell you what a browser will *do* with your CSS. Those diverge constantly — a flex gap that collapses, a font that falls back, an absolute child that escapes its parent. The only way to know is to render it and look.

figma_verify gives the agent three independent signals per pass:

  • Pixel diff — the overall mismatch ratio plus the worst regions, so it knows *how* wrong and *where*.
  • Element bounding-box IoU — every IR node is tagged data-ir-id, measured in the live DOM, and matched against its Figma box. This is what turns "the bottom-left looks off" into "the CTA button is missing" or "the price label is 40px too low".
  • Paint order and clipping — Figma lists children back-to-front, so a node's pre-order index *is* its paint order; elementsFromPoint over a sample grid gives the rendered order wherever two elements actually overlap. This catches the class of bug the other two signals are blind to by construction: elements present, in exactly the right box, stacked the wrong way round — or cut off by an ancestor's overflow where the design lets them overhang. Neither moves a box, and on a tall frame neither moves the diff ratio much, but a decorative overlay drawn over a photo instead of under it is the first thing a person sees. Reported as WRONG STACKING / OVER-CLIPPED, and reported even when the pixel diff has converged.

Tools

ToolWhat it doesNetwork
figma_convertFetch a frame → HTML + ir.json + images as files in assets/ (or data URIs with inlineAssets: true) + reference.png + design tokens (tokens.json in W3C DTCG format, tokens.css, a Tailwind v4 tailwind.theme.css). Optional react: true (component + the components/ it imports), next: true (a runnable App Router project) and tailwind: true (React/Next.js output as Tailwind classes), plus a responsive variant.Figma API (cached)
figma_verifyRender HTML in Chromium, pixel-diff vs the reference, IoU-check every element, check paint order and clipping, return targeted fix instructions. Pass url (and optionally selector) to verify a running page instead — your own app at http://localhost:3000, in any framework — against the frame.none (or your dev server)
figma_inspectPrint the IR as an indented outline (role, box, layout, text, tokens), filterable — read the structure without dumping raw Figma JSON into context.none
Responsive output depends on what the design actually declares

responsive: true reads Figma's sizing intent — FILL becomes flex/100%, HUG becomes fit-content, FIXED keeps its px. That only exists where the designer used Auto Layout.

A frame with no Auto Layout on the root is a canvas: every child is position:absolute at a coordinate on a 1440px artboard. There is nothing to relax, so making the root width:100% does not reflow it — the children stay pinned at their canvas coordinates and the right-hand side disappears under overflow:hidden. That reads exactly like a page breaking when you zoom.

For those frames the converter keeps the exact canvas and scales it to the viewport instead, so the design stays intact at every width and zoom level (down to 0.5x, after which the page scrolls). figma_convert tells you which strategy it used. If you want real reflow rather than proportional scaling, add Auto Layout in Figma — that is the signal the converter needs.

Every tool returns file paths and numbers, never large blobs. A converted frame is often 100+ KB of HTML; pushing that through a tool result would burn the agent's context for nothing. The agent reads and edits the files directly.

Figma responses are cached per frame, so after the first figma_convert the whole loop runs offline and free — including when you are rate-limited.

Quick start

You need a Figma personal access token: Figma → Settings → Security → Personal access tokens, scope File content: read.

export FIGMA_TOKEN=figd_REPLACE_WITH_YOUR_TOKEN

Add it to Claude Code:

claude mcp add figma --env FIGMA_TOKEN=$FIGMA_TOKEN -- npx -y figma-codekit-mcp@latest

Or for any MCP host that reads a JSON config:

{

"mcpServers": { "figma": { "command": "npx", "args": ["-y", "figma-codekit-mcp@latest"], "env": { "FIGMA_TOKEN": "figd_REPLACE_WITH_YOUR_TOKEN" } } } }

Then, in the agent: copy a frame link out of Figma (right-click the frame → Copy link to selection) and say *"convert this frame and verify it until it converges."*

Check your setup
FIGMA_TOKEN=$FIGMA_TOKEN npx -y figma-codekit-mcp@latest --check

It checks Node, whether a token was found (and where, never its value), whether Figma accepts it, and whether the Chromium figma_verify renders in is installed, then prints READY or what to fix. Exit code 0 means all three tools will work. If Chromium is missing (a skipped download, or CI), install it with npx -y figma-codekit-mcp@latest --install-browser.

Windows

npx resolves to npx.cmd, which some MCP hosts cannot spawn directly. If the server fails to start, point at the shim explicitly:

{

"command": "cmd", "args": ["/c", "npx", "-y", "figma-codekit-mcp@latest"] }

The loop, concretely

figma_convert  →  generated.html, reference.png, ir.json   (deterministic, no LLM)

↓ figma_verify → "NOT CONVERGED — 4.93% of pixels differ. Elements: 22/26 match — 1 missing, 3 misplaced. MISSING: button 'Get started' MISPLACED: h1 'Pricing plan' — 6px too high" ↓ agent edits generated.html ↓ figma_verify → "CONVERGED — 0.31% of pixels differ (threshold 2.00%)."

The refine loop runs through the calling agent, not through an LLM inside the server. That means no ANTHROPIC_API_KEY, no second model billing, and the agent keeps full context on what it already tried. A headless refine loop (src/refine/) still exists for library use.

Watch the loop without an agent

The same pipeline has a one-page local web front end, split in two: a chat on the left, the generated app on the right. You send a frame link, it asks what to build — HTML, React or Next.js; exact or responsive — and then converts, renders and diffs in front of you. The right pane carries the running app, its source files, the verify numbers and the pixel diff.

npm run site        # http://localhost:5173

It uses the same .figma-token and the same .figma-cache/, so a frame you have already converted re-runs offline in about a second. Useful for checking a frame converts cleanly before pointing an agent at it — and for showing someone what "verified against the design" means rather than describing it. Details in site/README.md.

Configuration

VariablePurpose
FIGMA_TOKENRequired. Also read from a .figma-token file in your project directory. FIGMA_API_KEY is accepted as an alias.
FIGMA_MCP_CACHE_DIRWhere converted frames are cached. Defaults to .figma-cache/ in the directory the server is started from.
ANTHROPIC_API_KEY / GEMINI_API_KEYOptional, headless refine loop only. The MCP server never calls an LLM.
FIGMA_MCP_SKIP_BROWSER_DOWNLOAD=1Skip the Chromium download on install. figma_convert and figma_inspect still work; figma_verify will not.

See .env.example. Add .figma-cache/ to your project's .gitignore — a cached frame keeps the original bitmaps and can be tens of megabytes.

FIGMA_FILE_TIMEOUT_MS (default 90000) caps how long figma_convert waits for Figma's whole-file download, which it falls back to when the per-node endpoint is rate-limited. When Figma will not answer, the tool says so within that time and, if the frame is already cached anywhere, builds from the cached copy and marks the result STALE CACHE instead of hanging.

Verify your own app, not just the generated HTML
figma_convert  url=<frame link>                      → .figma-cache/<frame>/ (reference.png)

figma_verify dir= url=http://localhost:3000/pricing selector="#plans"

Build the page however you like — Figma's official MCP server, Framelink, by hand — then point figma_verify at it. It screenshots the page (or just the selected element) at the frame's size and pixel-diffs it against Figma. Element-box and layering checks need the converter's data-ir-id markers, so for a URL only the pixel diff runs.

What it does not do

Being straight about the edges, because they are Figma's, not bugs:

  • Token names are derived, not designed, unless you are on Enterprise. The Figma Variables REST API is Enterprise-only. Without it the converter still collects every colour, font, size and spacing value into tokens.json / tokens.css / tailwind.theme.css, but names them after the value (--color-c8960c) because it cannot know intent. Rename them in your theme.
  • Figma rate-limits by cost. A very large file fetched repeatedly can lock a token out for hours (free accounts hit this sooner). Cached frames keep working offline; figma_convert tells you when the limit lifts.
  • **Component *prop* bindings need Code Connect.** Components are matched by name and reported, but the API does not expose which instance prop drove which value.
  • The diff has a floor. Anti-aliasing and font hinting keep the ratio around 0.5–1.5% even on a perfect match. threshold defaults to 2% for that reason — chasing 0 is chasing rendering noise.
  • One frame at a time. No whole-file crawling, by design: it keeps token spend and Figma rate-limit pressure predictable.

Use it as a library

The verify loop is framework-agnostic and does not need the MCP layer:

import { verifyLoop } from 'figma-codekit-mcp';

import fs from 'node:fs';

const result = await verifyLoop(

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx