Skip to main content
Glama
figma-unified-mcp

figma-unified-mcp

by sso-ss

Figma Unified MCP

A comprehensive Model Context Protocol (MCP) server that enables Claude to read, create, edit, and generate code from Figma designs.

Features

  • 🔍 Read — Get file structure, nodes, styles, components, variables, and comments

  • ✏️ Create — Make frames, shapes, text, components, instances, vector paths, SVG imports, and pages

  • 🎨 Modify — Change colors, gradients, sizes, positions, auto-layout, effects, and more

  • 🎭 Prototype — Add interactions, flows, transitions, and overlays

  • 🧩 Variables — Create and manage design tokens via REST API (no plugin needed)

  • 💻 Code Generation — Export to CSS, React, SwiftUI, HTML, and Tailwind

  • 📱 Prototype to HTML — Generate interactive HTML prototypes from Figma designs

  • ♿ Accessibility — Check color contrast and touch target sizes

  • 📐 Layout Validation — Verify spacing, alignment, and overflow

  • 🎯 Boolean Operations — Union, subtract, intersect, exclude shapes

  • 📤 Export — Export nodes as PNG/JPG/SVG/PDF to local files or base64

  • 🔗 Code Connect — Bridge Figma components to code via fuzzy matching and Dev Mode links

  • ✨ Text Presets — Apply 16 built-in typography presets (display, heading, body, label, etc.)

  • 🌈 Gradient Fills — Set linear, radial, angular, and diamond gradient fills


Related MCP server: tokensStudioMCP

Installation

macOS / Linux:

./setup.sh

Windows:

.\setup.bat
  • For Claude Code users: stop any running session first with /exit, then run the setup script, then relaunch.

This single command will:

  • ✅ Check Node.js is installed (Windows: auto-install via winget)

  • ✅ Install all dependencies

  • ✅ Build the MCP server and Figma plugin

  • ✅ Configure Claude Desktop, Claude Code, or Cursor automatically

After the script finishes, just:

  1. Import the plugin in Figma (Plugins → Development → Import from manifest)

  2. Restart Claude Desktop (or Claude Code picks it up automatically)


Manual Setup

Prerequisites

Step 1: Clone or Download

git clone https://github.com/sso-ss/figma-unified-mcp.git
cd figma-unified-mcp

Step 2: Install Dependencies

cd figma-unified-mcp
npm install

Step 3: Build the MCP Server

npm run build

This creates dist/server.js — the compiled MCP server.

Step 4: Configure Your Claude Client

Option A: Claude Desktop

Edit your Claude Desktop configuration file:

macOS:

nano ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Add the Figma MCP server:

macOS / Linux:

{
  "mcpServers": {
    "figma-unified-mcp": {
      "command": "node",
      "args": ["/Users/YOUR_USERNAME/Desktop/Claude/mcp/figma-unified-mcp/dist/server.js"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE"
      }
    }
  }
}

Windows:

{
  "mcpServers": {
    "figma-unified-mcp": {
      "command": "node",
      "args": ["C:\\Users\\YOUR_USERNAME\\Desktop\\Claude\\mcp\\figma-unified-mcp\\dist\\server.js"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE"
      }
    }
  }
}

⚠️ Replace YOUR_USERNAME with your actual username and figd_YOUR_TOKEN_HERE with your Figma Personal Access Token.

Option B: Claude Code (CLI)

macOS / Linux:

claude mcp add figma-unified-mcp \
  -e FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN_HERE \
  -- node /Users/YOUR_USERNAME/Desktop/Claude/mcp/figma-unified-mcp/dist/server.js

Windows (PowerShell):

claude mcp add figma-unified-mcp `
  -e FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN_HERE `
  -- node C:\Users\YOUR_USERNAME\Desktop\Claude\mcp\figma-unified-mcp\dist\server.js

Or add it to .claude/settings.json:

macOS / Linux:

{
  "mcpServers": {
    "figma-unified-mcp": {
      "command": "node",
      "args": ["/Users/YOUR_USERNAME/Desktop/Claude/mcp/figma-unified-mcp/dist/server.js"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE"
      }
    }
  }
}

Windows:

{
  "mcpServers": {
    "figma-unified-mcp": {
      "command": "node",
      "args": ["C:\\Users\\YOUR_USERNAME\\Desktop\\Claude\\mcp\\figma-unified-mcp\\dist\\server.js"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE"
      }
    }
  }
}

Step 5: Restart Your Claude Client

Quit and reopen Claude Desktop, or restart Claude Code to load the MCP server.

Step 6: Install the Figma Plugin

  1. Open Figma Desktop

  2. Go to Plugins → Development → Import plugin from manifest...

  3. Select: figma-unified-mcp/figma-plugin/manifest.json

  4. The plugin "Figma Unified MCP Bridge" is now installed

Step 7: Connect Plugin to MCP

  1. In Figma, go to Plugins → Development → Figma Unified MCP Bridge

  2. Click Connect (default settings: localhost:18211, channel figma)

  3. Status should show "Connected" ✅


Verification

In Claude Desktop or Claude Code, try:

What Figma tools do you have available?

Claude should list the tools available for your profile. You can also check the logs:

tail -f ~/Library/Logs/Claude/mcp-server-figma-unified-mcp.log

CLI — unified-design

A standalone command-line interface that uses the same REST API + plugin bridge as the MCP server, but without the MCP overhead. No plugin needed for read operations.

Setup

cd figma-unified-mcp
npm install
npm run build
npm link           # makes 'unified-design' available globally

Windows note: PowerShell 5.1 does not support &&. Use ; to chain commands (e.g., npm install; npm run build) or run them on separate lines. If unified-design is blocked by execution policy, use unified-design.cmd instead, or run directly with node dist/cli.js.

macOS / Linux: If unified-design isn't found after npm link, ensure your npm global bin directory is in your PATH:

export PATH="$(npm prefix -g)/bin:$PATH"  # add to ~/.zshrc or ~/.bashrc

Or run directly with node dist/cli.js.

Plugin Bridge — Coexisting with MCP Server

