figma-ui-mcp

Two-way bridge between an AI client and Figma Desktop: draw UI on the canvas and read designs back

By Trần Hoài Hưng (individual) JavaScript Local · stdio Design

49 popularity score ★ 266 ↓ 313/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add figma-ui -- npx -y figma-ui-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "figma-ui": {
      "command": "npx",
      "args": [
        "-y",
        "figma-ui-mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "figma-ui": {
      "command": "npx",
      "args": [
        "-y",
        "figma-ui-mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "figma-ui": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "figma-ui-mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.figma-ui]
command = "npx"
args = ["-y", "figma-ui-mcp"]
Gemini CLITerminal
gemini mcp add --scope user figma-ui npx -- -y figma-ui-mcp
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

FirstTerminal
git clone https://github.com/TranHoaiHung/figma-ui-mcp
cd figma-ui-mcp
npm install
Claude CodeTerminal
claude mcp add figma-ui -- node '<ABSOLUTE_PATH_TO_CLONE>/server/index.js'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "figma-ui": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/server/index.js"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "figma-ui": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/server/index.js"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "figma-ui": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/server/index.js"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.figma-ui]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/server/index.js"]
Gemini CLITerminal
gemini mcp add --scope user figma-ui node -- '<ABSOLUTE_PATH_TO_CLONE>/server/index.js'

Settings 3

FIGMA_MCP_PORT Optional: Port of the local bridge the Figma plugin polls; 38451 by default.
FIGMA_MCP_HOST Optional: Address the bridge binds to; 127.0.0.1 by default. The bridge has no authentication.
FIGMA_MCP_LONG_POLL_MS Optional: How long the bridge holds a plugin poll open, in ms; 8000 by default.

What it does

figma-ui-mcp connects an MCP client to a document open in Figma Desktop through a companion Figma plugin, with no Figma API token. The server runs over stdio on your machine and also opens a small HTTP bridge; the plugin polls that bridge, picks up queued operations and runs them against the open file through Figma's plugin API.

Writing works by sending a short JavaScript snippet to figma_write. The server runs it in a Node vm context (require, process, fetch and timers removed, 30-second limit) where a figma object exposes helpers to create frames, shapes and text, edit, clone, move or delete nodes, set up variables and text styles, add prototype links and place icons or images. Reading goes through figma_read operations that return node trees, per-node details with resolved variables and styles, ready CSS, component maps, searches, and PNG, JPG or SVG exports. figma_rules collects a file's colour tokens, type styles, variables and components into one markdown sheet for code generation, and several open Figma files can be targeted at once by session id (v2.3.0 and later).

The bridge listens on 127.0.0.1 port 38451 by default. The code reads three settings the README does not mention: FIGMA_MCP_PORT and FIGMA_MCP_HOST change the address, and FIGMA_MCP_LONG_POLL_MS the poll hold time (8000 ms). If the port is taken it tries the next nine; if a process on the port fails its health check at start-up, the server kills it with lsof and kill -9 (server/bridge-server.js).

What it needs

RuntimeNode.js 18+

Node.js 18 or later (npx). Figma Desktop with the project's plugin imported by hand from its manifest (Plugins > Development > Import plugin from manifest) and running while you work; the Figma web app cannot reach localhost. The plugin must be re-imported after each update that changes it, and the client restarted after adding the server.

Limits

Works only with Figma Desktop and only while the bridge plugin is open in the file; the browser version of Figma is not supported. The plugin is not auto-updated, so a plugin older than the npm package can mismatch (figma_status reports pluginVersion to check). Variables do not persist between figma_write calls: each runs in a fresh sandbox. The bridge accepts a fixed list of operations, 5 MB request bodies and up to 50 queued operations per session; plugin operations time out after 60 to 90 seconds depending on type. Port fallback covers 38451 to 38460 only.

Who it suits

Suits a designer or front-end developer on Figma Desktop who wants an assistant to sketch screens straight onto the canvas and to pull existing designs back as structure, CSS or tokens for code, without handing over a Figma API token. It works on whatever file is open, locally, and can change or delete nodes, so it is less suited to read-only inspection of shared team files, to headless or CI use where no desktop app runs, or to anyone limited to Figma in the browser. It is a community project, not published by Figma.

Tools 5

figma_status
Reports whether the Figma plugin is connected and lists active file sessions.
figma_write
Runs a JavaScript snippet that creates, edits or deletes nodes, styles, variables and prototype links.
figma_read
Returns design data by operation: node trees, node details, CSS, component maps, searches, screenshots and exports.
figma_docs
Returns the helper API reference and design rules for writing figma_write code.
figma_rules
Builds a markdown sheet of a file's colour tokens, text styles, variables and components.

Similar servers