TF

timholden/figma-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

149 stars 16 forks Качество 57 Тренд 16

timholden/figma-mcp-server — это кандидат MCP-сервера, импортированный из https://github.com/timholden/figma-mcp-server.

Обзор

timholden/figma-mcp-server — это кандидат MCP-сервера, импортированный из https://github.com/timholden/figma-mcp-server.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP), обеспечивающий интеграцию с API Figma через Claude и другие совместимые с MCP клиенты. В настоящее время поддерживает доступ только для чтения к файлам и проектам Figma, при этом серверная архитектура поддерживает более продвинутые функции управления токенами дизайна и темами (в ожидании улучшений API Figma или разработки плагинов).

Статус проекта

Текущий прогресс

  • ✅ Основная реализация: Успешно создан сервер TypeScript по протоколу Model Context Protocol (MCP)
  • ✅ Claude Desktop Integration: протестировано и работает с Claude Desktop
  • ✅ Операции чтения: Рабочие инструменты get-file и list-files для доступа к файлам Figma
  • ✅ Серверная архитектура: реализована система кэширования, обработка ошибок и мониторинг статистики
  • ✅ Транспортные протоколы: поддерживаются как stdio, так и SSE транспортные механизмы

Потенциальная полная функциональность

Сервер был спроектирован с кодом для поддержки следующих функций (в настоящее время ограниченных ограничениями API):

  • Управление переменными: Создание, чтение, обновление и удаление токенов дизайна (переменных)
  • Обработка ссылок: Создание и проверка связей между токенами

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Figma MCP Server

A Model Context Protocol (MCP) server that provides integration with Figma’s API through Claude and other MCP-compatible clients. Currently supports read-only access to Figma files and projects, with server-side architecture capable of supporting more advanced design token and theme management features (pending Figma API enhancements or plugin development).

Project Status

Current Progress

  • ✅ Core Implementation: Successfully built a TypeScript server following the Model Context Protocol (MCP)
  • ✅ Claude Desktop Integration: Tested and functional with Claude Desktop
  • ✅ Read Operations: Working get-file and list-files tools for Figma file access
  • ✅ Server Architecture: Caching system, error handling, and stats monitoring implemented
  • ✅ Transport Protocols: Both stdio and SSE transport mechanisms supported

Potential Full Functionality

The server has been designed with code to support these features (currently limited by API restrictions):

  • Variable Management: Create, read, update, and delete design tokens (variables)
  • Reference Handling: Create and validate relationships between tokens
  • Theme Management: Create themes with multiple modes (e.g., light/dark)
  • Dependency Analysis: Detect and prevent circular references
  • Batch Operations: Perform bulk actions on variables and themes

With Figma plugin development or expanded API access, these features could be fully enabled.

Features

  • 🔑 Secure authentication with Figma API
  • 📁 File operations (read, list)
  • 🎨 Design system management
    • Variable creation and management
    • Theme creation and configuration
    • Reference handling and validation
  • 🚀 Performance optimized
    • LRU caching
    • Rate limit handling
    • Connection pooling
  • 📊 Comprehensive monitoring
    • Health checks
    • Usage statistics
    • Error tracking

Prerequisites

  • Node.js 18.x or higher
  • Figma access token with appropriate permissions
  • Basic understanding of MCP (Model Context Protocol)

Installation

npm install figma-mcp-server

Configuration

  1. Create a .env file based on .env.example:
# Figma API Access Token
FIGMA_ACCESS_TOKEN=your_figma_token

# Server Configuration
MCP_SERVER_PORT=3000

# Debug Configuration
DEBUG=figma-mcp:*
  1. For Claude Desktop integration:

The server can be configured in your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "figma": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/figma-mcp-server/dist/index.js"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}

Important Notes:

  • Use ABSOLUTE paths, not relative paths
  • On Windows, use double backslashes (\\) in paths
  • Restart Claude Desktop after making configuration changes

Usage

Basic Usage

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "figma": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/figma-mcp-server/dist/index.js"], "env": { "FIGMA_ACCESS_TOKEN": "your_token_here" } } } }