Token导航 LogoToken导航TokenDH.com
Figma MCP Chunked logo
设计创作stdio官方级别未说明来源级核验

Figma MCP Chunked

MCP Server

@smithery/cli

一个用于与Figma API交互的模型上下文协议(MCP)服务器,具有内存高效的分块和分页功能,适用于处理大型Figma文件。

工具数

0

提示词数

0

GitHub Stars

4

资源数

0
TypeScriptClaude设计Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ArchimedesCrypto

提供方

ArchimedesCrypto

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx -y @smithery/cli install @ArchimedesCrypto/figma-mcp-chunked --client claude

详细介绍

](https://mseep.ai/app/archimedescrypto-figma-mcp-chunked)

Figma带分块的MCP服务器

](https://smithery.ai/server/@ArchimedesCrypto/figma-mcp-chunked)

用于与Figma API交互的模型上下文协议(MCP)服务器,具有处理大型Figma文件的高效内存分块和分页功能。

概述

此MCP服务器为Figma API提供了一个强大的接口,具有内置的内存管理功能。它旨在通过将操作分解为可管理的块并在必要时实现分页来有效地处理大型Figma文件。

主要特点

  • 具有可配置限制的内存感知处理
  • 大文件的分块数据检索
  • 对所有列表操作的分页支持
  • 节点类型过滤
  • 进度跟踪
  • 可配置的块大小
  • 恢复中断操作的能力
  • 调试记录
  • 配置文件支持

安装

通过Smithery安装

通过以下方式自动安装带有分块功能的Figma MCP Server for Claude Desktop 史密瑟里:

npx -y @smithery/cli install @ArchimedesCrypto/figma-mcp-chunked --client claude

手动安装

# Clone the repository
git clone [repository-url]
cd figma-mcp-chunked

# Install dependencies
npm install

# Build the project
npm run build

配置

环境变量

  • FIGMA_ACCESS_TOKEN:您的Figma API访问令牌

配置文件

您可以使用以下命令通过JSON文件提供配置 --config 标志:

{
  "mcpServers": {
    "figma": {
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-access-token"
      }
    }
  }
}

用途:

node build/index.js --config=path/to/config.json

工具

get_file_data(新建)

通过内存高效的分块和分页来检索Figma文件数据。

{
  "name": "get_file_data",
  "arguments": {
    "fileKey": "your-file-key",
    "accessToken": "your-access-token",
    "pageSize": 100,          // Optional: nodes per chunk
    "maxMemoryMB": 512,       // Optional: memory limit
    "nodeTypes": ["FRAME", "COMPONENT"],  // Optional: filter by type
    "cursor": "next-page-token",  // Optional: resume from last position
    "depth": 2                // Optional: traversal depth
  }
}

答复:

{
  "nodes": [...],
  "memoryUsage": 256.5,
  "nextCursor": "next-page-token",
  "hasMore": true
}

列表文件

列出支持分页的文件。

{
  "name": "list_files",
  "arguments": {
    "project_id": "optional-project-id",
    "team_id": "optional-team-id"
  }
}

获取_版本

以块为单位检索版本历史记录。

{
  "name": "get_file_versions",
  "arguments": {
    "file_key": "your-file-key"
  }
}

获取_文件_注释

使用分页检索注释。

{
  "name": "get_file_comments",
  "arguments": {
    "file_key": "your-file-key"
  }
}

获取_文件_信息

使用分块节点遍历检索文件信息。

{
  "name": "get_file_info",
  "arguments": {
    "file_key": "your-file-key",
    "depth": 2,               // Optional: traversal depth
    "node_id": "specific-node-id"  // Optional: start from specific node
  }
}

get_组件

检索支持分块的组件。

{
  "name": "get_components",
  "arguments": {
    "file_key": "your-file-key"
  }
}

get_styles

检索支持分块的样式。

{
  "name": "get_styles",
  "arguments": {
    "file_key": "your-file-key"
  }
}

获取_文件_节点

使用分块支持检索特定节点。

{
  "name": "get_file_nodes",
  "arguments": {
    "file_key": "your-file-key",
    "ids": ["node-id-1", "node-id-2"]
  }
}

内存管理

服务器实施了几种策略来有效地管理内存:

分块策略

  • 可通过以下方式配置块大小 pageSize
  • 内存使用监控
  • 基于内存压力的自动块大小调整
  • 每个块的进度跟踪
  • 使用光标恢复功能

最佳实践

  1. 从较小的块大小(50-100个节点)开始,并根据性能进行调整
  2. 通过响应元数据监控内存使用情况
  3. 尽可能使用节点类型过滤来减少数据负载
  4. 为大型数据集实现分页
  5. 使用恢复功能处理非常大的文件

配置选项

  • pageSize:每个块的节点数(默认值:100)
  • maxMemoryMB:最大内存使用量(MB)(默认值:512)
  • nodeTypes:筛选特定节点类型
  • depth:控制嵌套结构的遍历深度

调试日志记录

服务器包括全面的调试日志记录:

// Debug log examples
[MCP Debug] Loading config from config.json
[MCP Debug] Access token found xxxxxxxx...
[MCP Debug] Request { tool: 'get_file_data', arguments: {...} }
[MCP Debug] Response size 2.5 MB

错误处理

服务器提供详细的错误消息和建议:

// Memory limit error
"Response size too large. Try using a smaller depth value or specifying a node_id.""

// Invalid parameters
"Missing required parameters: fileKey and accessToken"

// API errors
"Figma API error: [detailed message]"

故障排除

常见问题

  1. 内存错误

- 减小块大小 - 使用节点类型筛选 - 实现分页 - 指定较小的深度值

  1. 性能问题

- 监控内存使用情况 - 调整块大小 - 使用适当的节点类型筛选器 - 对频繁访问的数据实施缓存

  1. API限值

- 实施速率限制 - 使用分页 - 尽可能缓存响应

调试模式

启用调试日志记录以获取详细信息:

# Set debug environment variable
export DEBUG=true

贡献

欢迎投稿!请阅读我们的贡献指南,并将拉取请求提交到我们的存储库。

许可证

此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。

目录标签

目录标签

TypeScriptClaude设计FigmaAPI本地部署内存管理分块处理分页支持设计工具集成

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Node.js

部署方式(deploymentType,部署类型)

remote-capable

来源包(packageName,安装包名)

@smithery/cli

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotokenremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP