Figma Context MCP
Enhances Figma design integration by adding element position information (x, y, width, height) for non-AutoLayout nodes, enabling AI assistants to better understand spatial relationships and convert designs to code.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Figma Context MCPAnalyze layout of this Figma design: https://figma.com/file/abc/my-design"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Figma Context MCP
Forked from GLips/Figma-Context-MCP
A Model Context Protocol (MCP) server that enhances Figma design integration by adding element position information to API responses. This enables AI assistants to better understand spatial relationships and convert designs to code more accurately by inferring logical layouts from absolute positioning.
Key Enhancement
Position Information for Better Layout Inference
This fork's primary enhancement adds element position data (x, y coordinates, width, height) to API responses for nodes that don't use Figma's AutoLayout feature. This enables AI assistants to:
Infer logical layout relationships from absolute positioning
Better understand spatial hierarchies and component structures
Generate more accurate design-to-code conversions
Maintain full backward compatibility with the original MCP server
Related MCP server: Figma MCP Server
Features
� Position Data Enhancement - Adds x, y, width, height for non-AutoLayout elements
🧠 Layout Inference - Helps AI understand spatial relationships from absolute positioning
🔄 Full Compatibility - Maintains all original functionality and integrations
🚀 Multiple CLI Commands - Three convenient command aliases
🛡️ Secure Integration - Uses official Figma API with personal access tokens
📱 MCP Compatible - Works with Claude Desktop, Cursor, and other MCP tools
Quick Start
Get up and running in 3 simple steps:
Step 1: Get Your Figma API Token
Visit Figma Account Settings
Scroll to "Personal access tokens"
Click "Create new token", name it (e.g., "MCP Server"), and copy the token
Step 2: Configure Your AI Assistant
See the Integration section below for detailed setup instructions for your specific AI assistant (Cursor IDE, VS Code, etc.).
✅ Verify It's Working
Open your AI assistant (Cursor, VS Code, etc.)
Try this example:
"Analyze the layout structure of this Figma design:" https://www.figma.com/community/file/1234567890/example-designYour AI should access and analyze the Figma file with position information!
Troubleshooting: If it doesn't work, check the Troubleshooting section below.
How It Works
Prerequisites: Node.js 20+ and a Figma account with API access
No Installation Required:
Uses
npx figma-context-mcp- downloads automatically when neededNo global packages to manage
Always uses the latest version
Works immediately without setup steps
Integration
Cursor IDE
Configure in Cursor settings (Cmd/Ctrl + , → Extensions → MCP Servers):
Configuration:
{
"mcpServers": {
"figma-context": {
"command": "npx",
"args": ["figma-context-mcp", "--figma-api-key=${FIGMA_API_KEY}", "--stdio"]
}
}
}Test: Use Cursor's AI chat to analyze a Figma design URL.
VS Code (with Continue Extension)
Install the Continue extension and configure ~/.continue/config.json:
{
"models": [...],
"mcpServers": {
"figma-context": {
"command": "npx",
"args": ["figma-context-mcp", "--figma-api-key=${FIGMA_API_KEY}", "--stdio"]
}
}
}Other MCP Tools
{
"mcpServers": {
"figma-context": {
"command": "npx",
"args": ["figma-context-mcp", "--figma-api-key=${FIGMA_API_KEY}", "--stdio"]
}
}
}Usage Examples
Design Analysis:
"Analyze the layout structure of this Figma design:"
https://www.figma.com/file/abc123/my-designComponent Generation:
"Generate React components from this Figma design:"
https://www.figma.com/design/abc123/component-library?node-id=123-456Design System Extraction:
"Extract design tokens from this Figma file:"
https://www.figma.com/file/abc123/design-systemHow Position Enhancement Works
Position Data for Non-AutoLayout Elements
What's Added: x, y coordinates (relative to root), width, and height
When Applied: Only for elements that don't use Figma's AutoLayout feature
Purpose: Enables AI to infer logical layout relationships from absolute positioning
Compatibility: Fully backward compatible with original MCP server responses
Benefits for AI Assistants
Better Layout Understanding: AI can analyze spatial relationships between elements
Improved Code Generation: More accurate conversion from design to responsive layouts
Hierarchy Inference: Builds logical component trees from positioning data
AutoLayout Preservation: Maintains Figma's native layout properties where they exist
Troubleshooting
Common Issues:
MCP server failed to start: Test manually with
npx figma-context-mcp --figma-api-key=YOUR_TOKEN --stdioInvalid API token: Test your token with
curl -H "X-FIGMA-TOKEN: YOUR_TOKEN" https://api.figma.com/v1/meConfiguration errors: Validate JSON syntax and restart your AI client
Environment variables not working: Test with explicit token first, then debug environment setup
Getting Help:
Development
Building from Source:
git clone https://github.com/tianmuji/Figma-Context-MCP.git
cd Figma-Context-MCP
npm install && npm run buildRunning Tests:
npm testUpdates:
npm update -g figma-context-mcpContributing
Contributions are welcome! Please submit issues and pull requests.
License
MIT License - see LICENSE file for details.
Author
yujie_wu
Attribution
This project is a fork of GLips/Figma-Context-MCP. The primary enhancement is the addition of element position information (x, y coordinates, width, height) for non-AutoLayout nodes, enabling better layout inference for AI assistants while maintaining full compatibility with the original MCP server functionality.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tianmuji/Figma-Context-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server