Skip to content
Conduit

mcp server

Figma-AI-Bridge

Agent + Skill System for Controlling Figma and Automate Design Process

renfei-design/Figma-AI-Bridgecommunitylistedunreviewednot running here yet

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 14, 2026

Figma AI Bridge

Let GitHub Copilot in VS Code control Figma in real-time through MCP (Model Context Protocol).

Demo Video

▶️ Watch the demo on YouTube

Architecture

AI Assistant  ←stdio→  MCP Server (Node.js)  ←WebSocket→  Relay (port 3055)  ←WebSocket→  Figma Plugin
ComponentLocationPurpose
Figma Pluginplugin/Runs inside Figma, executes commands via figma.* APIs
MCP Serverserver/Defines MCP tools, connects to WebSocket relay on port 3055
VS Code Config.vscode/mcp.jsonRegisters the MCP server with VS Code
Helper Scriptsscripts/CLI utilities for batch operations

Quick Start

1. Clone & Install

git clone https://github.com/renfei1992-dev/Figma_AI_Bridge.git
cd Figma_AI_Bridge
npm run setup

2. Import the Figma Plugin

In Figma desktop app:

  1. Go to Plugins → Development → Import plugin from manifest...
  2. Select plugin/manifest.json from this repo

3. Configure VS Code

If you open this project folder in VS Code, the .vscode/mcp.json is already configured. You're done.

To use it globally (in any project), add to ~/Library/Application Support/Code/User/mcp.json (macOS) or %APPDATA%\Code\User\mcp.json (Windows):

{
  "servers": {
    "figma-ai-bridge": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/figma-ai-bridge/server/index.js"]
    }
  }
}

4. Each Session

  1. Start the relay server — open a terminal and run:
    npm run relay
    
    Leave it running. The relay forwards messages between VS Code and Figma on port 3055.
  2. Run the plugin in Figma — Plugins → Development → "Figma AI Bridge" → click Connect
  3. Start designing — both the plugin and MCP server auto-join the same channel (auto), so you can immediately give design commands to Copilot

Tip: If you need multiple instances or custom channels, use the join_channel tool to switch.

Available Tools

Reading

ToolDescription
get_document_infoGet info about the current Figma document
get_selectionGet current selection
read_my_designGet detailed info about the current selection including all node details
get_node_infoGet info about a specific node by ID
get_nodes_infoGet info about multiple nodes
get_stylesGet all styles from the document
get_local_componentsGet all local components
get_annotationsGet annotations for a node
get_instance_overridesGet override properties from a component instance
get_reactionsGet prototyping reactions from nodes
get_component_propertiesGet all variant/boolean/text properties from a component instance
list_pagesList all pages in the document

Creating

ToolDescription
create_rectangleCreate a rectangle
create_frameCreate a frame with optional auto-layout settings
create_textCreate a text element
create_component_instanceCreate an instance of a component
clone_nodeClone an existing node
create_sectionCreate a section frame for organizing content
create_pageCreate a new page in the document

Editing

ToolDescription
set_fill_colorSet fill color of a node
set_stroke_colorSet stroke color of a node
set_text_contentSet text content of a text node
set_multiple_text_contentsBatch-update multiple text nodes
set_corner_radiusSet corner radius
set_layout_modeSet auto-layout mode (horizontal/vertical)
set_paddingSet padding for auto-layout frames
set_axis_alignSet axis alignment for auto-layout frames
set_layout_sizingSet sizing modes (fixed/hug/fill)
set_item_spacingSet spacing between children
set_annotationCreate or update an annotation
set_multiple_annotationsBatch-set annotations
set_instance_overridesApply overrides to component instances
set_component_propertiesSwitch component variant properties (Type, Size, etc.)
move_nodeMove a node to a new position
resize_nodeResize a node
rename_nodeRename a node
set_visibilityShow or hide a node
set_opacitySet node opacity
reparent_nodeMove a node to a new parent frame
reorder_nodeChange z-order of a node within its parent

Other

