Skip to main content
Glama

Figma MCP Python

PyPI 版本

允许你的 AI 编码代理直接访问 Figma 文件和原型。如有任何问题或改进,请直接联系我: https://x.com/jasonzhou1993

使用 pipx 快速安装

pipx install figma-mcp

对于光标:

  1. 在设置中,使用以下命令添加 MCP 服务器:

figma-mcp --figma-api-key=your_figma_key
  1. 或者在您的项目中添加一个.cursor/mcp.json文件:

{
  "mcpServers": {
    "figma-python": {
      "command": "figma-mcp",
      "args": [
        "--figma-api-key=your_figma_key"
      ]
    } 
  }
}

对于其他 IDE(例如 Windsurf),请使用 MCP 配置文件(例如mcp_config.json ):

{
  "mcpServers": {
    "figma-python": {
      "command": "figma-mcp",
      "args": [
        "--figma-api-key=your_figma_key"
      ]
    } 
  }
}

Related MCP server: figma-developer-mcp

安装 uv 并设置环境

curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv sync

本地测试

python -m figma_mcp.main

Available Tools

3 tools
get_componentsB

Get components available in a Figma file

    Args:
        file_key (str): The file key found in the shared Figma URL

    Returns:
        list[dict]: List of components found in the Figma file
    

Inputs: file_key (required).

get_nodeA

Get a specific node from a Figma file

    Args:
        file_key (str): The file key found in the shared Figma URL, e.g. if url is https://www.figma.com/proto/do4pJqHwNwH1nBrrscu6Ld/Untitled?page-id=0%3A1&node-id=0-3&viewport=361%2C361%2C0.08&t=9SVttILbgMlPWuL0-1&scaling=min-zoom&content-scaling=fixed&starting-point-node-id=0%3A3, then the file key is do4pJqHwNwH1nBrrscu6Ld
        node_id (str): The ID of the node to retrieve, has to be in format x:x, e.g. in url it will be like 0-3, but it should be 0:3

    Returns:
        dict: The node data if found, empty dict if not found
    

Inputs: node_id (required), file_key (required).

get_workflowB

Get workflows available in a Figma file

    Args:
        file_key (str): The file key found in the shared Figma URL, e.g. if url is https://www.figma.com/proto/do4pJqHwNwH1nBrrscu6Ld/Untitled?page-id=0%3A1&node-id=0-3&viewport=361%2C361%2C0.08&t=9SVttILbgMlPWuL0-1&scaling=min-zoom&content-scaling=fixed&starting-point-node-id=0%3A3, then the file key is do4pJqHwNwH1nBrrscu6Ld

    Returns:
        list[dict]: List of workflow connections found in the Figma file
    

Inputs: file_key (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct Figma element: components, nodes, and workflows. There is no overlap in their purposes, making it easy for an agent to select the correct tool.

    Naming Consistency5/5

    All tools follow a consistent 'get_' + singular noun pattern (get_components, get_node, get_workflow), which is predictable and easy to follow.

    Tool Count5/5

    With 3 tools, the server is tightly scoped for retrieving key Figma file elements. This number is appropriate for a focused MCP server without being too sparse or excessive.

    Completeness4/5

    The tools cover retrieval of components, nodes, and workflows, which are important aspects of a Figma file. However, it lacks tools for pages or styles, which are common use cases, so minor gaps exist.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables coding agents like Cursor to access Figma design data, fetch layout and styling information, and implement designs in any framework.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to extract design systems, analyze components, and maintain design-code consistency from Figma files, providing intelligent component analysis and accessibility compliance.
      106 npm
      27
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI coding agents to access Figma files and prototypes, allowing them to retrieve design data and assets directly.
      MIT