figma-mcp
Enables AI agents to read, inspect, and export Figma designs programmatically. Provides tools for listing components, styles, and exporting assets in various formats.
README
<p align="center"> <img src="https://upload.wikimedia.org/wikipedia/commons/3/33/Figma-logo.svg" alt="Figma" width="80" height="80" /> <img src="https://mintlify.s3.us-west-1.amazonaws.com/mcp/logo/dark.svg" alt="MCP" width="380" height="380" /> </p>
<h1 align="center">figma-mcp</h1>
<p align="center"> <strong>An MCP server that lets AI agents interact with Figma designs</strong> </p>
<p align="center"> <a href="#installation">Installation</a> • <a href="#tools">Tools</a> • <a href="#use-cases">Use Cases</a> • <a href="#configuration">Configuration</a> </p>
What is this?
figma-mcp is a Model Context Protocol server that gives LLM agents (Claude, GPT, etc.) the ability to read, inspect, and export from Figma files programmatically.
Built with the official MCP Python SDK using the FastMCP API.
Architecture
┌─────────────────────┐
│ Claude Desktop / │
│ Any MCP Client │
└────────┬────────────┘
│ stdio
┌────────▼────────────┐
│ figma-mcp Server │
│ (FastMCP) │
└────────┬────────────┘
│ HTTPS
┌────────▼────────────┐
│ Figma REST API │
│ api.figma.com/v1 │
└─────────────────────┘
Project structure:
src/figma_mcp/
__init__.py # Entry point
config.py # Environment config (dotenv)
utils.py # Logger (stderr) + validation helpers
figma_client.py # Figma API client (requests)
server.py # FastMCP server + all tool definitions
Installation
git clone https://github.com/Anakintano/figma-mcp.git
cd figma-mcp
pip install -e .
Or with uv (recommended):
uv pip install -e .
Configuration
1. Get a Figma Token
- Go to Figma Settings → Account → Personal access tokens
- Click Generate new token
- Copy the token
2. Set Environment Variable
Create a .env file in the project root:
FIGMA_ACCESS_TOKEN=figd_your_token_here
3. Claude Desktop Setup
Add to your claude_desktop_config.json:
{
"mcpServers": {
"figma": {
"command": "python",
"args": ["-m", "figma_mcp"],
"cwd": "/path/to/figma-mcp",
"env": {
"FIGMA_ACCESS_TOKEN": "figd_your_token_here"
}
}
}
}
Tools
| Tool | Description | Key Params |
|---|---|---|
get_figma_file |
Get a complete Figma file | file_key |
get_frame_nodes |
Get specific nodes/frames | file_key, node_ids |
list_components |
List all components | file_key |
list_styles |
List all styles | file_key |
export_assets |
Export as PNG/JPG/SVG/PDF | file_key, node_ids, format, scale |
Finding your file key: In any Figma URL like
https://www.figma.com/file/ABC123xyz/My-Design, the file key isABC123xyz.
Use Cases
1. Design System Audit
Prompt: "List all components in my Figma file
abc123and tell me which ones don't follow our naming convention"
The agent uses list_components to fetch every component, then analyzes naming patterns — great for enforcing consistency across large design systems.
2. Developer Handoff
Prompt: "Get the layout details of the login page frame
1:42from filexyz789"
Uses get_frame_nodes to extract exact positions, sizes, colors, fonts, and spacing — giving developers precise specs without leaving the chat.
3. Asset Export Pipeline
Prompt: "Export all icon frames
1:10,1:11,1:12as SVGs from fileabc123"
The agent calls export_assets with format=svg and returns download URLs for each icon, ready for use in code.
4. Style Token Extraction
Prompt: "What are all the color and text styles in file
myDesign? Format them as CSS variables"
Uses list_styles to pull every defined style, then the LLM formats them into usable CSS custom properties:
--color-primary: #3B82F6;
--color-secondary: #10B981;
--font-heading: Inter, 24px, 700;
5. Design Review / QA
Prompt: "Get the full structure of file
abc123and check if all frames have consistent padding"
Fetches the entire file with get_figma_file, then the LLM traverses the node tree to flag layout inconsistencies.
6. Multi-File Comparison
Prompt: "Compare the components in file
designV1vsdesignV2and list what changed"
Calls list_components on both files, and the LLM diffs the results to produce a changelog of design changes.
Example Prompts
Here are ready-to-use prompts for Claude Desktop with this MCP server:
"Get the structure of my Figma file with key abc123XYZ"
"Show me all components in this design file"
"Export frame 1:42 as an SVG"
"What text styles are defined in this design?"
"Extract the layout specs for nodes 1:2 and 3:4"
"List all color styles and convert them to a Tailwind config"
"Get the login page frame and describe the UI elements"
API Reference
get_figma_file
| Param | Type | Description |
|---|---|---|
file_key |
str |
Figma file key |
get_frame_nodes
| Param | Type | Description |
|---|---|---|
file_key |
str |
Figma file key |
node_ids |
list[str] |
Node IDs (e.g., ["1:2", "3:4"]) |
list_components
| Param | Type | Description |
|---|---|---|
file_key |
str |
Figma file key |
list_styles
| Param | Type | Description |
|---|---|---|
file_key |
str |
Figma file key |
export_assets
| Param | Type | Description |
|---|---|---|
file_key |
str |
Figma file key |
node_ids |
list[str] |
Node IDs to export |
format |
str |
png, jpg, svg, pdf (default: png) |
scale |
float |
Scale factor (default: 2.0) |
Running Tests
pytest tests/ -v
License
This project is licensed under the MIT License. Copyright © 2026 Aditya Saxena / anakintano
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。