Figma MCP server

Provides a bridge to the Figma design platform, enabling retrieval of detailed design file information, node metadata, and image assets through a flexible TypeScript implementation supporting both stdio and HTTP/SSE transports.
Back to servers
Setup instructions
Provider
Graham Lipsman
Release date
Mar 17, 2025
Language
TypeScript

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.

Installation

Quick Start with NPM

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.

Configuration with JSON Files

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>"
      }
    }
  }
}

Installation from Source

If you prefer to run from source:

  1. Clone the repository
  2. Install dependencies: pnpm install
  3. Copy .env.example to .env and add your Figma API access token
  4. Run the server: pnpm run dev

Configuration Options

The server can be configured using environment variables or command-line arguments:

Environment Variables

  • FIGMA_API_KEY: Your Figma API access token (required)
  • PORT: The port to run the server on (default: 3333)

Command-line Arguments

  • --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 number

Connecting to Cursor

Step 1: Start the Server

npx 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

Step 2: Connect Cursor to the MCP Server

  1. Open Cursor and go to Settings
  2. Navigate to the Features tab
  3. Connect Cursor to the MCP server
  4. Verify the connection - you should see a green dot if the connection is successful

Step 3: Using with Figma Designs

  1. Make sure the Cursor composer is in agent mode
  2. In Figma, select an element and copy its link (CMD + L or from the context menu)
  3. Paste the link in Cursor's composer
  4. Ask Cursor to implement the design

Available Tools

get_figma_data

Fetches information about a Figma file or a specific node.

Parameters:

  • fileKey (string, required): The key of the Figma file
  • nodeId (string, optional but recommended): The ID of the specific node to fetch
  • depth (number, optional): How many levels deep to traverse the node tree

download_figma_images (Work in Progress)

Downloads SVG and PNG images used in a Figma file.

Parameters:

  • fileKey (string, required): The Figma file key
  • nodes (array, required): Array of nodes to fetch as images with:
    • nodeId (string, required): The ID of the Figma image node
    • imageRef (string, optional): Required for imageRef fills
    • fileName (string, required): Local name for saving the file
  • localPath (string, required): Absolute path to the directory for image storage

Inspecting Responses

For 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.

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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>"
            }
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later