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

Figma To Code MCP

作者:felixAnhalt版本 0.29.0i★ –i在你的电脑上运行
注册名称io.github.felixAnhalt/figma-to-code-mcp

安装

概览

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

LLM-optimized Figma MCP server.

PopNx MCP 的三大支柱

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

它能帮你做什么

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

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

安装

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

安装之前

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

你需要

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

你用的是哪个应用?

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

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

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

在终端中运行这条命令

claude mcp add figma-to-code --env FIGMA_API_KEY=your-value -- npx -y @tmegit/figma-to-code-mcp --stdio

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

在 Cursor 中打开

或者自己复制设置

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

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

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

在 VS Code 中打开

或者自己复制设置

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

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

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

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

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

需要你填写的值

  • FIGMA_API_KEY 机密 必填 env
    Your Figma Personal Access Token, learn more here: https://www.figma.com/developers/api#access-tokens

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

它能做什么

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

基础检查i

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

  • ✓ 通过

    作者与仓库一致

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

  • … 尚未检查

    仍在维护

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

  • … 尚未检查

    有许可证

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

  • – 不适用

    端点有响应

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

  • – 不适用

    使用 OAuth 登录

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

  • … 尚未检查

    工具描述中没有隐藏指令

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

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

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

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

常见问题

Figma To Code MCP 安全吗?

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

它需要哪些密钥或代码?

你需要填写:FIGMA_API_KEY

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

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

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.29.0)于4个月前进入注册中心。

哪些应用可以使用它?

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

有什么可以替代它?

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

替代选择

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

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

Figma Context MCP

作者:GLips

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

在你的电脑上运行★ 16,165MIT5个月前更新
安装

Claude Real Video

作者:HUANGCHIHHUNGLeo

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

在你的电脑上运行★ 2,284MIT2个月前更新
安装

Figma MCP Server

作者:figma

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

在云端运行★ 2,15213个月前更新
安装

作者的 README

打开 README

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

Figma To Code MCP Transform Figma design data into a compact, LLM-friendly format for code generation and UI building.

Why This Project?

Figma To Code MCP specializes in extracting only the information LLMs need to build UIs while removing Figma-specific metadata that isn't relevant for code generation. The result:

  • ✅ 99.5% size reduction on real Figma files (65 MB → 128 KB)
  • ✅ Compact, CSS-mappable fields (style.background, layout.direction, style.fontSize)
  • ✅ Complete UI-building data preserved (layout, styling, text, components)
  • ✅ Node-local layout and styles with reusable values in a shared token registry
  • ✅ Omits Figma internals - no bounding boxes or constraint metadata
  • ✅ Variable resolution - resolves Figma variables to actual values
  • ✅ SVG support - exports vector graphics to disk
  • ✅ Pattern collapsing - deduplicates repeating UI patterns

Give Cursor and other AI-powered coding tools access to your Figma files with this Model Context Protocol server.

Available Tools

ToolDescription
get_figma_designFetches CSS-aligned, LLM-optimized design data. Exports SVG assets and a PNG render.
get_image_fillsRetrieves image fill URLs from a Figma file
render_node_imagesRenders Figma nodes as PNG images

get_figma_design exports SVG assets automatically. Its response contains svgAssetsFolder and relative svgPathInAssetFolder filenames; combine them to locate each file. Use svgOutputDir to export directly to a chosen assets directory. It also renders the requested node as a 1x PNG: its response contains renderedDesignNodeAssetsFolder and the file name renderedDesignNodePathInAssetFolder, which you can use to compare the built result with the design. There is no separate registered read_vector_svg tool.