Canvas write commands (e.g., create-frame, set-fill) require the Figma plugin. The CLI automatically detects how to connect:

  • MCP server running? → CLI connects as a client to the existing bridge (no port conflict)

  • No server running? → CLI starts its own bridge server and waits for the plugin

This means you can use the CLI alongside Claude Desktop / Cursor without stopping the MCP server.

Authentication

# Option 1: Environment variable
export FIGMA_ACCESS_TOKEN=figd_xxx

# Option 2: Config file (~/.figmarc)
unified-design config set accessToken figd_xxx

# Option 3: Auto-discovery (reads from Claude Desktop / Cursor MCP config)
# Just works — no setup needed if you already configured MCP

Quick start

# Set a default file so you don't need --file-key every time
unified-design config set defaultFileKey ABC123

# Read operations (REST API — no plugin needed)
unified-design get-file                          # File tree (depth 2)
unified-design get-node --node-id 123:456        # Single node details
unified-design search --query "Button"            # Find nodes by name
unified-design get-styles                        # All styles
unified-design get-variables                     # All variables/tokens
unified-design screenshot --node-id 123:456      # Export as PNG
unified-design export-svg --node-id 123:456      # Export as SVG
unified-design audit                             # Design quality audit

# Paste Figma URLs directly
unified-design get-node --url 'https://figma.com/design/ABC123/File?node-id=1-2'

# Variable operations (REST API — no plugin needed)
unified-design create-variable-collection --name "Colors" --modes light,dark
unified-design create-variable --collection-id <id> --name primary --type COLOR --value "#3B82F6"
unified-design set-variable-value --variable-id <id> --mode-id <id> --value "#1E40AF"
unified-design update-variable --variable-id <id> --name "brand-primary"
unified-design delete-variable --variable-id <id>

# Canvas write operations (need Figma plugin running)
unified-design create-frame --name "Header" --width 375 --height 64
unified-design set-fill --node-id 1:2 --color "#3B82F6"
unified-design set-text --node-id 1:3 --text "Hello World"
unified-design move-node --node-id 1:2 --x 100 --y 200

Output control

# Compact JSON (auto-enabled when piping to another command)
unified-design get-styles --compact

# Select specific fields (dot-notation, comma-separated)
unified-design get-file --fields "document.name,document.children"

# Save to file
unified-design get-styles --output styles.json

# Chain with jq
unified-design get-styles | jq '.styles[].name'

Short aliases

Alias

Command

Alias

Command

file

get-file

mv

move-node

node

get-node

rm

delete-node

find

search

cp

clone-node

styles

get-styles

fill

set-fill

vars

get-variables

text

set-text

snap

screenshot

frame

create-frame

svg

export-svg

rect

create-rectangle

a11y

check-accessibility

comp

create-component

new-var

create-variable

set-var

set-variable-value

del-var

delete-variable

new-collection

create-variable-collection

Interactive REPL

Run without arguments for an interactive session:

unified-design
# >
# unified-design ❯ file
# unified-design ❯ find --query "Logo"
# unified-design ❯ audit --json
# unified-design ❯ /exit

Using CLI as an AI Agent Backend

The CLI is optimized for use with Claude Code and other AI coding agents. When piped (non-TTY), output is automatically compact JSON — ~90% fewer tokens than MCP tool schemas.

Add this to your project's CLAUDE.md:

## Figma CLI
Use `unified-design` CLI to read and modify Figma designs:
- `unified-design get-file --file-key <key> --compact`
- `unified-design search --file-key <key> --query <name>`
- `unified-design screenshot --file-key <key> --node-id <id>`

See CLAUDE.md for the full agent instructions.


Tool Profiles

Control how many tools are registered via the TOOL_PROFILE environment variable:

Profile

Tools

Token cost

Best for

minimal

43

~3,500/msg

Claude $20 plan, daily design work

standard

71

~6,500/msg

Prototyping + variables + code connect + advanced modify

full

112

~9,800/msg

Full power, all features

Set in your MCP config:

{
  "env": {
    "FIGMA_ACCESS_TOKEN": "figd_...",
    "TOOL_PROFILE": "standard"
  }
}

Non-full profiles include figma_run escape hatch to access excluded tools on demand.


Available Tools

Connection Tools (3)

Tool

Description

figma_status

Check MCP server and plugin connection status

figma_connect_plugin

Connect to the Figma plugin via WebSocket

figma_send_command

Send a raw command to the Figma plugin

Utility Tools (3)

Tool

Description

figma_cache

Inspect or clear the in-memory library/component/style cache

figma_run

Escape hatch to run any tool by name (for non-full profiles)

figma_skill

Run a registered agent skill/prompt by name

Read Tools (32)

Tool

Description

figma_get_file

Get full file structure and metadata

figma_get_node

Get a specific node by ID

figma_get_nodes

Get multiple nodes by IDs

figma_get_styles

Get styles (fileKey → REST API, omit → plugin local styles)

figma_get_components

Get components (source: file/local/library)

figma_get_variables

Get all variables/design tokens

figma_get_comments

Get all comments on a file

figma_post_comment

Add a comment to a file

figma_search

Search for nodes by name or type

figma_get_selection

Get currently selected nodes in Figma

figma_get_team_components

Get published components from team libraries

figma_get_team_styles

Get published styles from team libraries

figma_get_component

Get details of a specific component by key

figma_get_style

Get details of a specific style by key

figma_get_library_items_used

Analyze which external library items a file uses

figma_get_file_versions

Get version history of a file

figma_get_team_projects

Get all projects in a team

figma_get_project_files

Get all files in a project

figma_scan_text_nodes

Scan text nodes with chunking for large designs

figma_scan_nodes_by_types

Find nodes by type (FRAME, TEXT, etc.)

figma_set_focus

Focus on a node and scroll viewport

figma_set_selections

Select multiple nodes and scroll to view

figma_get_library_collections

Get enabled library variable collections

figma_get_library_variables

Get variables from a library collection

figma_get_viewport

Get current viewport position and zoom

figma_import_component_by_key

Import a published component by key

figma_import_style_by_key

Import library styles by key (batch supported)

figma_get_code_connect_map

Get code connect mappings for components

figma_get_design_system_rules

Extract design system rules from current file

figma_export_png

Export a node as PNG/SVG/PDF via plugin

