figma-mcp-unified
README.md
<div align="center">
# π¨ Figma MCP Unified
### Talk to your AI. It designs in Figma.
Read, create and manage Figma designs from **Claude, Cursor, VS Code, Windsurf, Gemini, Codex and Hermes**: one connection for every AI app.
[](LICENSE)
[](https://nodejs.org)
[](https://modelcontextprotocol.io)
[](https://www.figma.com)


[**π Get started**](#-set-it-up-in-5-steps) Β· [π¬ What to ask](#-what-can-you-ask) Β· [π§― Troubleshooting](#-something-not-working) Β· [π§ Developers](#-for-developers)
</div>
---
## β¨ What it does
<table>
<tr>
<td width="33%" valign="top">
### π See your designs
Your AI reads pages, frames, colors, fonts and spacing, and even **looks at screenshots** of your work.
</td>
<td width="33%" valign="top">
### βοΈ Create screens
*"Make a login screen for iPhone"* becomes a real, editable Figma frame with auto layout, in one go.
</td>
<td width="33%" valign="top">
### π οΈ Edit anything
Colors, text, sizes, layout, components, variants, prototypes, FigJam boards and tables.
</td>
</tr>
<tr>
<td valign="top">
### π¨ Run your design system
Health score, lint, accessibility check, color and spacing **variables**, styles, component docs.
</td>
<td valign="top">
### π» Design β code
Get code-ready details, or export tokens to **CSS, Tailwind, SCSS, JSON, TypeScript, Swift, Flutter**.
</td>
<td valign="top">
### π Works everywhere
Every major AI app, on **Mac, Windows and Linux**, for files in **Figma Desktop or the browser**.
</td>
</tr>
</table>
---
## π§ How it works
```mermaid
flowchart LR
AI["π€ Your AI app<br/>Claude Β· Cursor Β· VS Code<br/>Windsurf Β· Gemini Β· Codex Β· Hermes"]
MCP["π¨ Figma MCP Unified"]
P["π₯οΈ Plugin in Figma Desktop<br/>read + write, no limits"]
R["π Figma REST API<br/>read any file, incl. browser"]
D["π» Figma Dev Mode<br/>code-ready details"]
O["βοΈ Figma's official server<br/>edit browser files"]
AI --> MCP
MCP --> P
MCP --> R
MCP --> D
AI -.-> O
```
> **What's an "MCP"?** It's a plug that lets an AI app use another app. This project is the plug between your AI app and Figma. It automatically picks the best way to reach your file.
---
## π What you need
| | You need | How to check / get it |
|:-:|---|---|
| π» | A Mac or Windows computer | Linux works too, see [browser files](#-files-open-in-the-browser) |
| π¨ | **Figma Desktop** (free) | [figma.com/downloads](https://www.figma.com/downloads/), then log in |
| π’ | **Node.js 20 or newer** | In Terminal type `node -v`. Need it? Install the **LTS** from [nodejs.org](https://nodejs.org) |
| π¦ | **Git** (optional) | `git --version`. No Git? Use **Download ZIP** in step 1 |
| π€ | An AI app | Any one from the list [below](#-supported-ai-apps) |
> [!TIP]
> **Terminal** is the app where you type commands. On a Mac press <kbd>β</kbd> <kbd>Space</kbd>, type *Terminal* and press <kbd>Enter</kbd>. On Windows press <kbd>β Win</kbd>, type *PowerShell* and press <kbd>Enter</kbd>.
---
## π Set it up in 5 steps
> β±οΈ About 10 minutes, one time only.
### 1οΈβ£ Download it
Paste this into Terminal and press <kbd>Enter</kbd>:
```bash
git clone https://github.com/Soumen-Developer/figma-mcp-unified.git ~/figma-mcp-unified
```
<details>
<summary>No Git? Download the ZIP instead</summary>
On this GitHub page click the green **Code** button β **Download ZIP**. Unzip it, rename the folder to `figma-mcp-unified` and move it to your home folder.
</details>
### 2οΈβ£ Install it and connect your AI apps
```bash
cd ~/figma-mcp-unified
npm run setup
```
This takes 1β3 minutes. It installs everything and adds Figma to **every AI app on your computer**. At the end you'll see:
```text
claude-code configured ...
cursor configured ...
vscode skipped not installed
```
β
**configured** means it's done for that app Β· βοΈ **skipped** means that app isn't installed (that's fine) Β· πΎ your old settings are backed up first.
### 3οΈβ£ Add the plugin to Figma
The plugin is the small piece that runs **inside Figma** so the AI can work on your design.
1. Open **Figma Desktop** and open any design file.
2. Click the **Figma menu** (top-left) β **Plugins** β **Development** β **Import plugin from manifestβ¦**
3. Pick this file: `figma-mcp-unified` β `plugin` β **`manifest.json`**
> [!TIP]
> On a Mac, press <kbd>β</kbd> <kbd>β§</kbd> <kbd>G</kbd> in the file window, paste `~/figma-mcp-unified/plugin/manifest.json` and press <kbd>Enter</kbd>.
> [!WARNING]
> **Pick the file inside the `figma-mcp-unified` folder.** If you tried other Figma bridges before, Figma may also show **"Figma MCP Bridge"**. That's a different plugin and it won't connect. The right one is called **Figma MCP Unified**.
### 4οΈβ£ Start the plugin in your file
1. In your design file: **Figma menu β Plugins β Development β Figma MCP Unified**
2. A small window opens. Wait for π’ **WebSocket Connected**.
3. Leave that window open while you work. You can shrink it with the arrow button.
### 5οΈβ£ Restart your AI app and say hi
Close and reopen your AI app, then type:
```text
Check my Figma connection with figma_status and tell me what you can do.
```
If it replies with your file name, π **you're all set!**
---
## π Every day
Three things must be on for the AI to work in Figma:
| | Checklist | How |
|:-:|---|---|
| 1 | π¨ Figma Desktop is open with your file | Just open it |
| 2 | π’ The plugin runs **in that file** and says **Connected** | Plugins β Development β Figma MCP Unified |
| 3 | π€ Your AI app is open | The connection starts with your AI app |
**Pro tips**
- π±οΈ **Select something** in Figma, then say *"the selected frame"*. The AI sees your selection.
- π **Or paste a link**: right-click a frame β **Copy link to selection** β paste it in the chat.
- πΈ **Ask it to check its work**: *"show me a picture of what you made"*.
- β©οΈ **Oops?** Press <kbd>β</kbd> <kbd>Z</kbd> / <kbd>Ctrl</kbd> <kbd>Z</kbd> in Figma. Undo works for AI changes too.
---
## π¬ What can you ask?
Copy any of these into your AI app.
<details open>
<summary><b>π Look at a design</b></summary>
- *Describe the selected frame: layout, colors, fonts and spacing.*
- *Show me a picture of the selected frame.*
- *List all the pages and main frames in this file.*
- *Which components does this file have?*
</details>
<details open>
<summary><b>βοΈ Create new designs</b></summary>
- *Create a mobile login screen (iPhone size) with a title, email and password fields and a blue Sign in button.*
- *Create a desktop landing page (1440 wide) for a coffee shop: header with menu, hero section with a button, 3 feature cards and a footer.*
- *Make the same page for tablet and iPhone and put them next to the desktop one.*
- *Use the components and colors that already exist in this file.*
π **Screen sizes it knows:** `desktop` 1440 Β· `desktop-hd` 1920 Β· `laptop` 1280 Β· `tablet` 834 Β· `tablet-landscape` Β· `mobile-web` 390 Β· `iphone` 393 Β· `iphone-pro-max` 440 Β· `iphone-se` 375 Β· `android` 412 Β· `android-compact` 360 Β· `ipad-mini` Β· `watch`
</details>
<details>
<summary><b>π οΈ Change existing designs</b></summary>
- *Make all buttons on this page 12px rounded and blue #2563EB.*
- *Change the title text to "Welcome back" and make it bold.*
- *Turn this frame into auto layout with a 16px gap and 24px padding.*
- *Rename the layers in the selected frame so they describe what they are.*
</details>
<details>
<summary><b>π¨ Design system (colors, fonts, components)</b></summary>
- *Give my design system a health score and tell me the top fixes.*
- *Check this page for problems (colors not using variables, missing text styles, bad names).*
- *Check if the text is readable (WCAG contrast) and if buttons are big enough to tap.*
- *Create color variables: primary #2563EB, secondary #9333EA, with Light and Dark modes.*
- *Export my colors and spacing as a Tailwind config to `tailwind.tokens.js`.* (also CSS, SCSS, JSON, TypeScript, Swift, Dart/Flutter)
- *Write documentation for the Button component.*
- *Compare the Button component in Figma with `src/components/Button.tsx`.*
</details>
<details>
<summary><b>π» Design β code</b></summary>
- *Build the selected frame in React with Tailwind.*
- *Make this screen in SwiftUI.* / *β¦in Flutter.*
</details>
<details>
<summary><b>π FigJam</b></summary>
- *Make a table with 4 columns: Task, Owner, Status, Due date.*
- *Add a sticky note for each of these ideas: β¦*
</details>
---
## π€ Supported AI apps
`npm run setup` connects all of these automatically if they're installed:
| App | Our server | Figma's official server (for browser files) |
|---|:-:|:-:|
| Claude Code | β
| β
turned on automatically |
| Claude Desktop | β
| β add **Figma** under *Settings β Connectors* |
| Cursor | β
| β
|
| VS Code (Copilot) | β
| β
|
| Windsurf | β
| β
|
| Gemini CLI | β
| β
|
| Codex | β
| β add it yourself if your version supports remote servers |
| Hermes | β
| β |
Using another app? See [manual setup](#-for-developers).
---
## π Files open in the browser
Figma doesn't run plugins that are still in development inside the browser, so pick one of these:
| You want to⦠| Do this |
|---|---|
| βοΈ **Read and edit** (easiest) | Open the same file in **Figma Desktop** and run the plugin (steps 3β4). |
| π **Only read** a browser file | Set up a Figma token (below), then paste the file's link into your chat. |
| βοΈ **Edit** a browser file, or you're on **Linux** | Use **Figma's official server** (named `figma`), which setup also added. The first time, your AI app asks you to log in to Figma (in Claude Code type `/mcp`). |
<details>
<summary><b>π How to set up a Figma token</b></summary>
1. In Figma: click your avatar β **Settings** β **Security** β **Personal access tokens** β **Generate new token**.
2. Give it read access to file content, comments and variables. Copy the token (it starts with `figd_`).
3. In Terminal (put your token in place of `figd_xxx`):
```bash
cd ~/figma-mcp-unified
FIGMA_PAT=figd_xxx node scripts/install.mjs --save-pat
```
The token is saved only on your computer, in a private file.
> [!NOTE]
> Figma limits how often a token can be used. On free plans and View/Collab seats that's only a few times a month, so use the desktop plugin when you can. It has no limits.
</details>
---
## π§― Something not working?
| Problem | Fix |
|---|---|
| AI says **"No plugin connected"** | Open your file in Figma Desktop β Plugins β Development β **Figma MCP Unified** and wait for **Connected**. |
| Plugin window says **Disconnected** | 1. Make sure your AI app is open. 2. Close the plugin and start it again. 3. Check it's **Figma MCP Unified**, not "Figma MCP Bridge". |
| Plugin isn't in the menu | Do step 3 of [setup](#-set-it-up-in-5-steps) again with `figma-mcp-unified/plugin/manifest.json`. |
| AI doesn't know about Figma | Restart the AI app. Still nothing? Run `npm run agents:install` in the folder and restart again. |
| It changed the wrong file | Say which file: *"in the file called X"*, or paste its link. |
| **"Rate limit"** message | That's the Figma token limit. Use the desktop plugin instead. |
| "Code context" needs a **Dev Mode seat** | That feature needs a Figma plan with Dev Mode. Ask for *"design context"* instead. That one works on every plan. |
| A font looks wrong | Missing fonts fall back to **Inter**. Install the font, or ask *"list available fonts"*. |
| Undo the AI's changes | <kbd>β</kbd> <kbd>Z</kbd> in Figma, or **File β Show version history**. |
| Remove this project | Run `npm run agents:uninstall` in the folder, then remove the plugin in Figma (*Plugins β Manage plugins*). |
> [!TIP]
> Still stuck? Ask your AI: *"Run figma_status and explain what's wrong."*
---
## π Safety
- π― The AI can only change files where **you** started the plugin.
- ποΈ Deleting layers needs an extra confirmation.
- π§ͺ Running custom code in Figma (`run_script`) stays **off** unless you turn it on.
- π Your Figma token never leaves your computer (`~/.figma-mcp-unified/config.json`, readable only by you).
- πΎ Every settings file is backed up before setup changes it.
---
## π§ For developers
<details>
<summary><b>Architecture</b></summary>
| Route | Read | Write | Browser files | Needs |
|---|:-:|:-:|:-:|---|
| Plugin bridge (`ws://localhost:1995`) | β
| β
| β until the plugin is published | Figma Desktop + plugin running |
| Figma REST API | β
| comments | β
| `FIGMA_PAT` |
| Figma Desktop Dev Mode MCP (`127.0.0.1:3845`) | β
code context | β | β | Seat with Dev Mode |
| Figma official remote MCP (`mcp.figma.com`) | β
| β
(`use_figma`, beta) | β
| Figma login |
Several AI apps can run at the same time: the first server becomes the leader that the plugin connects to, and the others route through it. Read tools fall back to the REST API automatically when the plugin isn't connected and a Figma URL is passed as `fileKey`.
</details>
<details>
<summary><b>All tools (150+)</b></summary>
- **Start** Β· `figma_status` `parse_figma_url` `list_files`
- **Read** Β· `get_document` `get_node` `get_nodes` `get_children` `get_selection` `get_metadata` `get_layout_tree` `get_design_context` `get_styles` `get_local_styles` `get_variable_defs` `get_local_variables` `search_nodes` `search_components` `search_styles` `search_variables` `get_prototype_connections` `trace_prototype_flow` `get_screenshot` `save_screenshots` `view_node`
- **REST** Β· `rest_get_file` `rest_get_nodes` `rest_export_images` `rest_get_components` `rest_get_styles` `rest_get_variables` `rest_get_comments` `rest_post_comment` `rest_get_versions` `rest_list_files`
- **Dev Mode MCP** Β· `get_code_context` `desktop_mcp_tools` `desktop_mcp_call`
- **Create** Β· `build_screen` `create_frame` `create_text` `create_shape` `create_ellipse` `create_line` `create_svg` `create_image` `create_section` `create_page` `create_component` `create_component_from_node` `combine_as_variants` `create_instance` `import_html_layers` `list_fonts` `list_components`
- **Edit** Β· `set_node_properties` `set_text_content` `set_text_properties` `set_text_style` `set_fills` `set_solid_fill` `set_gradient_fill` `set_strokes` `set_stroke_properties` `set_corner_radius` `set_effects` `set_auto_layout` `set_layout_align` `set_node_constraints` `set_size_limits` `set_clips_content` `resize_nodes` `move_nodes` `set_rotation` `reorder_node` `clone_nodes` `duplicate_nodes` `duplicate_with_offset` `group_nodes` `ungroup_node` `ungroup_nodes` `reparent_nodes` `move_to_page` `align_to_grid` `distribute_horizontally` `distribute_vertically` `place_below` `place_right_of` `fit_to_content` `swap_instance` `detach_instance` `delete_nodes` `run_script` (opt-in)
- **Design system** Β· `design_system_report` `lint_design` `audit_accessibility` `export_tokens` `import_tokens` `create_variable_collection` `create_variable` `set_variable` `unbind_variable` `set_variable_mode` `rename_variable` `delete_variables` `delete_variable_collection` `rename_variable_collection` `add_mode` `rename_mode` `delete_mode` `create_paint_style` `create_text_style` `apply_style` `apply_paint_style` `delete_style` `set_description` `generate_component_doc` `check_design_parity`
- **Pages & prototype** Β· `set_current_page` `rename_page` `duplicate_page` `delete_page` `set_reactions` `add_reaction` `remove_reaction` `set_flow_starting_point` + motion/keyframe tools (beta)
- **FigJam** Β· `create_sticky` `set_sticky` `create_connector` `set_connector` `create_shape_with_text` `set_shape_type` `set_section` `create_table` `set_table_cell` table row/column tools `create_code_block` `set_code_block` `create_link_preview`
AI apps also receive usage guidance as MCP server instructions; Claude Code and Hermes additionally get the skill in [`skills/figma-unified/SKILL.md`](skills/figma-unified/SKILL.md).
</details>
<details>
<summary><b>Setup options, manual config and settings</b></summary>
`node scripts/install.mjs` options: `--dry-run` Β· `--only cursor,claude-code` Β· `--uninstall` Β· `--no-official` Β· `--enable-run-script` Β· `--save-pat` (with `FIGMA_PAT` set) Β· `--node /path/to/node`
Manual config for any MCP app:
```json
{
"mcpServers": {
"figma-mcp-unified": {
"command": "node",
"args": ["/full/path/to/figma-mcp-unified/server/dist/index.js"]
}
}
}
```
| Setting | Default | What it does |
|---|---|---|
| `FIGMA_PAT` | β | Figma token for the REST route (or `--save-pat`) |
| `FIGMA_BRIDGE_PORT` | `1995` | Server β plugin port (if changed, rebuild the plugin with `VITE_FIGMA_BRIDGE_WS` and update `plugin/manifest.json`) |
| `FIGMA_BRIDGE_HOST` | `127.0.0.1` | `0.0.0.0` only if the plugin runs on another computer on a trusted network |
| `FIGMA_DESKTOP_MCP_URL` | `http://127.0.0.1:3845/mcp` | Figma Desktop's Dev Mode MCP server |
| `FIGMA_BRIDGE_ENABLE_RUN_SCRIPT` | off | `1` turns on `run_script` |
</details>
<details>
<summary><b>Build and test</b></summary>
```bash
npm run deps # install dependencies (server + plugin)
npm run build # build server and plugin
npm run typecheck # type-check the plugin
npm run smoke # start the server, list tools, call figma_status
```
```text
server/src/
tools.ts base tools (gethopp)
unified-tools.ts status, REST, Dev Mode, build_screen, design-system tools
backends/ REST API + Dev Mode MCP clients
magic-spells/ ported magic-spells tools
tokens.ts token export formats
plugin/src/main/
code.ts plugin core
unified.ts screen builder, lint, accessibility, tokens
magic-spells/ ported plugin handlers
scripts/ installer, smoke test
skills/ AI agent skill
```
</details>
---
<div align="center">
**Built on** [gethopp/figma-mcp-bridge](https://github.com/gethopp/figma-mcp-bridge) Β· [magic-spells/figma-mcp-bridge](https://github.com/magic-spells/figma-mcp-bridge) Β· html-figma by Sergei Savelev. All MIT, see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
MIT Β© Soumen-Developer
</div>
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues