Figma MCP Server
Retrieves Figma file or node structure to provide design data for AI agents, enabling code generation, template creation, and design context for frontend development.
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 MCP ServerGet the Figma file structure for this design: https://figma.com/file/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 Model Context Protocol (MCP) Server
A self-hosted Model Context Protocol (MCP) server that enables Large Language Models (LLMs) and AI agents to interact with Figma designs programmatically. This server acts as a bridge between MCP-compatible clients and the Figma API, allowing AI tools to retrieve design data for generating templates and custom prompts.
Overview
This project implements the Model Context Protocol (MCP) to provide standardized access to Figma resources. It allows AI agents and LLMs to fetch Figma design structures, enabling them to understand and work with design components when generating code, templates, or other creative outputs.
Features
MCP v1 Protocol Compliance: Implements core MCP methods including
listToolsandcallToolFigma API Integration: Secure proxy to Figma's REST API with authentication handling
Smart Caching: Local caching mechanism to reduce API calls and improve response times
Rate Limit Handling: Built-in retry logic with exponential backoff for API rate limits
Node-Specific Access: Supports fetching specific nodes within Figma files
Depth Control: Configurable depth for retrieving nested design structures
Related MCP server: figma-mcp-write-server
Prerequisites
Node.js >= 18.0
Figma Personal Access Token with appropriate permissions
Installation
Clone this repository:
git clone <repository-url> cd figma-mcpInstall dependencies:
npm installSet up your Figma access token as an environment variable:
export FIGMA_ACCESS_TOKEN="your-personal-access-token-here"
Configuration
The server requires a Figma Personal Access Token with appropriate permissions. You can create one in your Figma account settings.
Required permissions typically include:
Read files (
file_read)Access to teams/files you want to access
Usage
Start the MCP server:
node index.jsThe server will start and listen for MCP requests via stdio. It exposes the following tool:
Available Tool
get_figma_from_url
Retrieves the JSON structure of a Figma file or specific node.
Parameters:
url(required): The Figma file URL containing the designdepth(optional): Controls the level of detail (2 or 3 for plans, omit for full structure)
Example:
{
"name": "get_figma_from_url",
"arguments": {
"url": "https://www.figma.com/file/FILE_KEY/...",
"depth": 2
}
}How It Works
The server registers an MCP-compatible tool called
get_figma_from_urlWhen called, it extracts the file key and node ID (if specified) from the provided URL
It makes authenticated requests to the Figma API using the provided access token
Results are cached locally for 1 hour to optimize performance
Responses are formatted according to MCP specifications
Integration with AI Tools
This server is designed to work with MCP-compatible AI tools such as:
Cursor
Claude Desktop
Other MCP-enabled IDEs and AI assistants
Once running, these tools can discover and communicate with the server to access Figma design data.
Customization for LLM Prompts
The server is particularly useful for:
Retrieving design specifications to inform code generation
Extracting component structures for template creation
Providing design context to LLMs for frontend development
Converting Figma designs to various code formats
Security Considerations
Store your Figma access token securely as an environment variable
The server relies on the MCP host for authentication and authorization
Run the server in a secure environment with appropriate network isolation
Tokens should have the minimum required permissions
Caching
The server implements a local caching mechanism:
Cache directory:
.figma_cachein the project rootCache TTL: 1 hour (3,600,000 milliseconds)
Cache keys are generated using MD5 hashes of API endpoints
Rate Limiting
The server includes built-in rate limiting support:
Automatic retry with exponential backoff for 429 responses
Maximum of 3 retry attempts
Starting backoff of 2 seconds, doubling each attempt
Error Handling
Common error responses include:
Invalid URL format
Rate limit exceeded (429) with guidance to wait
General API errors with descriptive messages
System errors with detailed error messages
Development
To extend the server with additional tools:
Register new tools in the
ListToolsRequestSchemahandlerImplement the corresponding logic in the
CallToolRequestSchemahandlerEnsure responses conform to MCP content standards
License
ISC License
Support
If you encounter issues or have questions:
Verify your Figma access token is valid and has appropriate permissions
Check that your Figma file URLs are accessible
Review the server logs for error details
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/vnsunny-dev/-figma-mcp-selfhost'
If you have feedback or need assistance with the MCP directory API, please join our Discord server