
tranhoaihung/figma-ui-mcp 是从 https://github.com/tranhoaihung/figma-ui-mcp. 导入的 MCP 服务器候选
概览
tranhoaihung/figma-ui-mcp 是从 https://github.com/tranhoaihung/figma-ui-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
Claude 代码到 Figma ·反重力到 Figma ·光标到 Figma ·任何 MCP IDE 到 Figma
✅ 测试过:Claude Code,Antigravity | 🔧 兼容:光标、VS Code、Windsurf、Zed(任何 MCP 标准客户端)
双向Figma MCP桥接——让AI助手(Claude Code、Cursor、Windsurf、Antigravity、VS Code Copilot或任何兼容MCP的IDE)直接在Figma画布上绘制UI,并将现有设计以结构化数据、截图或代码准备好的标记形式读取回来。无需Figma API密钥——完全通过localhost运行。
需要Figma Desktop——该插件通过
localhostHTTP轮询与MCP服务器通信。Figma的网页应用不允许访问本地主机网络,因此需要Figma Desktop。
本地主机桥接的工作原理
MCP服务器启动一个绑定在localhost:38451的小型HTTP服务器。Figma插件(运行在Figma Desktop内)使用长轮询——服务器会保留最多8秒的请求直到工作到达,当新操作排队时立即刷新(近实时延迟)
Claude 代码(CLI)
Claude Desktop
编辑配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
figma-ui-mcp
Claude Code to Figma · Antigravity to Figma · Cursor to Figma · Any MCP IDE to Figma
✅ Tested: Claude Code, Antigravity | 🔧 Compatible: Cursor, VS Code, Windsurf, Zed (any MCP stdio client)
Bidirectional Figma MCP bridge — let AI assistants (Claude Code, Cursor, Windsurf, Antigravity, VS Code Copilot, or any MCP-compatible IDE) draw UI directly on Figma canvas and read existing designs back as structured data, screenshots, or code-ready tokens. No Figma API key needed — works entirely over localhost.
Requires Figma Desktop — the plugin communicates with the MCP server over
localhostHTTP polling. Figma’s web app does not allow localhost network access, so Figma Desktop is required.
Claude ──figma_write──▶ MCP Server ──HTTP (localhost:38451)──▶ Figma Plugin ──▶ Figma Document
Claude ◀─figma_read──── MCP Server ◀──HTTP (localhost:38451)── Figma Plugin ◀── Figma Document
How the localhost bridge works
The MCP server starts a small HTTP server bound to localhost:38451. The Figma plugin (running inside Figma Desktop) uses long polling — the server holds requests up to 8s until work arrives, flushing immediately when new ops are queued (near-realtime latency <100ms). All traffic stays on your machine — nothing is sent to any external server.
Multi-instance support (v2.3.0+): Multiple Figma files/tabs can connect simultaneously. Each plugin instance sends a sessionId, and the bridge routes operations to the correct session. Use the optional sessionId param in figma_write/figma_read to target a specific file.
Features
| Direction | Tool | What it does |
|---|---|---|
| Write | figma_write |
Draw frames, shapes, text, prototypes via JS code |
| Read | figma_read |
Extract node trees, colors, typography, screenshots |
安装
npx -y figma-ui-mcp配置
{
"mcpServers": {
"figma": {
"command": "npx",
"args": ["-y", "figma-ui-mcp"]
}
}
}