F

Figma 资源访问器

@JayZeeDesign/figma-mcp
0 Stars 548 次浏览 JayZeeDesign 更新于 2026-08-23

允许您的AI编码代理直接访问Figma文件和原型。有关任何问题/改进建议,可以给我发私信:https://x.com/jasonzhou1993 1. 访问所有Figma页面 2. 访问所有Figma组件 3. 访问Figma原型流程

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

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

该服务需要配置环境变量:FIGMA_API_TOKEN

可用工具 (3 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

get_components 1 个参数 需填 1 项

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

必填参数:file_key

get_node 2 个参数 需填 2 项

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

必填参数:file_key、node_id

get_workflow 1 个参数 需填 1 项

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

必填参数:file_key

服务介绍

Figma MCP Python

PyPI version

允许您的AI编码代理直接访问Figma文件和原型。
如果您有任何问题或改进建议,可以私信我:https://x.com/jasonzhou1993

使用pipx快速安装

pipx install figma-mcp

对于Cursor:

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

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

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

安装uv并设置环境

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

本地测试

python -m figma_mcp.main

相关 MCP 服务