This MCP server enables Claude to create and manipulate designs in Figma through either a Figma plugin or via the Figma API. It provides two approaches: a plugin-based method for creating designs from scratch and an API approach for working with existing Figma files without opening the application.
Install the package globally:
npm install -g claude-figma-mcp
Or run it directly with npx:
npx claude-figma-mcp
# 1. Clone the repository
# 2. Install dependencies
npm install
# 3. Build the TypeScript code
npm run build
# 4. Run the server
npm start # HTTP mode
npm run start:cli # STDIO mode
Add this to your Claude Desktop configuration file:
{
"mcpServers": {
"figma-mcp": {
"command": "npx",
"args": [
"-y",
"claude-figma-mcp",
"--stdio"
]
}
}
}
For using the Figma API directly (more reliable but fewer creation capabilities):
{
"mcpServers": {
"figma-mcp": {
"command": "npx",
"args": [
"-y",
"claude-figma-mcp",
"--stdio",
"--figma-api-key",
"your_figma_api_key_here"
]
}
}
}
For environments where the standard server has issues:
{
"mcpServers": {
"figma-mcp": {
"command": "node",
"args": [
"/path/to/claude-figma-mcp/simple-mcp-server.js"
]
}
}
}
If using the Plugin Approach:
figma-plugin/manifest.json
file from the repositorycreate_project
: Create a new Figma projectcreate_frame
: Create a new frame/artboardcreate_rectangle
: Create a rectangle elementcreate_text
: Create a text elementcreate_component
: Create pre-defined UI components (buttons, inputs, etc.)create_layout
: Create common layout patterns (headers, footers, etc.)create_interaction
: Create interactive prototyping connections between elementsexport_frame
: Export a frame as an imageget_file
: Retrieve information about a Figma fileget_file_nodes
: Get specific nodes from a Figma fileget_comments
: Retrieve comments from a Figma filepost_comment
: Add a comment to a Figma fileget_team_components
: List components from a teamexport_image
: Export a frame or node as an imageCan you create a login screen in Figma? It should have a logo at the top, email and password input fields, and a login button.
I need a dashboard layout in Figma with a header, sidebar navigation, and a main content area with 4 card components showing different statistics.
Show me the contents of my Figma file with ID abcde12345
Export the frame named 'Homepage' from my Figma file abcde12345 as a PNG
The server can be configured using environment variables or command-line arguments:
PORT
: HTTP server port (default: 3000)WEBSOCKET_PORT
: WebSocket server port for Figma plugin communication (default: 8080)FIGMA_API_KEY
: Figma API key (required for API approach)--port
: HTTP server port--websocket-port
: WebSocket server port--figma-api-key
: Figma API key--stdio
: Run in stdio mode (for Claude Desktop integration)If experiencing issues with the default server, try the simplified server option:
node /path/to/claude-figma-mcp/simple-mcp-server.js
Make sure:
Ensure your Figma API key:
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.