By default get_figma_design returns the components the design uses in componentSets, each with propKeys and propValues (the values each prop takes across the set's members). Every set is written to its own file in componentSetsFolder, as YAML or JSON to match the output format, and componentSets lists each set's file, propKeys and propValues. A set larger than 228 KB becomes a folder named after the set: its file is /index.yaml (index.json in JSON output), which lists the variants, and each variant is its own .yaml beside it, with : replaced by - (for example 7-770.yaml). These examples assume the default YAML output; with JSON output every file ends in .json. A COMPONENT_SET root gets the same treatment: when its variants exceed 228 KB, its children move out, root.file points at /index.yaml, and each variant is a .yaml beside it, since root variants carry no node id. Every file value is relative to componentSetsFolder, so a variant's file is / .yaml, not relative to its set folder. A large SECTION root keeps each frame as a stub in root.children, and each frame's design is in its file in framesFolder (see Resolving frame files). For building components from a component library, pass includeComponentVariants: true to also get every other variant of those components (all sizes, colors, and states), with their props and any visuals that can be fetched. That fetches more from Figma and returns a larger response.

With --skip-image-downloads, only get_figma_design is registered; SVG export remains available, and no node PNG is rendered.

Required Scopes

Create a Figma personal access token with these scopes:

ScopePurpose
file_content:readRead file nodes, layout, styles
library_content:readRead published components/styles
library_assets:readResolve referenced components to their published library source
file_variables:readRead variables (Enterprise only, optional)
file_comments:readRead comments attached to nodes (optional)

Note: Variable resolution requires Enterprise plan. Set resolveVariables: false if not on Enterprise.

If comment access is unavailable, extraction continues without comments and logs a warning.

How it works

  1. Open your IDE's chat (e.g. agent mode in Cursor).
  2. Paste a link to a Figma file, frame, or group.
  3. Ask Cursor to implement the design.
  4. Cursor fetches CSS-aligned, LLM-optimized design data and generates accurate code.

Agents that build a page from a design should follow For LLMs.

This MCP server transforms Figma API data into an LLM-friendly format:

  • Compact layout/style fields (layout.direction, style.background, style.fontSize) instead of verbose Figma internals
  • Node-local styles with every distinct design value referenced from the tokens registry
  • Flexbox primitives for auto-layout, with parent-local positioning for overlays and freeform graphics
  • Complete UI data (colors, typography, spacing, effects)
  • 99.5% size reduction while preserving all UI-critical information

The current response uses schema v3. V3_CSS_PROPERTY_MAPPING.md describes the older v2 mapping, not the current response contract.

Interpreting visual details in v3

The response includes optional fields for details that cannot be represented by one text style or a simple flex layout:

FieldMeaning
textRunsOrdered text ranges with scalar style overrides, emitted only when character styling differs
layout.positionrelative for a containing block, or absolute for a non-flow child
layout.left, layout.topPixel offsets in the immediate parent's coordinate system, including zero and negative offsets
style.borderWidthsExplicit top/right/bottom/left widths for asymmetric borders, including zero-width edges
gradientHandlePositionsThree normalized node-local handles preserving a gradient's direction and geometry
svgViewportExported SVG viewBox in node-local pixels, including ink outside the node's original canvas. x or y is omitted when 0, and a missing one means 0
renderedDesignNodePathInAssetFolderFile name of a 1x PNG of the requested node, in renderedDesignNodeAssetsFolder, for comparing the build with the design

The existing full text field and node-level style remain present. When textRuns exists, render its runs in order rather than rendering text a second time. Resolve the node's base typography token first, then apply each run's scalar overrides. Run text concatenates to the original full text; plain runs inherit the base style. Explicit normal, none, and zero values reset inherited styling.

For positioned children, keep the emitted containing block, local dimensions, and offsets. Real auto-layout siblings stay in flex flow; overlay notifications, chart curves, and guides can share an absolute coordinate space. A Figma layout mode of NONE is not converted into a flex column.

borderWidths replaces the uniform borderWidth for asymmetric strokes. Apply the shared border color only to the indicated edges; do not invent a surrounding box border. Uniform borders continue using borderWidth.

Gradient handles may lie outside the unit square; do not clamp them or discard them in favor of a default direction.

SVG exports keep original node-local coordinates and include the union of the local canvas and visible geometry. Each exported node's svgViewport matches the file's viewBox. Keep the node's original layout footprint as a wrapper, then place the SVG or image at svgViewport.x / y (a missing one means 0), with the viewport's width / height. Do not stretch this expanded asset to the original node dimensions: chart series can have different ink bounds but must share the same local coordinate system. Preserve ancestor clipping. Solid paint colors are baked into design-exported assets so external images retain their colors too.

For LLMs

Follow this section when you build a page or component from a Figma node with get_figma_design.

Response overview
FieldMeaning
rootThe requested node's design tree. A plain frame is inline. A component set root with large variants is split (see Resolving component files). A large SECTION root keeps each frame as a stub (see Resolving frame files).
tokensShared values. Style fields hold keys into this registry, for example colors.sys.color.primary.default = #99121C.
componentSetsOne reference per component set the design uses: file, propKeys, propValues.

| componentSetsFolder | Folder with the component set files.

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

问 PopNx