figma_create_page

Create a new page

figma_switch_page

Switch to a page by name, ID, or index

Visual/Export Tools (4)

Tool

Description

figma_get_images

Export nodes as PNG/JPG/SVG/PDF via REST API

figma_screenshot

Screenshot one or more nodes (nodeId or nodeIds[]) as base64

figma_export_svg

Export a node as SVG code

figma_export_to_file

Export a node to a local file (PNG/JPG/SVG/PDF) with configurable scale

Create Tools (10)

Tool

Description

figma_create_frame

Create a new frame/artboard

figma_create_rectangle

Create a rectangle shape

figma_create_ellipse

Create an ellipse/circle

figma_create_text

Create a text layer

figma_create_component

Create a reusable component

figma_create_instance

Create an instance of a component

figma_create_line

Create a line

figma_create_path

Create a vector path from points (straight or smooth curves)

figma_create_from_svg

Create a vector node from raw SVG markup

figma_batch

Batch multiple create/modify/variable ops in one round-trip

Modify Tools (19)

Tool

Description

figma_move_node

Move a node to x, y position

figma_resize_node

Resize a node's width/height

figma_set_fill

Set fills — solid color, linear/radial/angular/diamond gradients, or images

figma_set_stroke

Set border/stroke color and weight

figma_set_opacity

Set node opacity

figma_set_visible

Show or hide a node

figma_set_corner_radius

Set border radius

figma_set_text_content

Change text (single nodeId+content or batch updates[])

figma_set_text_style

Set font size, weight, family — or use 16 built-in presets (e.g., heading-xl, body-md)

figma_rename_node

Rename a node

figma_delete_node

Delete nodes (single nodeId or batch nodeIds[])

figma_clone_node

Clone/duplicate a node with offset

figma_set_auto_layout

Configure auto-layout (flexbox)

figma_set_effects

Add shadows, blurs, glows

figma_group_nodes

Group multiple nodes

figma_set_constraints

Set resize constraints

figma_reparent_node

Move node to different parent

figma_get_annotations

Get annotations on nodes

figma_set_annotation

Set annotation (single nodeId+label or batch annotations[])

Instance Override Tools (2)

Tool

Description

figma_get_instance_overrides

Extract instance overrides

figma_set_instance_overrides

Apply overrides to instances

Variable/Token Tools (10) — REST API, no plugin needed

Tool

Description

Transport

figma_create_variable_collection

Create a variable collection

REST API

figma_create_variable

Create a design token variable

REST API

figma_set_variable_value

Set variable value for a mode

REST API

figma_update_variable

Update variable name/description/scopes

REST API

figma_delete_variable

Delete a variable

REST API

figma_delete_variable_collection

Delete a variable collection

REST API

figma_bind_variable

Bind a variable to a node property

Plugin

figma_create_style

Create a reusable style

Plugin

figma_apply_style

Apply a style to a node by ID or by name

Plugin

figma_import_style_by_key

Import library styles by key (batch supported)

Plugin

Prototype Tools (10)

Tool

Description

figma_create_interaction

Add click/hover interaction

figma_remove_interactions

Remove all interactions from node

figma_create_flow

Create a prototype flow starting point

figma_remove_flow

Remove a flow starting point

figma_get_flows

List all flows on current page

figma_set_default_transition

Set default transition for frame

figma_setup_overlay

Configure overlay behavior

figma_set_scroll_behavior

Set scroll direction

figma_get_interactions

Get all interactions on a node

figma_present_prototype

Prepare to present prototype

Design Quality Tools (3)

Tool

Description

figma_boolean_operation

Boolean ops (union, subtract, intersect, exclude)

figma_check_accessibility

Check contrast ratios and touch target sizes

figma_validate_layout

Verify spacing, alignment, and overflow

Code Connect Tools (4)

Tool

Description

Profile

figma_scan_codebase

Scan a local directory for UI components (React, Vue, Svelte, Angular, Swift, Flutter, Compose)

standard+

figma_match_components

Fuzzy-match Figma components to code components with confidence scores

standard+

figma_publish_dev_resources

Publish code file URLs to Figma Dev Mode (bulk)

standard+

figma_get_dev_resources

Get existing dev resource links from a Figma file

standard+

Code Generation Tools (9)

Tool

Description

Profile

figma_generate_css

Generate CSS from node styles

full

figma_generate_react

Generate React component

full

figma_generate_swiftui

Generate SwiftUI view

full

figma_generate_html

Generate semantic HTML

full

figma_generate_tailwind_config

Generate Tailwind config

full

figma_generate_tokens

Export design tokens

full

figma_generate_handoff_spec

Generate developer handoff spec

full

figma_codegen_bundle

Generate a complete code bundle (HTML + CSS + JS)

standard+

figma_analyze_for_codegen

Analyze for best codegen approach

full


Available Agent Skills (14)

See skills.md for all 14 agent skills and their parameters.


Usage Examples

Example 1: Read a Figma File

You say:

Can you analyze my Figma file? The URL is:
https://www.figma.com/design/ABC123xyz/MyDesign

Claude will:

  1. Extract the file key from the URL

  2. Use figma_get_file to fetch the structure

  3. Summarize pages, frames, and components


Example 2: Get Design Tokens

You say:

What colors and text styles are defined in file ABC123xyz?

Claude will:

  1. Use figma_get_styles to get all styles

  2. Use figma_get_variables to get variables

  3. Present them in an organized list


Example 3: Create a Button Component

You say:

