Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Converts Figma designs into structured code context with token-aware styling, enabling AI agents to generate production-level frontend code.

README.md

Figma Context MCP

一个 MCP 服务器,用于将 Figma 设计转换为结构化代码上下文,支持 AI 代理生成生产级前端代码。

通过提供 Figma 节点 URL,服务器会提取设计数据并生成代码所需的完整上下文信息。

功能

  • 设计结构提取 - 从 Figma 节点提取布局、尺寸、文本、颜色等设计结构
  • 视觉预览渲染 - 生成设计的图片预览,帮助 AI 代理准确理解设计意图
  • 代理集成 - 与 AI 代理的技能库(如 component-skills)无缝配合
  • 多种传输模式 - 支持 stdio(Claude Desktop、Cursor)和 HTTP 服务器模式

工作流程

Figma 设计 → MCP 工具提取 → 结构化数据 + 预览图 → AI 代理
                                                     ↓
                                          映射到组件库 → 生成代码

快速开始

1. 安装

全局安装(推荐): ``bash npm install -g @sking7/figma-context-mcp ``

或从源代码构建: ``bash git clone https://github.com/cola-sk/figma-context-mcp cd figma-context-mcp npm install npm run build ``

2. 配置 Figma 访问令牌

获取 Figma 个人访问令牌,然后配置你的 MCP 客户端。

GitHub Copilot (VS Code)

编辑项目根目录的 .vscode/mcp.json

全局安装版本: ``json { "servers": { "figma-context-mcp": { "type": "stdio", "command": "figma-context-mcp", "env": { "FIGMA_ACCESS_TOKEN": "YOUR_TOKEN" } } } } ``

本地开发版本(使用 git 代码构建): ``json { "servers": { "figma-context-mcp": { "type": "stdio", "command": "node", "args": ["/path/to/figma-mcp/build/index.js"], "env": { "FIGMA_ACCESS_TOKEN": "YOUR_TOKEN" } } } } ``

/path/to/figma-mcp 替换为你克隆的项目路径,确保已执行 npm run build

Claude Desktop

编辑 claude_desktop_config.json

全局安装版本: ``json { "mcpServers": { "figma-context-mcp": { "type": "stdio", "command": "figma-context-mcp", "env": { "FIGMA_ACCESS_TOKEN": "YOUR_TOKEN" } } } } ``

本地开发版本(使用 git 代码构建): ``json { "mcpServers": { "figma-context-mcp": { "type": "stdio", "command": "node", "args": ["/path/to/figma-mcp/build/index.js"], "env": { "FIGMA_ACCESS_TOKEN": "YOUR_TOKEN" } } } } ``

/path/to/figma-mcp 替换为你克隆的项目路径

Cursor

编辑 mcp.json

全局安装版本: ``json { "mcpServers": { "figma-context-mcp": { "type": "stdio", "command": "figma-context-mcp", "env": { "FIGMA_ACCESS_TOKEN": "YOUR_TOKEN" } } } } ``

本地开发版本(使用 git 代码构建): ``json { "mcpServers": { "figma-context-mcp": { "type": "stdio", "command": "node", "args": ["/path/to/figma-mcp/build/index.js"], "env": { "FIGMA_ACCESS_TOKEN": "YOUR_TOKEN" } } } } ``

/path/to/figma-mcp 替换为你克隆的项目路径

3. 使用

向 AI 助手提供 Figma 节点 URL:

提取这个 Figma 设计的代码上下文:https://www.figma.com/design/FILE_KEY/MyFile?node-id=123-456

助手将获取设计数据并根据其技能库生成对应的代码。

开发

本地设置

git clone https://github.com/cola-sk/figma-context-mcp
cd figma-context-mcp
npm install
npm run build
npm start

运行模式

stdio 模式(Claude Desktop / Cursor): ``bash npm start ``

HTTP 服务器模式: ``bash npm start -- --mode http --port 3000 ``

服务器地址:http://localhost:3000/mcp

MCP Inspector

npm run inspector

开发监控

npm run dev

项目结构

figma-context-mcp/
├── src/
│   ├── index.ts              # MCP 服务器入口和工具定义
│   └── server-runner.ts      # HTTP 传输层(Express)
├── data/
│   ├── overview.md           # 服务器概览资源
│   └── quickstart.md         # 快速开始指南
├── build/                    # 编译输出
├── mcp-config.json           # MCP 服务器配置
└── package.json

许可证

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.