Fetches design information from a Figma file
Figma Context is a Model Context Protocol (MCP) server that provides AI coding agents with direct access to your Figma design files. It enables AI tools like Cursor to understand your Figma layouts, components, and design systems, allowing them to generate accurate code implementations in a single pass. By bridging the gap between design and development, this tool significantly streamlines the UI implementation process. Developers can leverage AI to automatically translate Figma designs into production-ready code for any framework, reducing development time and ensuring design fidelity.
Figma Context MCP allows AI coding assistants to access and understand your Figma designs, enabling them to generate accurate code implementations directly from your design files. This tool bridges the gap between design and development workflows, making it possible to implement UI components with greater speed and accuracy.
npm install -g figma-developer-mcp
# or
pnpm add -g figma-developer-mcp
# or
yarn global add figma-developer-mcp
Create a Figma Personal Access Token:
Set up your environment:
.env
file in your project directoryFIGMA_TOKEN=your_personal_access_token
To connect your AI coding tool with the Figma Context MCP, add the following configuration to your AI tool's settings:
For Cursor:
{
"mcpServers": {
"figma-context": {
"command": "figma-mcp",
"args": []
}
}
}
For other AI coding tools that support MCP, add similar configuration according to their documentation.
Start a new coding session in your AI tool (e.g., Cursor)
To fetch Figma design information, use the following command format in your prompt:
/figma fetch [Figma file URL or file key]
For example:
/figma fetch https://www.figma.com/file/abcdef123456/MyDesign
/figma fetch [Figma file URL or file key] [node ID]
Please implement this Figma design as a React component using Tailwind CSS.
DEV_MODE=true
in your .env
file