ToolDescription
delete_nodeDelete a node
delete_multiple_nodesDelete multiple nodes
export_node_as_imageExport a node as PNG/JPG/SVG/PDF
scan_text_nodesScan all text nodes in a subtree
scan_nodes_by_typesScan for nodes of specific types
set_focusFocus viewport on a node
set_selectionsSet selection to specific nodes
set_current_pageSwitch to a specific page
set_default_connectorSet default connector for FigJam
create_connectionsCreate connector lines between nodes
group_nodesGroup multiple nodes together
ungroup_nodesUngroup a group node
join_channelSwitch to a different WebSocket channel (auto-joined by default)

Design Skills

ToolDescription
create_slideCreate a single presentation slide (title, content, visual, statement, columns, comparison, numbered)
batch_slidesCreate multiple slides in one call — faster than creating individually
create_doc_pageBuild a structured documentation page with sections, tables, and columns
create_workflow_diagramBuild a flowchart/process diagram with shapes, arrows, and auto-layout
get_canvas_boundsGet bounding box of all top-level content to avoid overlap

Design Token Variables

ToolDescription
scan_bound_variablesScan a node tree for all bound design token variables
get_bound_variablesGet variables bound to a specific node
resolve_variableResolve a variable by ID to get its current value
bind_variable_to_fillBind a design token variable to a node's fill color
bind_variable_to_strokeBind a design token variable to a node's stroke color

Helper Scripts

# Send a single command to Figma
node scripts/figma_cmd.mjs <channel> <command> '[paramsJSON]'

# Batch-bind design token variables
echo '[{"nodeId":"...","variableId":"...","property":"fill"}]' | node scripts/figma_bind_batch.mjs <channel>

Project Structure

figma-ai-bridge/
├── .github/
│   └── skills/                # AI skill definitions (prompt instructions)
│       ├── a11y-audit/        # WCAG accessibility audit
│       │   ├── SKILL.md
│       │   ├── references/    # WCAG criteria reference
│       │   ├── scripts/       # a11y_check.py (offline analysis)
│       │   └── tests/         # Unit tests
│       ├── content-review/    # UI text review & style fixes
│       │   ├── SKILL.md
│       │   ├── references/    # Style guide (grammar, caps, words, punctuation)
│       │   └── scripts/       # figma_text.py (extract & apply text)
│       ├── figma-doc/         # Structured documentation pages
│       │   └── SKILL.md
│       ├── figma-slides/      # Presentation slide decks
│       │   └── SKILL.md
│       ├── online-research/   # Live web research
│       │   └── SKILL.md
│       └── workflow-diagram/  # Flowcharts & process maps
│           └── SKILL.md
├── plugin/
│   ├── manifest.json      # Figma plugin manifest
│   ├── code.js            # Plugin sandbox code (runs in Figma)
│   └── ui.html            # Plugin UI (WebSocket bridge)
├── server/
│   ├── package.json       # Server dependencies
│   ├── index.js           # MCP server (stdio transport, connects to relay)
│   └── relay.js           # WebSocket relay server (port 3055)
├── scripts/
│   ├── figma_cmd.mjs      # CLI: send single command
│   └── figma_bind_batch.mjs  # CLI: batch variable binding
├── .vscode/
│   └── mcp.json           # VS Code MCP integration
├── package.json           # Root project metadata
├── LICENSE                # MIT
└── README.md

Skills

Skills are AI prompt instructions in .github/skills/ that teach Copilot how to perform complex multi-step design tasks. Each skill has a SKILL.md with the full workflow, and optionally references/ and scripts/ for supporting files.

SkillDescription
a11y-auditScan Figma frames for WCAG 2.2 accessibility issues (contrast, font size, touch targets, alt text) and annotate violations
content-reviewReview UI text against writing style guidelines (grammar, capitalization, word choice, punctuation) and apply fixes
figma-docBuild structured documentation pages in Figma (paragraphs, columns, tables) in a single command
figma-slidesCreate presentation decks with 7 slide types — auto-organized into sections on the canvas
online-researchFetch live web data to ground content in current facts before creating docs or reports
workflow-diagramBuild flowcharts and process maps with auto-layout (shapes, arrows, swimlanes, decision diamonds)

Figma Sandbox Notes

The Figma plugin sandbox uses an older JS engine. The plugin code (plugin/code.js) avoids:

  • Spread syntax (...)
  • Template literals in some contexts
  • for...of on objects
  • Object.entries() with destructuring

All plugin code uses var, traditional for loops, and string concatenation for compatibility.

License

MIT

↑↓ navigate openesc close