
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@gongrzhe/figma-developer-mcp
Advanced tools
Model Context Protocol server for Figma integration with session-based authentication
A Model Context Protocol (MCP) server for Figma integration, enabling AI assistants to fetch design data and download assets from Figma files.
# Start HTTP server on port 3000 (default)
npm start
# Build and start
npm run build && npm start
The server runs in HTTP mode only and provides:
POST /mcp
- Main MCP endpoint for tool executionGET /health
- Health check endpointAll requests require a Figma Personal Access Token via headers:
FIGMA_API_KEY: fig_your_figma_token_here
Create a Figma Personal Access Token in your Figma account settings.
The server provides 2 tools for comprehensive Figma API access. Each tool requires FIGMA_API_KEY
header.
Fetch layout information and design data from Figma files.
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "FIGMA_API_KEY: fig_your_figma_token_here" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/call",
"params": {
"name": "get_figma_data",
"arguments": {
"fileKey": "abc123def456",
"nodeId": "1:23",
"depth": 2
}
}
}'
Parameters:
fileKey
(required): The Figma file key from the URL (e.g., figma.com/file/<fileKey>/
)nodeId
(optional): Specific node ID to fetch (use when available from URL node-id=<nodeId>
)depth
(optional): Traversal depth limit (only use when explicitly requested)Download SVG and PNG images from Figma design nodes.
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "FIGMA_API_KEY: fig_your_figma_token_here" \
-d '{
"jsonrpc": "2.0",
"id": "2",
"method": "tools/call",
"params": {
"name": "download_figma_images",
"arguments": {
"fileKey": "abc123def456",
"nodes": [
{
"nodeId": "1:23",
"fileName": "icon.svg"
},
{
"nodeId": "1:24",
"imageRef": "imageRef123",
"fileName": "background.png"
}
],
"localPath": "/path/to/save/images",
"pngScale": 2,
"svgOptions": {
"outlineText": true,
"includeId": false,
"simplifyStroke": true
}
}
}
}'
Parameters:
fileKey
(required): The Figma file key containing the nodesnodes
(required): Array of nodes to download as images
nodeId
: Node ID formatted as "1234:5678"imageRef
(optional): Required for image fill nodes, leave blank for vector SVGsfileName
: Local filename for the saved filelocalPath
(required): Absolute directory path where images will be savedpngScale
(optional): Export scale for PNG images (default: 2)svgOptions
(optional): SVG export configuration
outlineText
: Whether to outline text (default: true)includeId
: Whether to include IDs (default: false)simplifyStroke
: Whether to simplify strokes (default: true)Get the complete list of available tools:
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "FIGMA_API_KEY: fig_your_figma_token_here" \
-d '{
"jsonrpc": "2.0",
"id": "tools-list",
"method": "tools/list",
"params": {}
}'
Create a .env
file in your project root:
# Figma API Configuration
FIGMA_API_KEY=fig_your_figma_token_here
# Server Configuration
PORT=3000
OUTPUT_FORMAT=yaml
The server supports two output formats:
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"figma": {
"command": "node",
"args": ["/path/to/figma-mcp/dist/cli.js"],
"env": {
"FIGMA_API_KEY": "fig_your_figma_token_here",
"PORT": "3000"
}
}
}
}
npm install @gongrzhe/figma-developer-mcp
git clone https://github.com/gongrzhe/figma-developer-mcp.git
cd figma-developer-mcp
npm install
npm run build
Get Figma Personal Access Token:
fig_
)Configure Token:
.env
file: FIGMA_API_KEY=fig_your_token_here
FIGMA_API_KEY
header in each requestThe server provides detailed error messages for common issues:
When working with Figma files, understand these key concepts:
Found in Figma URLs: figma.com/file/<fileKey>/design-name
Found in Figma URLs as parameters: node-id=<nodeId>
Format: "number:number" (e.g., "1:23")
Special identifiers for image fills within nodes Required when downloading bitmap images vs. vector graphics
npm run build
npm test
npm run dev
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.
FAQs
Model Context Protocol server for Figma integration with session-based authentication
We found that @gongrzhe/figma-developer-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.