AF

archimedescrypto/figma-mcp-chunked

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 3 forks 质量 65 趋势 13MIT

Use Figma in a MCP with Chunking Support

概览

A Model Context Protocol (MCP) server for interacting with the Figma API, featuring memory-efficient chunking and pagination capabilities for handling large Figma files. This MCP server provides a robust interface to the Figma API with built-in memory management features. It's designed to handle large Figma files efficiently by breaking down operations into manageable chunks and implementing pagination where necessary. - Memory-aware processing with configurable limits - Chunked data retrieval for large files - Pagination support for all listing operations - Node type filtering - Progress tracking - Configurable chunk sizes - Resume capability for interrupted operations - Debug logging - Config file support To install Figma MCP Server with Chunking for Claude Desktop automatically via Smithery: - FIGMA_ACCESS_TOKEN: Your Figma API access token You can provide configuration via a JSON file using the --config flag: Retrieves Figma file data with memory-efficient chunking and...

README

以下为原文 README 节选,完整内容请查看原文。

Figma MCP Server with Chunking

A Model Context Protocol (MCP) server for interacting with the Figma API, featuring memory-efficient chunking and pagination capabilities for handling large Figma files.

Overview

This MCP server provides a robust interface to the Figma API with built-in memory management features. It’s designed to handle large Figma files efficiently by breaking down operations into manageable chunks and implementing pagination where necessary.

Key Features

  • Memory-aware processing with configurable limits
  • Chunked data retrieval for large files
  • Pagination support for all listing operations
  • Node type filtering
  • Progress tracking
  • Configurable chunk sizes
  • Resume capability for interrupted operations
  • Debug logging
  • Config file support

Installation

Installing via Smithery

To install Figma MCP Server with Chunking for Claude Desktop automatically via Smithery:

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

Manual Installation

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

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Environment Variables

  • FIGMA_ACCESS_TOKEN: Your Figma API access token

Config File

You can provide configuration via a JSON file using the --config flag:

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

Usage:

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

Tools

get_file_data (New)

Retrieves Figma file data with memory-efficient chunking and pagination.

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

Response:

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

list_files

Lists files with pagination support.

{
  "name": "list_files",
在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @ArchimedesCrypto/figma-mcp-chunked --client claude
新手?先看 mcpskill.org 教程 →

配置

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