The Figma MCP server enables seamless integration between Figma design files and AI coding tools like Cursor, Windsurf, and Cline. Through the Model Context Protocol (MCP), this server transforms Figma design data into formats that AI models can easily understand, allowing them to generate code that accurately matches your designs.
For automatic installation with Claude Desktop:
npx -y @smithery/cli install @1yhy/Figma-Context-MCP --client claude
# Global installation
npm install -g @yhy2001/figma-mcp-server
# Start the server
figma-mcp --figma-api-key=<your-figma-api-key>
# Global installation of local package
npm install -g ./figma-mcp-server-1.0.0.tgz
# Start the server
figma-mcp --figma-api-key=<your-figma-api-key>
# Install in your project
npm install @yhy2001/figma-mcp-server --save
# Add to package.json scripts
# "start-figma-mcp": "figma-mcp --figma-api-key=<your-figma-api-key>"
# Or run directly
npx figma-mcp --figma-api-key=<your-figma-api-key>
--version
: Display version number--figma-api-key
: Your Figma API access token (required)--port
: Port for the server to run on (default: 3333)--stdio
: Run server in command mode instead of default HTTP/SSE mode--help
: Display help menuFor tools like Cursor, Windsurf, and Claude Desktop, add the following to your configuration file:
# For MCP Client
{
"mcpServers": {
"Figma MCP": {
"command": "npx",
"args": ["figma-mcp", "--figma-api-key=<your-figma-api-key>", "--stdio"]
}
}
}
# For local use
{
"mcpServers": {
"Figma MCP": {
"url": "http://localhost:3333/sse",
"env": {
"API_KEY": "<your-figma-api-key>"
}
}
}
}
figma-mcp --figma-api-key=<your-figma-api-key>
http://localhost:3333
Retrieves information from a Figma file or specific node.
Parameters:
fileKey
: The Figma file keynodeId
: Node ID (strongly recommended)depth
: Depth to traverse the node treeDownloads images and icon resources from a Figma file.
Parameters:
fileKey
: The Figma file key containing the nodesnodes
: Array of image nodes to fetchlocalPath
: Directory path in your project to store imagesThe server returns Figma designs in a structured JSON format that includes:
This structured data enables AI tools to understand the design in detail and generate more accurate code implementations.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.