convez.ai
MCP ServerDesign & UIIntermediário
neozhehan

Figma Edit MCP

neozhehan/figma-edit-mcp

Integração IA-Figma para automação de designs com segurança e precisão

Ver no GitHub
BomPluginScore · de 0 a 100

Servidor MCP que permite integrar assistentes de IA ao Figma para ler, criar e modificar designs programaticamente. Executa alterações de design com segurança aprimorada, consistência garantida e velocidade superior, automatizando tarefas repetitivas e reduzindo horas de trabalho manual para segundos.

Instalação

$npx convez-ai neozhehan/figma-edit-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
16
Forks
1
Acompanhando
0
Saúde
71%
Último commit
há 1 mês
Versão
v2.3.3
Issues abertas
0
Contribuidores
8

Casos de uso

  • Automação de atualizações em massa de textos e componentes
  • Propagação automática de overrides em instâncias
  • Gerenciamento programático de sistemas de design
  • Execução de alterações de design sem erro humano ou alucinação de IA

Veredito

Solução robusta e madura que democratiza a automação de design ao conectar IA diretamente ao Figma. Implementa validações rigorosas e proteções que excedem a app nativa, sendo ideal para equipes que buscam escalar operações de design sem comprometer consistência.

README

A tradução para o português deste README ainda está na fila.

Figma Edit MCP

npm version npm downloads CI

Connect AI assistants to Figma via Model Context Protocol to read designs, create and modify elements, and manage design systems programmatically.

This plugin empowers your AI assistant to become a Figma assistant, executing design updates Safer, Cleaner, and Faster than a human ever could.

This plugin allows you as a Designer to focus purely on creative decision-making, leaving the error-prone & repetitive manual changes to the automated systems.

Read more about our design philosophy here.

Core Principles

  • 🛡️ Safer: The plugin performs programmatic checks and protections that exceed those in the Figma Desktop app. For example, it prevents the deletion of variables that are still in use, avoiding dangling references. By enforcing these strict validations before an action is taken, the plugin protects designs from both human error and AI hallucinations.
  • ✨ Cleaner: Programmatic, thorough operations mean no node is ever skipped or forgotten during large updates, ensuring that the design file is always consistent.
  • ⚡ Faster: Executing batch operations (like bulk text replacement or instance override propagation) via AI reduces hours of tedious manual design work down to seconds.

Supported AI Integrations

  • Cursor
  • GitHub Copilot (VS Code)
  • Google Antigravity
  • Claude Code (VS Code & CLI)
  • Claude Desktop (Chat, Cowork & Code)
  • LM Studio

Quick Start

The quickest way to run Figma Edit MCP is directly from the NPM registry. You do not need to clone this repository.

1. Configure your AI assistant

Add the server to your AI assistant's MCP configuration:

{
  "mcpServers": {
    "FigmaEdit": {
      "command": "npx",
      "args": ["-y", "figma-edit-mcp"]
    }
  }
}

The config file location depends on your host — see Integration-Specific Setup below. Bun users can substitute bunx for npx; both resolve the same package.

2. Start the WebSocket bridge

In a terminal, start the bridge that connects the MCP server to the Figma plugin. Keep this terminal running:

npx -y --package figma-edit-mcp figma-edit-mcp-socket

3. Install the Figma plugin

The Figma plugin ships inside the NPM package. Install the package once to materialize the plugin files on disk:

# In any directory of your choosing (e.g., ~/figma-edit-mcp/)
npm install figma-edit-mcp

Then in the Figma desktop app:

  1. Open Plugins → Development → Import plugin from manifest…
  2. Select node_modules/figma-edit-mcp/figma_plugin/manifest.json from the directory above.

The plugin is now available under Plugins → Development in any Figma file.

4. (Optional) Install the agent skill

