MCP Hub
Back to servers

figma-ui-mcp

Validated

Bidirectional Figma MCP — AI draws UI on Figma canvas, reads designs back

Registry
Stars
4
Tools
4
Updated
Mar 16, 2026
Validated
Mar 18, 2026
Validation Details

Duration: 5.9s

Server: figma-ui-mcp v1.0.0

Quick Install

npx -y figma-ui-mcp

figma-ui-mcp

figma-ui-mcp

npm version MCP Registry License: MIT GitHub stars

Bidirectional Figma MCP — use Claude (or any MCP client) to draw UI directly in Figma, and read existing designs back as structured data or code.

Requires Figma Desktop — the plugin communicates with the MCP server over localhost HTTP polling. Figma's web app does not allow localhost network access, so Figma Desktop is required.

Claude ──figma_write──▶ MCP Server ──HTTP (localhost:38451)──▶ Figma Plugin ──▶ Figma Document
Claude ◀─figma_read──── MCP Server ◀──HTTP (localhost:38451)── Figma Plugin ◀── Figma Document

How the localhost bridge works

The MCP server starts a small HTTP server bound to localhost:38451. The Figma plugin (running inside Figma Desktop) polls this server every 500 ms to pick up queued operations and post results back. All traffic stays on your machine — nothing is sent to any external server.

This approach is necessary because Figma plugins run in a sandboxed iframe and cannot use stdio or WebSocket to talk to a local process directly. HTTP polling over localhost is the only supported method for a Figma plugin to communicate with a local tool.


Features

DirectionToolWhat it does
Writefigma_writeDraw frames, shapes, text on any page via JS code
Readfigma_readExtract node trees, colors, typography, screenshots
Infofigma_statusCheck plugin connection status
Docsfigma_docsGet full API reference + examples

Quick Start

Step 1 — Add the MCP server to your AI client

Choose your platform:

Claude Code (CLI)
# Project scope (default)
claude mcp add figma-ui-mcp -- npx figma-ui-mcp

# Global scope (all projects)
claude mcp add --scope user figma-ui-mcp -- npx figma-ui-mcp
Claude Desktop

Edit config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "figma-ui-mcp"]
    }
  }
}
Cursor

Edit .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "figma-ui-mcp"]
    }
  }
}
VS Code / GitHub Copilot

Edit .vscode/mcp.json (project) or add to settings.json (global):

{
  "mcp": {
    "servers": {
      "figma": {
        "command": "npx",
        "args": ["-y", "figma-ui-mcp"]
      }
    }
  }
}
Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "figma-ui-mcp"]
    }
  }
}
Antigravity (Google)
  1. Open "..." dropdown at the top of the agent panel
  2. Click "Manage MCP Servers""View raw config"
  3. Add to mcp_config.json:
{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "figma-ui-mcp"]
    }
  }
}
From source (any client)
git clone https://github.com/TranHoaiHung/figma-ui-mcp
cd figma-ui-mcp
npm install
# Then point your MCP client to: node /path/to/figma-ui-mcp/server/index.js

Step 2 — Run the Figma plugin

  1. Open Figma Desktop (required — web app cannot access localhost)
  2. Go to Plugins → Development → Import plugin from manifest...
  3. Select plugin/manifest.json from this repo
  4. Run Plugins → Development → Figma UI MCP Bridge

The plugin UI shows a green dot when the MCP server is connected.

Step 3 — Start designing with AI

The MCP tools are automatically available in your AI client:

figma_status     — check connection
figma_write      — draw / modify UI
figma_read       — extract design data
figma_docs       — API reference

Usage Examples

Draw a screen

Ask Claude: "Draw a dark dashboard with a sidebar, header, and 4 KPI cards"

Claude calls figma_write with code like:

await figma.createPage({ name: "Dashboard" });
await figma.setPage({ name: "Dashboard" });

const root = await figma.create({
  type: "FRAME", name: "Dashboard",
  x: 0, y: 0, width: 1440, height: 900,
  fill: "#0f172a",
});

const sidebar = await figma.create({
  type: "FRAME", name: "Sidebar",
  parentId: root.id,
  x: 0, y: 0, width: 240, height: 900,
  fill: "#1e293b", stroke: "#334155", strokeWeight: 1,
});

await figma.create({
  type: "TEXT", name: "App Name",
  parentId: sidebar.id,
  x: 20, y: 24, content: "My App",
  fontSize: 16, fontWeight: "SemiBold", fill: "#f8fafc",
});
// ... continue

Read a design

Ask Claude: "Read my selected frame and convert it to Tailwind CSS"

Claude calls figma_read with operation: "get_selection", receives the full node tree, then generates corresponding code.

Screenshot a frame

figma_read  →  operation: "screenshot"  →  nodeId: "123:456"

Returns a base64 PNG Claude can analyze and describe.


Architecture

figma-ui-mcp/
├── server/
│   ├── index.js            MCP server (stdio transport)
│   ├── bridge-server.js    HTTP bridge on localhost:38451
│   ├── code-executor.js    VM sandbox — safe JS execution
│   ├── tool-definitions.js MCP tool schemas
│   └── api-docs.js         API reference text
└── plugin/
    ├── manifest.json       Figma plugin manifest
    ├── code.js             Plugin main — operation handlers
    └── ui.html             Plugin UI — HTTP polling + status

Security

LayerProtection
VM sandboxvm.runInContext() — blocks require, process, fs, fetch
Localhost onlyBridge binds 127.0.0.1:38451, never exposed to network
Operation allowlistOnly 20 predefined operations accepted
Timeout10s VM execution + 10s per plugin operation
Body size limit500 KB max per request

Available Write Operations (figma_write)

OperationDescription
figma.status()Current Figma context
figma.listPages()List all pages
figma.setPage({ name })Switch active page
figma.createPage({ name })Add a new page
figma.query({ type?, name?, id? })Find nodes
figma.create({ type, ... })Create FRAME / RECTANGLE / ELLIPSE / LINE / TEXT
figma.modify({ id, ... })Update node properties
figma.delete({ id? name? })Remove a node
figma.append({ parentId, childId })Move node into parent
figma.listComponents()List all components
figma.instantiate({ componentId, ... })Create component instance

Available Read Operations (figma_read)

OperationDescription
get_selectionFull design tree of selected node(s) + design tokens
get_designFull node tree for a specified frame or page
get_page_nodesTop-level frames on the current page
screenshotExport node as PNG (base64)
export_svgExport node as SVG markup

Star History

If figma-ui-mcp helps you, please give it a star — it helps others discover the project!

GitHub stars

Star History Chart


License

License: MIT

MIT © TranHoaiHung — free to use, modify, and distribute. See LICENSE for details.


Reviews

No reviews yet

Sign in to write a review