MCP Server for Figma API - Design token extraction, screenshot, and code generation for React, Vue, SwiftUI, Kotlin
Project description
Pixelbyte Figma MCP Server
A powerful MCP (Model Context Protocol) server for Figma API integration. Extract design tokens, generate production-ready code, and capture screenshots directly from your Figma designs.
Features
- 8 MCP Tools for complete Figma integration
- 10 Code Frameworks - React, Vue, Tailwind, CSS, SCSS, SwiftUI, Kotlin
- Design Token Extraction - Colors, typography, spacing
- Nested Children Support - Full component tree with all styles
- Screenshot Export - PNG, SVG, JPG, PDF formats
Installation
pip install pixelbyte-figma-mcp
Setup
-
Get your Figma Personal Access Token from Figma Settings
-
Set the environment variable:
export FIGMA_ACCESS_TOKEN="your-token-here"
- Add to Claude Code settings (
~/.claude/settings.json):
{
"mcpServers": {
"pixelbyte-figma-mcp": {
"command": "pixelbyte-figma-mcp",
"env": {
"FIGMA_ACCESS_TOKEN": "your-token-here"
}
}
}
}
Available Tools
| Tool | Description |
|---|---|
figma_get_file_structure |
Get file hierarchy and node tree |
figma_get_node_details |
Get detailed node properties |
figma_get_screenshot |
Export nodes as images |
figma_get_design_tokens |
Extract colors, fonts, spacing |
figma_generate_code |
Generate production-ready code |
figma_get_colors |
Extract fill, stroke, shadow colors |
figma_get_typography |
Extract font styles |
figma_get_spacing |
Extract padding and gap values |
Code Generation
Supports 10 frameworks with full nested children and styles:
# React + Tailwind
figma_generate_code(file_key="...", node_id="...", framework="react_tailwind")
# SwiftUI
figma_generate_code(file_key="...", node_id="...", framework="swiftui")
# Kotlin Jetpack Compose
figma_generate_code(file_key="...", node_id="...", framework="kotlin")
Supported Frameworks
| Framework | Output |
|---|---|
react |
React + inline styles |
react_tailwind |
React + Tailwind CSS |
vue |
Vue 3 + scoped CSS |
vue_tailwind |
Vue 3 + Tailwind CSS |
html_css |
HTML + CSS |
tailwind_only |
Tailwind classes only |
css |
Pure CSS |
scss |
SCSS with variables |
swiftui |
iOS SwiftUI Views |
kotlin |
Android Jetpack Compose |
Example Usage
# Get colors from a component
figma_get_colors(
file_key="qyFsYyLyBsutXGGzZ9PLCp",
node_id="1707:6176"
)
# Generate React component
figma_generate_code(
file_key="qyFsYyLyBsutXGGzZ9PLCp",
node_id="1707:6176",
framework="react_tailwind"
)
License
MIT License - see LICENSE for details.
Author
Yusuf Demirkoparan (@nicepixelbyte)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixelbyte_figma_mcp-1.0.0.tar.gz.
File metadata
- Download URL: pixelbyte_figma_mcp-1.0.0.tar.gz
- Upload date:
- Size: 62.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8be4671d5733dd51642a9f7bb7528eeeba4b547c661f251c2cf8ddd3ec26fbc
|
|
| MD5 |
f78bc91f0989ec63efc38c399cbf3c1f
|
|
| BLAKE2b-256 |
85f5c8ca236efec57c3a35ce46c35bbc7bea5df3bf13a45c943c238ae48ecf29
|
File details
Details for the file pixelbyte_figma_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pixelbyte_figma_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 67.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2da43125fb3d0776d1e205e3e44b19efac093286039c772ad0a867464df9570
|
|
| MD5 |
ae8c39494eed31dd8b8a575c61c400c9
|
|
| BLAKE2b-256 |
be6cbcce11ac50baa05b040a7304cbaa654e57f7671bf9c4fa08b4a09fc2e9c6
|