The package also ships a cross-tool skill that teaches your agent the server's safety constraints, error recovery, and tool selection — loaded on demand, so it costs almost nothing until needed. Agents that support the open SKILL.md standard (Claude Code, GitHub Copilot, OpenAI Codex, Cursor, Gemini CLI, Google Antigravity) discover it once it's in their skills directory:

# copy the skill into your agent's skills directory (path varies by host)
cp -R node_modules/figma-edit-mcp/skills/figma-edit ~/.claude/skills/

Clients that don't support skills can still reach the same guidance over the MCP connection as resources under figma-edit://guide/* — no install required.


Running from a local clone? See CONTRIBUTING.md for the contributor-only --local development workflow.


Integration-Specific Setup

Paste the JSON snippet from the Quick Start into your host's MCP config file:

IntegrationConfig File LocationNotes
Cursor~/.cursor/mcp.jsonRestart Cursor after editing
VS Code / GitHub Copilot~/Library/Application Support/Code/User/mcp.jsonRequires VS Code 1.102+ with Copilot; enable Agent Mode
Google Antigravity~/.gemini/antigravity/mcp_config.jsonRestart Antigravity to load
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json—
Claude Code (CLI / VS Code)run claude mcp add FigmaEdit npx figma-edit-mcpNo file edit needed
LM Studioedit mcp.json via the Developer tabOr use a deeplink, if provided

Manual Configuration

If you prefer to edit your host's MCP config directly, paste this snippet into the appropriate config file:

{
  "mcpServers": {
    "FigmaEdit": {
      "command": "npx",
      "args": ["-y", "figma-edit-mcp"]
    }
  }
}
IntegrationConfig File Location
Cursor~/.cursor/mcp.json
VS Code / Copilot~/Library/Application Support/Code/User/mcp.json
Antigravity~/.gemini/antigravity/mcp_config.json
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
LM StudioUse the in-app editor (via Developer tab) or edit mcp.json

Running from a local clone? See CONTRIBUTING.md for the --local workflow.


Contributing

For local development — building from source, running the bridge from a clone, and the --local integrate workflow — see CONTRIBUTING.md.


Windows + WSL Guide

To allow Figma (running on Windows) to connect to the bridge (running inside WSL), the bridge needs to listen on 0.0.0.0 instead of localhost:

npx -y --package figma-edit-mcp figma-edit-mcp-socket --host 0.0.0.0
# or via environment variable:
FIGMA_EDIT_MCP_SOCKET_HOST=0.0.0.0 npx -y --package figma-edit-mcp figma-edit-mcp-socket

Then point the Figma plugin's WebSocket address at your WSL instance's IP.


Usage

  1. Start the WebSocket bridge: npx -y --package figma-edit-mcp figma-edit-mcp-socket
  2. Configure the MCP server in your AI assistant (see Integration-Specific Setup)
  3. Open Figma and launch the Figma Edit MCP plugin from Plugins → Development
  4. Use the channel_join MCP tool to establish communication
  5. Use your AI assistant to interact with Figma via the available MCP tools

MCP Tools

Tools are grouped into a two-level, underscore-separated namespace (group_action). Reads are *_list / *_info; writes use verb leaves. Anything that mutates a node lives under node_*.

page — pages

ToolDescription
page_infoList the document's pages; with pageIds, return those pages and their top-level children

node — read, transform, and style any node

ToolDescription
node_infoRead one or more nodes — recursive traversal with fields, filter, and maxDepth (the workhorse read; also returns bound variables / explicit modes)
node_transformMove and/or resize a node by setting absolute x / y / width / height
node_renameRename a node
node_deleteDelete one or more nodes in a single validated batch
node_cloneDuplicate a node, optionally at a new position
view_navigateNavigate the editor view to a page or node(s)
node_groupWrap nodes in a new group
node_ungroupDissolve a group, promoting its children
node_flattenFlatten a node and its children into a single vector
node_insert_childReparent a node under a new parent at an optional index
node_set_auto_layoutConfigure a frame's auto-layout (mode, padding, spacing, alignment, sizing)
node_set_fillSet a node's fill to a literal RGBA color
node_set_strokeSet stroke color and weight (uniform or per-side)
node_set_corner_radiusSet corner radius (uniform or per-corner)
node_set_effectsSet the effect array (shadows, blurs)
node_apply_styleLink a node to a shared library style (paint/text/effect/grid)
node_bind_variableBind a variable to a node property, or set an explicit variable mode
node_export_visualRender a node to an image (PNG / JPG / SVG / PDF)

