Skip to main content
Glama

Гравитация Глобальная Figma MCP

Gravity Global Figma MCP — это инструмент, который интегрирует Figma с Cursor через протокол контекста модели (MCP), позволяя извлекать и оптимизировать проектные данные из Figma для преобразования кода.

Основные характеристики

  • Извлечение данных из Figma : получение информации о дизайне из файлов Figma с использованием URL-адресов или идентификаторов файлов.

  • Оптимизация данных : уменьшение размера JSON путем удаления ненужных свойств.

  • Преобразование CSS : автоматическое разделение и организация стилей по группам (типографика, цвета, макеты...)

  • Генерация имен классов CSS : автоматическое создание осмысленных имен классов на основе свойств.

  • Извлечение токенов дизайна : извлечение типографики и цветовых токенов из дизайнов Figma

Related MCP server: Talk to Figma MCP

Установка

  1. Клонируйте репозиторий:

git clone <repository-url>
  1. Установить зависимости:

npm install
  1. Создайте файл .env и добавьте свой токен API Figma:

FIGMA_API_KEY=your_figma_api_token_here
  1. Запустите MCP-сервер:

node index.js

Использование

В курсорном чате

Через Cursor Chat вы можете использовать следующие инструменты:

1. Извлечение данных из Figma

Get data from Figma URL https://www.figma.com/file/abc123/my-design?node-id=123-456

Результат: MCP вернет оптимизированные данные Figma.

2. Извлечение токенов дизайна

Extract typography and color tokens from Figma URL https://www.figma.com/file/abc123/my-design

Результат: MCP вернет объект JSON, содержащий типографику и цветовые маркеры, извлеченные из дизайна Figma.

Пример ответа:

{
  "typography": {
    "opensans-600-32": {
      "fontFamily": "Open Sans",
      "fontSize": "32px",
      "fontWeight": 600,
      "lineHeight": "48px"
    },
    "avenirnext-400-16": {
      "fontFamily": "Avenir Next",
      "fontSize": "16px",
      "fontWeight": 400,
      "lineHeight": "24px"
    }
  },
  "colors": {
    "bg-ffffff": "#ffffff",
    "text-030e12": "#030e12"
  }
}

3. Варианты

  • Инструмент figmaDesign :

    • fullJson=true : возвращает полные несжатые данные JSON

    • cleanData=true : удаляет ненужные свойства для рендеринга HTML/CSS

  • Инструмент figmaTokens :

    • tokenTypes=["typography"] : извлекать только типографские токены

    • tokenTypes=["colors"] : извлекать только цветовые токены

    • tokenTypes=["typography", "colors"] : извлечь оба (по умолчанию)

Пример:

Extract only color tokens from Figma URL https://www.figma.com/file/abc123/my-design

Структура данных

Преобразованные данные Figma имеют следующую структуру:

{
  "nodes": {
    "nodeId": {
      "id": "nodeId",
      "name": "Node Name",
      "type": "FRAME",
      "fillStyleId": "style123",
      "layoutStyleId": "style456",
      "children": [...]
    }
  },
  "styles": {
    "style123": {
      "backgroundColor": "#ffffff",
      "opacity": 1,
      "categories": { "colors": "color1" }
    }
  },
  "optimizedStyles": {
    "typography": {...},
    "colors": {...},
    "layout": {...},
    "spacing": {...},
    "sizing": {...}
  },
  "classNames": {
    "style123": "bg-1",
    "style456": "flex-row-1"
  }
}

Технические подробности

Извлечение данных Figma

Инструмент использует Figma REST API для извлечения данных дизайна. Он поддерживает URL-адреса как обычных файлов, так и новых URL-адресов дизайна. Вы можете указать конкретный узел с помощью node-id .

Оптимизация данных

Процесс оптимизации включает в себя следующие этапы:

  1. Удаление ненужных свойств

  2. Разделение стилей на группы (типографика, цвета, макет...)

  3. Объединение похожих стилей для уменьшения дублирования

  4. Автоматическая генерация имен классов CSS

Извлечение токенов

Процесс извлечения токена:

  1. Определяет типографику и цветовые стили, используемые в дизайне

  2. Создает стандартизированные соглашения об именовании для каждого токена

  3. Группирует токены по типу (типографика или цвета)

  4. Удаляет дубликаты и организует их для легкой интеграции с системами проектирования.

Ограничения

  • MCP имеет ограничения на размер возвращаемых данных; большие файлы будут сохранены в каталоге figma_data

  • Свойства сложных векторов сохраняются не полностью

  • Сложные градиенты и эффекты могут потребовать дополнительной обработки.

Лицензия

Лицензия Массачусетского технологического института

Available Tools

1 tool
figmaDesignD
ParametersJSON Schema
NameRequiredDescriptionDefault
figmaUrlYesFigma URL or file ID
fullJsonNoIf true, returns full uncompressed JSON data
cleanDataNoIf true, removes unnecessary properties for HTML/CSS rendering

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev1.0.0
    • First observedfigmaDesign

TDQS

D1.6/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion between tools.

Naming Consistency5/5

A single tool trivially follows a consistent naming pattern with itself.

Tool Count1/5

One tool for a Figma MCP is extremely limited; a typical Figma integration would require many more operations, making this an extreme mismatch.

Completeness1/5

The tool has no description, and a single tool cannot cover the expected domain of Figma operations (e.g., fetching designs, components, etc.), indicating severe incompleteness.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers