MCP Configs2026年3月30日·1 分钟阅读

Figma Context MCP — Design-to-Code for AI Agents

MCP server that gives AI coding agents access to Figma design context. Provides layout, styles, and component info so agents like Cursor and Claude Code can generate pixel-perfect code. 14K+ stars.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 17/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
Mcp Config
安装
Stage only
信任
信任等级:Established
入口
Figma Context MCP — Design-to-Code for AI Agents
安全暂存命令
npx -y tokrepo@latest install b51a5814-eacc-4864-a047-9fd66c255006 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

TL;DR
MCP server that feeds Figma design context to AI coding agents for accurate code generation.
§01

What it is

Figma Context MCP is an MCP server that gives AI coding agents direct access to Figma design data. It exposes layout information, styles, typography, colors, and component hierarchies through the Model Context Protocol, so agents like Claude Code or Cursor can generate frontend code that matches the actual design.

The target audience is frontend developers and design-to-code teams who want AI agents to produce pixel-accurate implementations without manually describing every design detail in prompts.

§02

How it saves time or tokens

Without this MCP server, developers must manually describe Figma designs in text -- colors as hex codes, spacing in pixels, font weights, component nesting. That process is both tedious and token-expensive. Figma Context MCP feeds structured design data directly to the agent, eliminating description overhead.

The server also reduces iteration cycles. Instead of generating code, comparing to the design, and re-prompting with corrections, the agent gets the correct values on the first pass.

§03

How to use

  1. Install and configure the Figma Context MCP server in your AI coding tool:
{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "@anthropic/figma-context-mcp"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-figma-token"
      }
    }
  }
}
  1. Generate a Figma personal access token from your Figma account settings.
  1. Share your Figma file link with the AI agent. The MCP server fetches layout, styles, and component data automatically.
§04

Example

Using Figma Context MCP with Claude Code:

# In your Claude Code session, reference a Figma file:
> Implement the login page from this Figma design:
  https://www.figma.com/file/abc123/Login-Page

# Claude Code reads the design via MCP and generates:
# - Correct colors, fonts, and spacing
# - Component hierarchy matching the Figma layers
# - Responsive layout based on Figma constraints
§05

Related on TokRepo

§06

Common pitfalls

  • The Figma access token must have read permissions on the target file. Shared files in an organization may require admin approval for API access.
  • Large Figma files with hundreds of frames produce substantial context. Scope your request to a specific page or frame to avoid exceeding the agent's context window.
  • Auto-layout constraints in Figma do not always map cleanly to CSS flexbox. Review the generated layout code for edge cases.
  • The MCP server reads the current state of the Figma file. If the design changes after the agent starts, re-fetch to get updated data.

常见问题

Which AI coding tools support Figma Context MCP?+

Any tool that supports the Model Context Protocol can use this server. That includes Claude Code, Cursor, VS Code with MCP extensions, and other MCP-compatible agents. The server runs as a local process and communicates via the standard MCP protocol.

Do I need a paid Figma plan?+

You need a Figma account with API access. Free Figma plans support personal access tokens for reading your own files. Organization plans may have additional API access controls managed by workspace admins.

How accurate is the generated code?+

Accuracy depends on the AI agent and the complexity of the design. The MCP server provides exact values for colors, fonts, spacing, and dimensions. Simple layouts produce near-pixel-perfect code. Complex responsive designs may need manual adjustments.

Can this server handle Figma components and variants?+

Yes. The server exposes component hierarchies, variant properties, and instance overrides. The AI agent can use this data to generate reusable component code with proper prop interfaces.

Does the server send image assets?+

The server provides references to image fills and exports. Actual image downloads depend on the Figma API's image export endpoint. The agent typically receives URLs for image assets rather than raw image data.

引用来源 (3)
🙏

来源与感谢

Created by GLips. Licensed under MIT. GLips/Figma-Context-MCP — 14,000+ GitHub stars

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产