create — make new nodes

ToolDescription
create_shapeCreate a rectangle, ellipse, polygon, or star (type) with optional fill/stroke
create_frameCreate a frame with optional fill/stroke and full auto-layout
create_textCreate a text node with optional font size/weight/color
create_svgCreate a node from an SVG markup string
create_componentConvert an existing frame into a main component
create_instanceInstantiate a component at a position
create_component_setCombine components into a component set (variants)
create_connectionDraw connector lines between nodes, or set/check the default connector

style — shared styles

ToolDescription
style_listList all local styles (paint/text/effect/grid)
style_manageCreate a named style, or update one when styleId is given
style_deleteDelete a local style by id (detaches consumers, which keep their resolved values)

text — text content & typography

ToolDescription
text_set_contentBatch-set the text of one or more text nodes
text_set_styleSet any combination of typography properties on a text node

component — components & variants

ToolDescription
component_listList components, with filtering and scope options
component_manage_propertyAdd or edit a component-property definition (BOOLEAN/TEXT/INSTANCE_SWAP)
component_delete_propertyRemove a component-property definition

instance — component instances

ToolDescription
instance_set_propertySet one property on an instance (toggle, text, swap, or variant)
instance_get_overridesRead the override properties from a source instance
instance_set_overridesApply copied overrides to target instances

variable — variables & collections

ToolDescription
variable_listList variables/collections, or detail by ID; optionally scan consumers
variable_manageCreate collections and variables and set values/aliases
variable_deleteDelete variables or a collection (rejected if still in use)

annotation — Dev Mode annotations

ToolDescription
annotation_listRead annotations on a node; optionally include categories
annotation_setBatch create or update native annotations (markdown)

reaction — prototype reactions

ToolDescription
reaction_listRead prototype reactions (click flows, overlays) from nodes
reaction_updateReplace a node's reactions with a full new array

channel — connection

ToolDescription
channel_joinJoin a WebSocket channel to establish communication with the plugin

MCP Prompts

Built-in prompts guide complex multi-step design tasks:

PromptDescription
reaction_to_connector_strategyConvert prototype reaction flows into visual FigJam connector lines
swap_overrides_instancesTransfer component instance overrides from a source to multiple targets

Hallucination Safeguards

The plugin enforces hard constraints (scope locking, name verification, batch validation) that AI agents cannot bypass. The full rules and structured error codes are loaded on demand by your agent — via the figma-edit skill or the MCP resources under figma-edit://guide/* (constraints, error-playbook, workflows, tool-selection).


Best Practices

When working with Figma Edit MCP:

  1. Always join a channel first with channel_join before sending any other commands.

Notes

Automatic Node ID Normalization

Node IDs copied from Figma URLs use dashes (20485-41), but the plugin API expects colons (20485:41). The MCP server automatically converts dash-format IDs before forwarding, so either format works without manual intervention.


Acknowledgements

Built on prior work by sonnylazuardi and the contributors to grab/cursor-talk-to-figma-mcp. Thank you for the foundation this project builds on.

Thanks to @dusskapark for the following contributions:

  • Bulk text content replacement — Batch-update text across large designs efficiently. Demo video
  • Instance override propagation — Propagate component instance overrides from a source to multiple targets in a single command, dramatically reducing repetitive design work. Demo video

License

The MIT License (MIT)

Copyright (c) 2025 sonnylazuardi
Copyright (c) 2026 Neo Product LLC

Ver o original no GitHub

Bom para

Relacionados