Create a primary button component in Figma with:
- Blue background (#3B82F6)
- White text "Click me"
- 16px padding
- 8px border radius

Claude will:

  1. Use figma_connect_plugin to connect

  2. Use figma_create_component to create the component

  3. Use figma_create_text to add the label

  4. Use figma_set_fill to set the blue background

  5. Use figma_set_auto_layout to add padding

  6. Use figma_set_corner_radius to round corners


Example 4: Build a Login Screen

You say:

Design a mobile login screen with email, password fields, and a sign in button.

Claude will:

  1. Create a frame (375x812 for mobile)

  2. Add a logo placeholder

  3. Create input fields with labels

  4. Add a primary button

  5. Apply consistent spacing with auto-layout


Example 5: Generate React Code

You say:

Generate a React component from the card in node 123:456

Claude will:

  1. Use figma_generate_react with the node ID

  2. Return a complete React component with Tailwind classes

Example output:

interface CardProps {
  text?: string;
}

export function Card(props: CardProps) {
  return (
    <div className="flex flex-col gap-4 p-6 bg-white rounded-xl shadow-lg">
      <h2 className="text-xl font-semibold">Card Title</h2>
      <p className="text-gray-600">Card description goes here</p>
      <button className="bg-blue-500 text-white px-4 py-2 rounded-lg">
        Action
      </button>
    </div>
  );
}

Example 6: Export Design Tokens

You say:

Export all design tokens from my file as CSS variables

Claude will:

  1. Use figma_generate_tokens with format "css"

  2. Return CSS custom properties

Example output:

:root {
  --color-primary: #3B82F6;
  --color-secondary: #10B981;
  --color-neutral-100: #F3F4F6;
  --color-neutral-900: #111827;
  --font-size-heading: 24px;
  --font-size-body: 16px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
}

Example 7: Add Prototype Interaction

You say:

Make the login button navigate to the Dashboard frame when clicked, with a slide animation

Claude will:

  1. Use figma_create_interaction with:

    • trigger: ON_CLICK

    • action: NAVIGATE

    • destinationId: (dashboard frame ID)

    • transition: SLIDE_IN

    • direction: LEFT

    • duration: 300


Example 8: Review Comments

You say:

What comments are on file ABC123xyz? Are any unresolved?

Claude will:

  1. Use figma_get_comments to fetch all comments

  2. List each comment with:

    • Author name

    • Message content

    • Created date

    • Resolved status


Example 9: Audit Design System

You say:

/audit_design_system

fileKey: ABC123xyz

Claude will run a comprehensive audit checking:

  • ✅ Color consistency (are colors using styles/variables?)

  • ✅ Typography scale (is there a defined type scale?)

  • ✅ Spacing consistency (8px grid?)

  • ✅ Component usage (are components properly structured?)

  • ✅ Variable coverage (what's tokenized vs hardcoded?)


Example 10: Generate SwiftUI

You say:

Convert the profile card to SwiftUI code

Claude will:

  1. Use figma_generate_swiftui

  2. Return SwiftUI code

Example output:

import SwiftUI

struct ProfileCard: View {
    var body: some View {
        VStack(spacing: 16) {
            Image("avatar")
                .resizable()
                .frame(width: 80, height: 80)
                .clipShape(Circle())
            
            Text("John Doe")
                .font(.system(size: 20))
                .fontWeight(.semibold)
            
            Text("Product Designer")
                .font(.system(size: 14))
                .foregroundColor(.gray)
        }
        .padding(24)
        .background(Color.white)
        .cornerRadius(16)
    }
}

struct ProfileCard_Previews: PreviewProvider {
    static var previews: some View {
        ProfileCard()
    }
}

Example 11: Create Variables/Tokens

You say:

Create a color variable collection with primary, secondary, and neutral colors that support light and dark modes

Claude will:

  1. Use figma_create_variable_collection with modes "Light" and "Dark"

  2. Use figma_create_variable for each color

  3. Use figma_set_variable_value to set values per mode


Example 12: Search and Modify

You say:

Find all buttons in my file and change their corner radius to 12px

Claude will:

  1. Use figma_search to find nodes named "button"

  2. Use figma_set_corner_radius on each result


Example 13: Set Gradient Fill

You say:

Apply a sunset gradient (orange to purple) to the hero section background

Claude will:

  1. Use figma_set_fill with a fills array:

{
  "nodeId": "1:23",
  "fills": [{
    "type": "GRADIENT_LINEAR",
    "gradientStops": [
      { "position": 0, "color": { "r": 1, "g": 0.5, "b": 0, "a": 1 } },
      { "position": 1, "color": { "r": 0.6, "g": 0.2, "b": 0.8, "a": 1 } }
    ]
  }]
}

Example 14: Export to Local File

You say:

Export the hero banner to my Desktop as a PNG at 2x scale

Claude will:

  1. Use figma_export_to_file with:

    • nodeId: the hero banner node

    • filePath: ~/Desktop/hero-banner.png

    • scale: 2


Example 15: Text Style Presets

You say:

Make the title use heading-xl style and the body use body-md

Claude will:

  1. Use figma_set_text_style with preset: "heading-xl" (96px bold)

  2. Use figma_set_text_style with preset: "body-md" (16px regular)

Available presets: display, heading-xl/lg/md/sm/xs, body-xl/lg/md/sm/xs, label-lg/md/sm, caption, overline


You say:

Scan my project at ~/my-app/src and link matching components to Figma

Claude will:

  1. Use figma_scan_codebase to find React/Vue/Svelte components

  2. Use figma_match_components to fuzzy-match against Figma components

  3. Review confidence scores with you

  4. Use figma_publish_dev_resources to attach GitHub URLs to Figma Dev Mode

Developers then see code links directly in Figma's Dev Mode panel.


Architecture

┌─────────────────┐     stdio      ┌──────────────────┐
│  Claude Client  │◄──────────────►│  MCP Server      │
└─────────────────┘                │  (Node.js)       │
                                   └────────┬─────────┘
                                            │
                    ┌───────────────────────┼───────────────────────┐
                    │                       │                       │
                    ▼                       ▼                       ▼
            ┌───────────────┐       ┌───────────────┐       ┌───────────────┐
            │  REST API     │       │  REST API     │       │  WebSocket    │
            │  (Read)       │       │  (Write)      │       │  Server:18211 │
            └───────┬───────┘       └───────┬───────┘       └───────┬───────┘
                    │                       │                       │
                    ▼                       ▼                       ▼
            ┌───────────────┐       ┌───────────────┐       ┌───────────────┐
            │  Figma API    │       │  Figma API    │       │ Figma Plugin  │
            │  api.figma.com│       │  api.figma.com│       │ (in Figma)    │
            └───────────────┘       └───────────────┘       └───────────────┘
            
            Read operations         Variable writes         Canvas writes
            (files, styles,         (create, update,        (create frames,
             components)             delete tokens)          modify nodes)
                                    NO PLUGIN NEEDED        PLUGIN REQUIRED

Three data paths:

  1. REST API (Read) — File data, styles, components, variables (no plugin)

  2. REST API (Write) — Variable/token CRUD operations (no plugin needed)

  3. WebSocket + Plugin — Canvas manipulation (creating/modifying nodes)

No-plugin mode: All read operations + variable management work with just a Figma access token. You only need the plugin for canvas writes (frames, shapes, text, auto-layout, prototyping).


Troubleshooting

"Plugin not connected"

  1. Make sure Figma Desktop is open

  2. Run the plugin: Plugins → Development → Figma Unified MCP Bridge

  3. Click Connect

  4. Verify status shows "Connected"

"FIGMA_ACCESS_TOKEN not set"

Add your token to claude_desktop_config.json:

"env": {
  "FIGMA_ACCESS_TOKEN": "figd_xxxxx"
}

"WebSocket connection failed"

The MCP server starts a WebSocket on port 18211. Make sure:

  1. Port 18211 is not in use (change with FIGMA_WS_PORT env var)

  2. No firewall blocking localhost connections

Check Logs

macOS:

# MCP server logs
tail -f ~/Library/Logs/Claude/mcp-server-figma-unified-mcp.log

# Claude Desktop logs
tail -f ~/Library/Logs/Claude/mcp.log

Windows (PowerShell):

# MCP server logs
Get-Content "$env:APPDATA\Claude\Logs\mcp-server-figma-unified-mcp.log" -Wait

# Claude Desktop logs
Get-Content "$env:APPDATA\Claude\Logs\mcp.log" -Wait

Development

Rebuild after changes

# MCP server + CLI
npm run build

# Figma plugin (use ; instead of && on Windows PowerShell)
cd figma-plugin; npm run build

# Run tests
npm test

Running tests

npm test              # Run all tests once
npm run test:watch    # Watch mode

Project Structure

figma-unified-mcp/
├── src/
│   ├── server.ts              # MCP server entry
│   ├── cli.ts                 # CLI entry (unified-design)
│   ├── config.ts              # Configuration & URL parsing
│   ├── types.ts               # TypeScript types
│   ├── cli/
│   │   ├── colors.ts          # ANSI color utilities
│   │   └── audit.ts           # Design audit command
│   ├── transport/
│   │   ├── rest-client.ts     # Figma REST API
│   │   └── plugin-bridge.ts   # WebSocket bridge to plugin
│   ├── tools/
│   │   ├── shared.ts          # Shared helpers (toolSuccess, toolError)
│   │   ├── tool-profiles.ts   # Profile filtering (minimal/standard/full)
│   │   ├── connection.ts      # Connection tools
│   │   ├── read.ts            # Read tools (35+)
│   │   ├── visual.ts          # Export tools
│   │   ├── create.ts          # Create tools
│   │   ├── modify.ts          # Modify tools
│   │   ├── variables.ts       # Variable tools
│   │   ├── prototype.ts       # Prototype tools
│   │   ├── codegen.ts         # Code generation tools
│   │   ├── code-connect.ts    # Code Connect tools (scan, match, publish)
│   │   ├── skill.ts           # Skill tool runner
│   │   └── figma-run.ts       # Escape hatch for non-full profiles
│   └── prompts/
│       ├── index.ts           # Agent skill registration
│       └── screen-patterns.ts # UX pattern data for design_screen skill
├── tests/
│   ├── config.test.ts         # URL parsing & config tests
│   ├── shared.test.ts         # Shared helper tests
│   ├── tool-profiles.test.ts  # Profile filtering tests
│   └── code-connect.test.ts   # Code Connect fuzzy matching & scanner tests
├── figma-plugin/
│   ├── manifest.json          # Plugin manifest
│   ├── code.ts                # Plugin logic
│   ├── ui.html                # Plugin UI
│   └── code.js                # Compiled plugin
├── CLAUDE.md                  # Agent instructions for Claude Code
├── skills.md                  # All 14 agent skills documentation
├── package.json
├── tsconfig.json
└── tsup.config.ts

License

MIT


Author

@sso-ss

Credits

Built with:

Available Tools

106 tools
figma_analyze_for_codegenC

Analyze node structure for best codegen strategy.

Inputs: nodeId (required), targetPlatform.

figma_apply_styleB

Apply a style to a node by ID or by name. Provide styleId to apply by ID, or styleName to apply by name. Requires plugin connection.

Inputs: nodeId (required), styleId, property, styleName, +1 more.

figma_batchA

Batch multiple create, modify, and variable operations in one round-trip. Max 200 ops. ALWAYS prefer this over calling individual tools in a loop. Use "$ref:N" to reference node ID from operation N. create_frame/create_component support nested "children" and inline auto-layout params.

Commands: create_frame, create_rectangle, create_ellipse, create_text, create_component, create_instance, create_line, create_path, create_from_svg, move_node, resize_node, set_fill, set_stroke, set_opacity, set_visible, set_corner_radius, set_text_content, set_text_style, set_auto_layout, set_effects, rename_node, delete_node, clone_node, group_nodes, reparent_node, set_constraints, bind_variable, create_variable, set_variable_value, create_style, apply_style, apply_style_by_name, delete_style, rename_style, set_annotation, import_component_by_key, import_style_by_key.

Param names in batch must match the plugin function signatures exactly:

  • create_text: {content, ...} or {text, ...} — both accepted for the text string

  • set_text_content: {nodeId, content} or {nodeId, text} for single, or {updates: [{nodeId, content}, ...]} for batch

  • create_path: {points: [{x,y},...], curveType?, closed?, strokeColor?, strokeWeight?, fillColor?, name?, parentId?}

  • import_component_by_key: {componentKey, x?, y?, parentId?, name?} (also accepts 'key' as alias for componentKey)

  • clone_node: {nodeId, offsetX?, offsetY?, newName?}

  • delete_node: {nodeId} for single, or use delete_multiple_nodes with {nodeIds: [...]}

IMPORTANT: Only FRAME, GROUP, COMPONENT, and PAGE nodes can be parents. Use create_frame (not create_rectangle) when you need children inside a shape (e.g. a pill/badge with a label).

Inputs: operations (required).

figma_bind_variableA

Bind a variable to a node property. Requires plugin connection (no REST endpoint for this).

Inputs: nodeId (required), property (required), variableId (required), paintIndex.

figma_boolean_operationC

Boolean op (union/subtract/intersect/exclude) on 2+ nodes.

Inputs: nodeIds (required), operation (required), name.

figma_cacheA

Manage library/component/style cache. action: 'stats' (view cached keys), 'clear' (clear all), 'invalidate' (clear by prefix, e.g., 'get_components'). Cache auto-expires after 5 minutes. Cached tools: get_components, get_styles, get_library_collections, get_library_variables, get_team_components, get_team_styles, get_component, get_design_system_rules.

Inputs: action (required), prefix.

figma_check_accessibilityA

Comprehensive WCAG 2.1 accessibility audit. Works via REST API (no plugin needed) when fileKey is provided, or via plugin bridge for the live canvas.

Checks: text contrast (1.4.3/1.4.6), non-text contrast (1.4.11), touch targets (2.5.5/2.5.8), alt text (1.1.1), typography & text spacing (1.4.4/1.4.12), heading hierarchy (1.3.1), focus indicators (2.4.7), interactive spacing (2.5.8), color-blind safety (1.4.1).

Each issue includes WCAG criterion, severity (error/warning), and actionable fix.

Inputs: level, nodeId, fileKey, categories.

figma_clone_nodeC

Clone a node with optional offset.

Inputs: nodeId (required), newName, offsetX, offsetY.

figma_codegen_bundleA

Get a complete design-to-code bundle in a single call (REST-only, no plugin needed). Returns:

  • Compact tree with colors, fonts, layout, image refs, gradients, shadows

  • Image fill URLs (CDN links for raster images)

  • Vector/icon SVG URLs (rendered via Figma API)

  • Screenshot of the node (base64 PNG)

  • Metadata (node name, dimensions, image counts)

The LLM should use this data to generate code directly.

Inputs: nodeId (required), fileKey (required), maxDepth, screenshotScale, +1 more.

figma_connect_pluginC

Connect to Figma plugin via WebSocket.

Inputs: channel.

figma_create_componentC

Create a reusable component with full auto-layout, stroke, and nested children support.

Inputs: name (required), width (required), height (required), x, +24 more.

figma_create_ellipseC

Create an ellipse/circle.

Inputs: width (required), height (required), x, y, +3 more.

figma_create_flowC

Create a prototype flow starting point on a frame.

Inputs: name (required), nodeId (required), description.

figma_create_frameC

Create a frame with full auto-layout, stroke, and nested children support.

Inputs: name (required), width (required), height (required), x, +23 more.

figma_create_from_svgA

Create a vector node from raw SVG markup. Use this for charts, icons, curves, and any complex shapes that can't be made with rectangles/ellipses/lines. Supports , , , gradients, and all SVG elements.

Inputs: svg (required), x, y, name, +3 more.

figma_create_instanceC

Create an instance of a component.

Inputs: componentId (required), x, y, name, +3 more.

figma_create_interactionC

Add a prototype interaction to a node.

Inputs: action (required), nodeId (required), trigger (required), url, +8 more.

figma_create_lineC

Create a line.

Inputs: endX (required), endY (required), startX (required), startY (required), +4 more.

figma_create_pageB

Create a new page. Optionally switch to it.

Inputs: name, switchTo.

figma_create_pathA

Create a vector path from points. Much simpler than create_from_svg for charts, curves, and shapes. Supports straight lines and smooth (Catmull-Rom) curves.

Examples:

  • Line chart: points=[{x:0,y:80},{x:50,y:20},{x:100,y:60}], curveType="smooth"

  • Triangle: points=[{x:50,y:0},{x:100,y:100},{x:0,y:100}], closed=true, fillColor="#FF0000"

  • Sparkline: points=[{x:0,y:50},{x:25,y:10},{x:50,y:70},{x:75,y:30},{x:100,y:50}], curveType="smooth", strokeColor="#00FF00"

Inputs: points (required), x, y, name, +6 more.

figma_create_rectangleD

Create a rectangle.

Inputs: width (required), height (required), x, y, +7 more.

figma_create_styleC

Create a reusable style (paint, text, effect). Requires plugin connection.

Inputs: name (required), type (required), properties (required), description.

figma_create_textB

Create a text node. Accepts 'text' or 'content' for the string value.

Inputs: x, y, name, text, +14 more.

figma_create_variableC

Create a variable (COLOR, FLOAT, STRING, BOOLEAN). Uses REST API — no plugin required.

Inputs: name (required), fileKey (required), collectionId (required), resolvedType (required), +4 more.

figma_create_variable_collectionB

Create a variable collection for design tokens. Uses REST API — no plugin required.

Inputs: name (required), fileKey (required), modes.

figma_delete_nodeB

Delete one or more nodes.

Inputs: nodeId, nodeIds.

figma_delete_variableB

Delete a variable. Uses REST API — no plugin required.

Inputs: fileKey (required), variableId (required).

figma_delete_variable_collectionB

Delete a variable collection. Uses REST API — no plugin required.

Inputs: fileKey (required), collectionId (required).

figma_export_pngC

Export a node as PNG/SVG/PDF with base64 data.

Inputs: scale, format, nodeId.

figma_export_svgC

Export a node as raw SVG markup.

Inputs: nodeId (required), fileKey (required).

figma_export_to_fileA

Export a Figma node as an image file saved to a local path. Supports PNG, JPG, SVG, and PDF formats. Uses plugin bridge for export (no fileKey needed if plugin is connected). Falls back to REST API if fileKey is provided.

Examples: { nodeId: "1:23", filePath: "~/Desktop/thumbnail.png" } { nodeId: "1:23", filePath: "/Users/me/exports/logo.svg", format: "svg", scale: 3 }

Inputs: nodeId (required), filePath (required), scale, format, +1 more.

figma_generate_cssB

Generate CSS from a node's styles.

Inputs: nodeId (required), useVariables, classNamePrefix, includeChildren.

figma_generate_handoff_specA

Generate a visual design handoff spec annotation in Figma. This returns step-by-step instructions — follow them using the available Figma tools. Available sections: spacing, anatomy, colors, typography, grid, assets. Requires plugin connection for creating annotation nodes.

Inputs: nodeId (required), sections.

figma_generate_htmlC

Generate semantic HTML from a node.

Inputs: nodeId (required), semanticTags, includeStyles.

figma_generate_reactC

Generate React component from a node.

Inputs: nodeId (required), typescript, styleFormat, includeProps, +1 more.

figma_generate_swiftuiC

Generate SwiftUI code from a node.

Inputs: nodeId (required), structName, includePreviews, useSystemColors.

figma_generate_tailwind_configB

Generate Tailwind config from Figma design tokens.

Inputs: fileKey, includeColors, includeShadows, includeSpacing, +1 more.

figma_generate_tokensC

Export design tokens (CSS vars, JSON, SCSS).

Inputs: format (required), tokenTypes.

figma_get_annotationsB

Get annotations on a node or the whole document.

Inputs: nodeId.

figma_get_code_connect_mapC

Map Figma components to source code locations.

Inputs: nodeId.

figma_get_commentsC

Get comments on a file.

Inputs: fileKey (required).

figma_get_componentC

Get a published component by key.

Inputs: componentKey (required).

figma_get_componentsA

Get components. source: file (REST — published components with importable keys), local (plugin — current page), library (plugin — discovered from instances on canvas).

Inputs: source, fileKey.

figma_get_design_system_rulesB

Extract design system rules: colors, typography, spacing, etc.

Inputs: no named parameters.

figma_get_dev_resourcesB

Get existing dev resources (code links) attached to nodes in a Figma file.

Inputs: fileKey (required), nodeId.

figma_get_fileA

Get file document tree. Defaults to depth=2 (pages + top-level frames). Set higher depth for deeper traversal, or use figma_get_node for a specific subtree.

Inputs: fileKey (required), depth, nodeId.

figma_get_file_versionsC

Get version history of a file.

Inputs: fileKey (required).

figma_get_flowsA

Get all prototype flows in the current page.

Inputs: no named parameters.

figma_get_imagesC

Export nodes as images. Returns download URLs.

Inputs: fileKey (required), nodeIds (required), scale, format.

figma_get_instance_overridesB

Get override properties from a component instance.

Inputs: nodeId (required).

figma_get_interactionsC

Get all interactions on a node.

Inputs: nodeId (required).

figma_get_library_collectionsA

Get enabled library variable collections.

Inputs: no named parameters.

figma_get_library_items_usedC

Find external library components/styles used in a file.

Inputs: fileKey (required).

figma_get_library_variablesA

Get variables from a library collection by key. Filter by type or name to reduce token usage.

Inputs: collectionKey (required), limit, namePattern, resolvedType.

figma_get_nodeC

Get a node with properties, styles, and children.

Inputs: nodeId (required), fileKey (required), depth.

figma_get_nodesB

Get multiple nodes in one request. Batch alternative to get_node.

Inputs: fileKey (required), nodeIds (required), depth.

figma_get_project_filesB

List all files in a project.

Inputs: projectId (required).

figma_get_selectionA

Get currently selected nodes.

Inputs: no named parameters.

figma_get_styleB

Get a published style by key.

Inputs: styleKey (required).

figma_get_stylesA

Get styles. fileKey→REST file styles, omit→plugin local styles.

Inputs: fileKey.

figma_get_team_componentsB

Get published components from a team. Requires Organization or Enterprise plan.

Inputs: teamId (required), pageSize.

figma_get_team_projectsB

List all projects in a team.

Inputs: teamId (required).

figma_get_team_stylesB

Get published styles from a team.

Inputs: teamId (required), pageSize.

figma_get_variablesA

Get local variables and collections (design tokens). Filter by type or name to reduce token usage.

Inputs: fileKey (required), limit, namePattern, resolvedType, +1 more.

figma_get_viewportA

Get viewport position, zoom, and visible bounds.

Inputs: no named parameters.

figma_group_nodesC

Group nodes together.

Inputs: nodeIds (required), name.

figma_import_component_by_keyA

Import a published component by its library key and create an instance. Get keys from figma_get_components with source='file'. IMPORTANT: This only works for components published within the same Figma team library. For external/linked design system libraries, use figma_clone_node to clone an existing instance from the canvas instead. Run figma_get_components with source='library' first to check what's available.

Inputs: componentKey (required), x, y, name, +1 more.

figma_import_style_by_keyA

Import library styles by key so they become available locally. Use figma_get_styles to find keys. Supports batch import via styleKeys array. After import, styles can be applied with figma_apply_style by name.

Inputs: styleKey, styleKeys.

figma_match_componentsA

Match Figma components to codebase components using fuzzy name matching. Requires plugin connection for Figma scanning, and a codebase path for code scanning. Returns a mapping with confidence scores. Review before publishing.

Inputs: codebasePath (required), fileKey, frameworks, minConfidence.

figma_move_nodeC

Move a node to a new position.

Inputs: x (required), y (required), nodeId (required).

figma_post_commentC

Post a comment on a file or node.

Inputs: fileKey (required), message (required), x, y, +1 more.

figma_present_prototypeC

Open prototype presentation view.

Inputs: nodeId.

figma_publish_dev_resourcesA

Publish dev resource links to Figma Dev Mode. Attaches code file URLs to component nodes. Run figma_match_components first to generate the mapping, then publish selected matches.

The links will appear in Figma's Dev Mode panel for each component.

Inputs: fileKey (required), resources (required).

figma_remove_flowB

Remove a flow starting point from a frame.

Inputs: nodeId (required).

figma_remove_interactionsB

Remove all interactions from a node.

Inputs: nodeId (required).

figma_rename_nodeC

Rename a node.

Inputs: name (required), nodeId (required).

figma_reparent_nodeC

Move a node to a different parent.

Inputs: nodeId (required), newParentId (required), index.

figma_resize_nodeD

Resize a node.

Inputs: width (required), height (required), nodeId (required).

figma_scan_codebaseA

Scan a local codebase directory for UI components (React, Vue, Svelte, Swift, Compose, Angular, Flutter). Returns a list of discovered components with their file paths and frameworks. Use this before figma_match_components to find code-to-design mappings.

Inputs: directory (required), maxDepth, frameworks.

figma_scan_nodes_by_typesC

Find nodes by type (FRAME, TEXT, COMPONENT, etc.).

Inputs: nodeTypes (required), maxResults, parentNodeId.

figma_scan_text_nodesC

Scan text nodes with chunking for large pages.

Inputs: chunkSize, chunkIndex, parentNodeId.

figma_screenshotA

Screenshot one or more nodes as base64 images. Use nodeId for a single node, or nodeIds for multiple nodes in one call. If plugin is connected, fileKey is optional.

Inputs: scale, format, nodeId, fileKey, +1 more.

figma_send_commandC

Send a raw command to the plugin.

Inputs: command (required), params, timeout.

figma_set_annotationC

Set annotation(s) on node(s).

Inputs: label, nodeId, annotations, labelMarkdown.

figma_set_auto_layoutC

Configure auto-layout (flexbox) on a frame.

Inputs: nodeId (required), padding, sizingH, sizingV, +13 more.

figma_set_constraintsC

Set resize constraints for a node.

Inputs: nodeId (required), vertical (required), horizontal (required).

figma_set_corner_radiusC

Set corner radius of a node.

Inputs: nodeId (required), radius (required), topLeft, topRight, +2 more.

figma_set_default_transitionC

Set default transition for this frame.

Inputs: nodeId (required), transition (required), easing, duration, +1 more.

figma_set_effectsC

Apply effects (shadows, blurs) to a node.

Inputs: nodeId (required), effects (required).

figma_set_fillA

Set fill of a node. Supports solid colors, gradients, and images.

Simple solid: { nodeId, color: {r,g,b} } Gradient: { nodeId, fills: [{ type:"GRADIENT_LINEAR", gradientStops:[{color:{r,g,b,a},position:0},{color:{r,g,b,a},position:1}] }] } Image: { nodeId, fills: [{ type:"IMAGE", imageUrl:"https://..." }] } Multiple fills: pass multiple items in the fills array.

Inputs: nodeId (required), color, fills.

figma_set_focusB

Select and scroll viewport to a node.

Inputs: nodeId (required), zoomLevel.

figma_set_instance_overridesC

Apply overrides to component instances.

Inputs: overrides (required), targetNodeIds (required).

figma_set_opacityC

Set node opacity.

Inputs: nodeId (required), opacity (required).

figma_set_scroll_behaviorB

Configure scrolling for a frame in prototypes.

Inputs: nodeId (required), scrollBehavior (required), scrollOffset, scrollDirection.

figma_set_selectionsB

Select multiple nodes and scroll to show them.

Inputs: nodeIds (required), scrollToView.

figma_set_strokeC

Set stroke (border) of a node.

Inputs: color (required), nodeId (required), weight, dashPattern, +1 more.

figma_set_text_contentB

Update text content. Supports batch via updates array. Accepts 'text' or 'content' for the string value.

Inputs: text, nodeId, content, updates.

figma_set_text_styleB

Set text style with presets or custom values. Any explicit property overrides the preset.

Presets: display, heading-xl, heading-lg, heading-md, heading-sm, heading-xs, body-xl, body-lg, body-md, body-sm, body-xs, label-lg, label-md, label-sm, caption, overline

Examples: { nodeId, preset: "heading-xl" } { nodeId, preset: "body-md", fontWeight: 700 } { nodeId, fontSize: 48, fontWeight: 800 }

Inputs: nodeId (required), preset, fontSize, fillColor, +7 more.

figma_setup_overlayC

Configure a frame as an overlay in prototypes.

Inputs: nodeId (required), overlayBackground, overlayBackgroundColor, overlayBackgroundInteraction.

figma_set_variable_valueA

Set variable value for a mode. Uses REST API — no plugin required. Use mode ID (get from figma_get_variables).

Inputs: modeId (required), fileKey (required), variableId (required), value.

figma_set_visibleC

Show or hide a node.

Inputs: nodeId (required), visible (required).

figma_statusA

Check server, bridge, and REST API status.

Inputs: no named parameters.

figma_switch_pageB

Switch to a page by name, ID, or index.

Inputs: pageId, pageName, pageIndex.

figma_update_variableB

Update variable properties (name, description, scopes). Uses REST API — no plugin required.

Inputs: fileKey (required), variableId (required), name, scopes, +1 more.

figma_validate_layoutC

Check overlaps, bounds, padding, alignment issues.

Inputs: nodeId.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.6/5.0

    Scored across 106 tools

    Disambiguation2/5

    Multiple tools have overlapping responsibilities, especially around exporting: figma_export_png, figma_export_svg, figma_export_to_file, figma_get_images, and figma_screenshot all serve similar purposes. Retrieval also overlaps between figma_get_file, figma_get_node, figma_get_nodes, figma_search, and figma_scan_nodes_by_types, making misselection likely without reading descriptions carefully.

    Naming Consistency4/5

    The vast majority of tools follow the figma_verb_noun snake_case pattern, with predictable verbs like get, create, set, and delete. A few names break the pattern—figma_status, figma_cache, figma_boolean_operation, and figma_codegen_bundle—but these are exceptions rather than systemic inconsistencies.

    Tool Count1/5

    106 tools is an extreme count, far exceeding what an agent can efficiently evaluate in context. Even for a 'unified' Figma server, this surface area is unwieldy and would be better split into focused sub-servers; the tool prompt alone would consume enormous context.

    Completeness4/5

    Coverage is genuinely extensive: node CRUD, variables, styles, components, interactions, comments, exports, accessibility, codegen, and dev resources are all represented. Minor lifecycle gaps exist—such as updating or deleting comments and managing files/projects—but core design and development workflows do not hit dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server that reads Tokens Studio design tokens from Figma and makes them available to Claude Code, enabling token-aware code generation.
      38
      4
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      An MCP server that bridges Claude Code to Figma, enabling AI-driven design creation, modification, and export via semantic tools and WebSocket communication.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that lets Claude read Figma file comments directly, with tools to list comment threads scoped to a frame or file and render images of pinned nodes.
      4
      ISC