Skip to main content
Glama

Claude Figma MCP

by tonycueva

Claude Figma MCP

A Model Context Protocol (MCP) server that enables Claude to create and manipulate designs in Figma through either a Figma plugin or directly via the Figma API.

Overview

This project offers two approaches for Claude to interact with Figma:

  1. Plugin Approach: Uses a Figma plugin to execute commands in Figma's UI
    • Allows creating and manipulating designs from scratch
    • Requires running the Figma plugin in the Figma application
  2. API Approach: Uses the Figma REST API directly
    • Allows retrieving and exporting existing Figma files
    • Works without opening Figma, but has more limited creation capabilities
    • Requires a Figma API key

Installation

Install the package globally:

npm install -g claude-figma-mcp

Or run it directly with npx:

npx claude-figma-mcp

Running from Local Source

  1. Clone this repository
  2. Install dependencies with npm install
  3. Build the TypeScript code with npm run build
  4. Run the server with npm start (HTTP mode) or npm run start:cli (STDIO mode)

Setting Up Claude Desktop Integration

Standard Approach (NPM Package)

Add the following to your Claude Desktop configuration file:

{ "mcpServers": { "figma-mcp": { "command": "npx", "args": [ "-y", "claude-figma-mcp", "--stdio" ] } } }

Figma API Approach

If you prefer using the Figma API directly (more reliable but with fewer creation capabilities):

{ "mcpServers": { "figma-mcp": { "command": "npx", "args": [ "-y", "claude-figma-mcp", "--stdio", "--figma-api-key", "your_figma_api_key_here" ] } } }

Simplified Server Option

For environments where the standard server has issues, we provide a simplified server:

{ "mcpServers": { "figma-mcp": { "command": "node", "args": [ "/path/to/claude-figma-mcp/simple-mcp-server.js" ] } } }

Setting up the Figma Plugin (Plugin Approach Only)

  1. Open Figma and go to Menu → Plugins → Development → Import plugin from manifest...
  2. Select the figma-plugin/manifest.json file from this repository
  3. The plugin should now be available in your Figma plugins menu

Usage

Plugin Approach

  1. Start the MCP server in HTTP mode
  2. Open Figma and run the Claude MCP Integration plugin
  3. Click "Connect to MCP Server" in the plugin UI
  4. In Claude, use the Figma MCP tool to interact with Figma

API Approach

  1. Start the MCP server with your Figma API key
  2. In Claude, use the Figma MCP tool to interact with Figma files
  3. No need to open Figma - operations happen directly via the API

Available Tools

Plugin Approach Tools

  • create_project: Create a new Figma project
  • create_frame: Create a new frame/artboard
  • create_rectangle: Create a rectangle element
  • create_text: Create a text element
  • create_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 elements
  • export_frame: Export a frame as an image

API Approach Tools

  • get_file: Retrieve information about a Figma file
  • get_file_nodes: Get specific nodes from a Figma file
  • get_comments: Retrieve comments from a Figma file
  • post_comment: Add a comment to a Figma file
  • get_team_components: List components from a team
  • export_image: Export a frame or node as an image

Example Claude Prompts

Plugin Approach Examples

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

API Approach Examples

Show me the contents of my Figma file with ID abcde12345
Export the frame named 'Homepage' from my Figma file abcde12345 as a PNG

Configuration

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

Environment Variables

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

Command Line Arguments

  • --port: HTTP server port
  • --websocket-port: WebSocket server port
  • --figma-api-key: Figma API key
  • --stdio: Run in stdio mode (for Claude Desktop integration)

Troubleshooting

Connection Issues with Claude Desktop

If you have issues with the default server, try the simplified server option:

node /path/to/claude-figma-mcp/simple-mcp-server.js

Plugin Can't Connect to Server

Make sure:

  1. The MCP server is running in HTTP mode
  2. The ports aren't blocked by a firewall
  3. The WebSocket port (default: 8080) matches in both server config and plugin

API Key Not Recognized

Ensure your Figma API key is:

  1. Valid and has the necessary permissions
  2. Correctly set in either the environment variable or command-line argument

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议 (MCP) 服务器使 Claude 能够通过 Figma 插件或直接通过 Figma API 在 Figma 中创建和操作设计。

  1. 概述
    1. 安装
      1. 使用 NPM(推荐)
      2. 从本地源运行
    2. 设置 Claude 桌面集成
      1. 标准方法(NPM 包)
      2. Figma API 方法
      3. 简化的服务器选项
    3. 设置 Figma 插件(仅限插件方法)
      1. 用法
        1. 插件方法
        2. API 方法
      2. 可用工具
        1. 插件方法工具
        2. API 方法工具
      3. 克劳德提示示例
        1. 插件方法示例
        2. API 方法示例
      4. 配置
        1. 环境变量
        2. 命令行参数
      5. 故障排除
        1. Claude Desktop 的连接问题
        2. 插件无法连接到服务器
        3. API 密钥无法识别
      6. 贡献
        1. 执照

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            Enables seamless interaction with Figma via the Model Context Protocol, allowing LLM applications to access, manipulate, and track Figma files, components, and variables.
            Last updated -
            2
            144
            133
            TypeScript
            • Apple
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that provides access to Figma API functionality, allowing AI assistants like Claude to interact with Figma files, comments, components, and team resources.
            Last updated -
            18
            62
            2
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that integrates Figma design files with AI coding tools like Cursor, Windsurf, and Cline, allowing AI tools to access and understand Figma design data for generating more accurate code.
            Last updated -
            5
            14
            TypeScript
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that connects AI tools and LLMs to Figma designs, enabling them to extract design data, analyze design systems, and generate development documentation.
            Last updated -
            144
            1
            TypeScript
            • Apple

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/tonycueva/claude-figma-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server