This MCP server enables AI-powered coding tools like Cursor, Windsurf, and Cline to access your Figma files, making it significantly easier to implement designs directly from Figma. Rather than relying on screenshots, the server provides structured design data to AI tools, resulting in more accurate code generation.
The fastest way to get started is by running the server directly with NPM:
npx figma-developer-mcp --figma-api-key=<your-figma-api-key>
# or with other package managers
pnpx figma-developer-mcp --figma-api-key=<your-figma-api-key>
yarn dlx figma-developer-mcp --figma-api-key=<your-figma-api-key>
bunx figma-developer-mcp --figma-api-key=<your-figma-api-key>
You'll need a Figma API access token, which you can create by following Figma's instructions.
For tools like Windsurf, Cline, or Claude Desktop that use configuration files:
{
"mcpServers": {
"figma-developer-mcp": {
"command": "npx",
"args": ["-y", "figma-developer-mcp", "--stdio"],
"env": {
"FIGMA_API_KEY": "<your-figma-api-key>"
}
}
}
}
If you prefer to run from source:
pnpm install
.env.example
to .env
and add your Figma API access tokenpnpm run dev
The server can be configured using environment variables or command-line arguments:
FIGMA_API_KEY
: Your Figma API access token (required)PORT
: The port to run the server on (default: 3333)--figma-api-key
: Your Figma API access token--port
: The port to run the server on--stdio
: Run in command mode instead of HTTP/SSE--help
: Show help menu--version
: Show version numbernpx figma-developer-mcp --figma-api-key=<your-figma-api-key>
You should see output indicating that the server is running:
Initializing Figma MCP Server in HTTP mode on port 3333...
HTTP server listening on port 3333
SSE endpoint available at http://localhost:3333/sse
Message endpoint available at http://localhost:3333/messages
Fetches information about a Figma file or a specific node.
Parameters:
fileKey
(string, required): The key of the Figma filenodeId
(string, optional but recommended): The ID of the specific node to fetchdepth
(number, optional): How many levels deep to traverse the node treeDownloads SVG and PNG images used in a Figma file.
Parameters:
fileKey
(string, required): The Figma file keynodes
(array, required): Array of nodes to fetch as images with:
nodeId
(string, required): The ID of the Figma image nodeimageRef
(string, optional): Required for imageRef fillsfileName
(string, required): Local name for saving the filelocalPath
(string, required): Absolute path to the directory for image storageFor debugging, you can use the inspector tool:
pnpm inspect
This launches a web UI at http://localhost:5173 for triggering tool calls and reviewing responses.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "figma-developer-mcp" '{"command":"npx","args":["-y","figma-developer-mcp","--stdio"],"env":{"FIGMA_API_KEY":"<your-figma-api-key>"}}'
See the official Claude Code MCP documentation for more details.
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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"figma-developer-mcp": {
"command": "npx",
"args": [
"-y",
"figma-developer-mcp",
"--stdio"
],
"env": {
"FIGMA_API_KEY": "<your-figma-api-key>"
}
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"figma-developer-mcp": {
"command": "npx",
"args": [
"-y",
"figma-developer-mcp",
"--stdio"
],
"env": {
"FIGMA_API_KEY": "<your-figma-api-key>"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect