Figma Bridge
Connects an AI agent to the Figma file currently open in the Figma desktop app via a development plugin. Provides tools to create frames, write text, apply styles, import images and SVGs, take screenshots of nodes, inspect file/page/selection context, list fonts, and run arbitrary Figma Plugin API JavaScript, all without API rate limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Figma Bridgecreate a hero frame, add a headline, and screenshot it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Figma Bridge
Let Claude Code design directly in the Figma desktop app, with no rate limits.
Figma Bridge connects an AI agent (Claude Code, or any MCP client) to the Figma file you have open. The agent can create frames, write text, apply styles, import images and SVGs, take screenshots to check its own work, and run any Figma Plugin API code, as many times as it needs.
Everything runs on your machine. Commands go through a small Figma development plugin, not through Figma's web API, so there are no API quotas, no tokens, and no rate limits.
Contents
Related MCP server: Writable Figma MCP Bridge
How it works
┌─────────────┐ stdio ┌──────────────────────┐ WebSocket ┌──────────────┐ postMessage ┌─────────────┐
│ Claude Code │ ───────▶ │ Figma Bridge server │ ──────────────────▶ │ Plugin UI │ ────────────▶ │ Figma │
│ (MCP client)│ ◀─────── │ (Bun, src/server.ts) │ ◀── localhost:3055 ─│ (ui.html) │ ◀──────────── │ (code.js) │
└─────────────┘ └──────────────────────┘ └──────────────┘ └─────────────┘There are three pieces, all in this repo:
The MCP server (
src/server.ts). Claude Code starts it automatically (you register it once). It gives the AI 8 tools (see below).The WebSocket bridge (
src/bridge.ts). It runs inside the MCP server process, onlocalhost:3055. You never start it by hand.The Figma plugin (
plugin/). You open it in your Figma file. Its small window keeps the connection alive and passes each command to Figma, which runs it with the full Plugin API.
The plugin connects on its own as soon as it opens, and reconnects on its own if the server restarts (for example when you restart Claude Code). There is no channel name to type and no socket to launch.
Requirements
What | Why | How to get it |
Windows 10/11 | Tested there. It should also work on macOS and Linux. | — |
Runs the server (TypeScript, no build step). | In PowerShell: | |
Figma desktop app | Development plugins only run in the desktop app, not in the browser. | |
Claude Code | The AI agent (CLI, desktop app or IDE extension). Any MCP client works. |
You also need edit access to the Figma file you want the AI to work on.
Installation
This takes about 2 minutes, and you only do it once.
1. Download
Get figma-bridge-vX.Y.Z.zip from the latest release
and unzip it wherever you want to keep it, for example C:\Users\<you>\figma-bridge.
Tip: avoid a OneDrive or Dropbox folder. Syncing
node_modulesis slow and can lock files during install.
Or clone the repo: git clone https://github.com/Clovis500c/figma-bridge.git
2. Install and register the server
Open a terminal in the unzipped folder and run:
bun installbun run setupbun installdownloads the dependencies (only@modelcontextprotocol/sdkandzod) and builds the plugin.bun run setupregisters the MCP serverFigmaBridgein Claude Code for all your projects, with the correct paths for your machine. If theclaudecommand is available it usesclaude mcp add-json. Otherwise it adds the entry to~/.claude.jsonand saves a backup as~/.claude.json.bak-figma-bridge. At the end it prints the exact path of the plugin manifest for the next step.
Add this to the .mcp.json of a project, or to mcpServers in ~/.claude.json for all projects. Replace the paths
with yours:
{
"mcpServers": {
"FigmaBridge": {
"type": "stdio",
"command": "C:\\Users\\<you>\\.bun\\bin\\bun.exe",
"args": ["run", "C:\\Users\\<you>\\figma-bridge\\src\\server.ts"]
}
}
}3. Import the plugin into Figma
In the Figma desktop app, open any design file, then:
Menu → Plugins → Development → Import plugin from manifest… → select plugin\manifest.json in the folder.
Figma remembers it. You won't need to do this again.
4. Restart Claude Code
Claude Code only loads new MCP servers at startup. After restarting, you can check it's there with /mcp.
5. Open the plugin and test
In your Figma file: Plugins → Development → Figma Bridge. The status dot turns green ("Connected to your AI") and Figma shows a small notification.
To check everything end to end:
bun run testThe test waits for the plugin, then runs a script, takes screenshots, places an image, imports an SVG, reads the context and lists fonts. It then deletes everything it created, so your file ends up exactly as it was.
Daily use
Open your Figma file.
Open the plugin: Ctrl+Alt+P (re-runs the last plugin), or the Figma Bridge button in the right-hand panel when nothing is selected (the plugin adds this button on first launch).
Ask Claude for something, for example:
"Design a pricing page with 3 plans on a new page in Figma."
"Look at my selection and make a dark-mode version next to it."
"Rename every layer in the selected frame based on its content."
"Place C:\photos\hero.jpg as the background of frame 'Hero'."
The plugin window shows what's happening:
The bridge: Claude Code on the left, your Figma file (and current page) on the right. When connected, the line between them is solid. Each command travels along it as a dot, and comes back green (success) or red (error). When it isn't connected, the line is dashed and a short checklist explains what to do.
Stats: commands run, errors, and average time with a small bar chart of recent durations.
Activity: every command with an icon for its type (script, screenshot, image, SVG…), how long it took (slow ones in orange), and an All / Errors filter.
Click a row to see details: full error message, duration, time, and the layer it touched.
Show in canvas selects the layer the command created and zooms to it, switching page if needed.
Copy error / Copy command copy text to the clipboard.
Settings (sliders icon): channel, window size reset, session info.
Resize the window by dragging the grip in the bottom-right corner. The size is remembered for next time (Settings → Reset window size restores the default).
The — button collapses the plugin into a thin bar so it stays out of the way. The plugin keeps working while collapsed, but not when closed: closing it disconnects the file.
What the AI can do (tools)
The tool set is small on purpose. run_script can do anything the Figma Plugin API can do. The other tools cover what
a script can't do by itself: reading files from your disk, downloading URLs, and saving images.
Tool | What it does |
| The main tool. Runs JavaScript inside Figma with the full Plugin API ( |
| Exports a node (by default the current selection) as PNG or JPG. The image is saved to a temp folder and the tool returns |
| Loads a PNG, JPG, WEBP or GIF from your disk or the web. It either sets it as the image fill of an existing node, or creates a new rectangle for it (native size, centred in view by default). WEBP files and images larger than 4096 px, Figma's limit, are converted automatically. |
| Turns an SVG into editable Figma vectors. |
| File name, pages, current page, selection (ids, names, types, positions and sizes) and viewport. The AI usually calls this first. |
| Fonts available in Figma, grouped by family with their styles. |
| Which Figma files currently have the plugin open, and the bridge status. |
| Chooses which file to work on when several are connected (by file name or part of it). |
The server also gives the AI short usage instructions: batch many changes into one script, load fonts before editing text, check the result with a screenshot. You don't need to explain any of this yourself.
Writing scripts
You normally never write scripts: the AI does. This section is for reference or for writing your own.
A script is the body of an async function that receives figma, console and utils:
// Create a card with auto-layout and a title
await utils.loadFonts("Inter:Bold", "Inter:Regular");
const card = figma.createFrame();
card.name = "Card";
card.layoutMode = "VERTICAL";
card.itemSpacing = 8;
card.paddingLeft = card.paddingRight = card.paddingTop = card.paddingBottom = 24;
card.cornerRadius = 16;
card.fills = utils.solid("#1E1E2E");
const title = figma.createText();
title.fontName = { family: "Inter", style: "Bold" };
title.characters = "Hello from Claude";
title.fontSize = 24;
title.fills = utils.solid("#FFFFFF");
card.appendChild(title);
figma.viewport.scrollAndZoomIntoView([card]);
console.log("created card", card.id); // shows up in `logs`
return { id: card.id }; // the tool's resultHelpers (utils)
Helper | What it does |
| Loads fonts before you edit text. Accepts |
| Gets a node by id (on any page). |
| Switches to a page by name or id and returns it. |
| Returns a solid fill ( |
| Converts a hex colour to Figma's |
Good to know
Return values are converted to JSON. Figma nodes become
{ id, name, type }. Keep results small: return ids, not whole trees.Fonts must be loaded before you change
characters,fontSize,fontNameand similar text properties.Pages load on demand (Figma's
dynamic-pagemode). Useawait figma.getNodeByIdAsync(id)andawait figma.setCurrentPageAsync(page), not the old synchronous versions.figma.skipInvisibleInstanceChildrenis on, which makesfindAllmuch faster on big files.Timeouts stop waiting for the result, but can't interrupt a synchronous infinite loop. See Troubleshooting.
Several Figma files or Claude windows
Several Figma files: open the plugin in each file you want the AI to reach. With one file connected, the AI uses it automatically. With several, it calls
list_sessionsand thenselect_session("file name"). If the file is reopened later, the choice is kept.Several Claude Code windows: the first one to start opens port 3055, and the others connect through it. If that first window closes, another takes over the port within a fraction of a second, and the plugin reconnects on its own.
Troubleshooting
What you see | What it means / what to do |
Plugin says "Waiting for Claude Code" | The MCP server isn't running. Open (or restart) Claude Code, and check with |
Plugin says "Port 3055 is busy" | Another program is using port 3055, often an old TalkToFigma socket ( |
The AI says "No Figma file is connected" | The plugin isn't open in any file. Open it (Ctrl+Alt+P). |
The AI says "Several Figma files are connected" | Expected with several files open: it should call |
| Restart Claude Code after |
Figma froze after a script | A script got stuck in a synchronous loop, which nothing can interrupt. Close the plugin (or Figma), then reopen it. |
Text edits fail with a font error | The font isn't installed or wasn't loaded. Ask the AI to use |
Logs: every command is logged in %TEMP%\figma-bridge\bridge.log. Screenshots are saved in the same folder,
%TEMP%\figma-bridge\.
Configuration
These are optional environment variables for the MCP server. Set them in the env block of the MCP config.
Variable | Default | Purpose |
|
| Isolates several agents from each other. If you change it, set the same channel in the plugin's settings (gear icon). |
|
| WebSocket port. Figma only lets the plugin reach |
|
| Where screenshots and the log file go. |
Security
The server listens on
127.0.0.1only. Other machines on your network can't reach it.Web pages can't control your Figma. Browsers always send an
Originheader, so a website trying to open a WebSocket to the port is refused as a command sender. Only local programs (like the MCP server) can send commands.The plugin can't reach the internet: its manifest allows no domains except
localhost:3055.run_scriptruns arbitrary code in your Figma file, which is the point. Only connect agents you trust, and keep normal Figma version history in mind (File → Show version history) if you want to roll back.
Development
src/server.ts MCP server (stdio) and the 8 tools
src/bridge.ts WebSocket hub: sessions, request routing, large-message chunking, port takeover
src/image.ts reads image format and size from file headers (no dependencies)
plugin/code.ts plugin main thread, compiled to plugin/code.js
plugin/ui.html plugin window: WebSocket, reconnection, image conversion, activity log
plugin/manifest.json
scripts/setup.ts registers the MCP server in Claude Code (bun run setup)
test/selftest.ts end-to-end test (bun run test)Command | What it does |
| Compiles |
| Strict TypeScript check of the server and the plugin. |
| End-to-end test against a real Figma file (the plugin must be open). |
| Starts the MCP server by hand (normally Claude Code does it). |
After changing plugin/code.ts, run bun run build, then close and reopen the plugin in Figma.
Changes to ui.html only need the plugin to be reopened.
Protocol notes: messages are JSON. Messages over 1 MB are split into chunks and reassembled on the other side
(up to 256 MB). Binary data (images, exports) travels as base64 between the server and the plugin only; the AI never
receives base64 unless it asks for returnImage. The plugin code sticks to ES2017 syntax, because Figma's plugin
sandbox parser is conservative.
FAQ
Does this use my Figma API quota or need a Figma token? No. It only uses the Plugin API inside the desktop app, the same way any plugin you install does.
Is this the same as Figma's official MCP server? No. The official server mainly reads designs for code generation, and it has usage limits. Figma Bridge gives the AI full write access to your open file through a plugin, with no limits.
Does it work in the browser version of Figma?
No. Development plugins that connect to localhost only run in the desktop app.
Can I use it with something other than Claude Code? Yes. Any MCP client that can start a stdio server works (Cursor, Windsurf, Claude Desktop, and others). Use the same command and args as in the manual config.
Do I need to keep the plugin window visible? No. Collapse it with —. Just don't close it.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Connect AI agents to Flato's editable canvas runtime through a hosted MCP server.
Related MCP Servers
- AlicenseBqualityBmaintenanceLocal MCP server connecting AI clients to the Figma desktop app for inspecting and editing Figma documents via the Plugin API.1652 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI clients to read and modify the user's currently open Figma file by executing JavaScript in Figma's sandbox, all through a local bridge with status monitoring, node jumping, and automatic rollback on errors.1MIT
- AlicenseAqualityBmaintenanceEnables coding agents to interact with the currently open Figma file via local MCP tools, including reading the design, extracting nodes as PNG, React, HTML or CSS, editing the canvas when permitted, and sharing saved component sets.3945 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to read and modify the currently open Figma design file through a paired local Figma plugin, supporting operations like creating nodes, editing properties, and exporting PNG/SVG.174 npm1MIT