Figma MCP Bridge
Allows AI agents to inspect connected Figma files and edit them through the Figma Plugin API: list connected files, run JavaScript in a file with figma and console access, and export nodes as PNG.
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 MCP Bridge check which Figma files are connected, then export the main frame as PNG"
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 MCP Bridge
An MCP server that lets AI agents (Claude Code, OpenCode, any MCP client) edit Figma files through the Figma Plugin API, the same API Figma's own use_figma tool runs scripts against. A development plugin runs in the open file in the Figma desktop app and talks to the server over a localhost WebSocket, so there is no MCP call quota: the only limits are Figma's own.
How it works
agent ──stdio──> figma-mcp-bridge ──ws://localhost:38547──> plugin UI ──postMessage──> plugin sandbox (Plugin API)Every agent session starts its own server process. The first one binds the port and becomes the hub that plugins connect to; the others connect to it, and one takes over when it exits. Each Figma file you want edited runs its own copy of the plugin.
Related MCP server: Figma Local MCP
Tools
Tool | What it does |
| Lists connected files and the session id of each. |
| Runs JavaScript in a connected file: the body of an async function with |
| Renders a node to PNG and returns the image. |
Each running plugin window executes one command at a time; a second one fails as busy until the first finishes, even when its caller stopped waiting. The bridge closes an undo step when a run returns or throws, so a run's edits undo together unless the script commits undo steps itself; an error does not roll them back. None of this is a file-wide transaction.
Scripts run with dynamic page loading, so use figma.getNodeByIdAsync, figma.setCurrentPageAsync and page.loadAsync() before reading another page, and figma.loadFontAsync before editing text.
Setup
Requires macOS or Linux (the token file relies on POSIX permissions), Node 20 or later, pnpm and the Figma desktop app (development plugins cannot be imported in the browser).
pnpm install
pnpm buildAdd the server to your agent, for example Claude Code:
claude mcp add --scope user figma-bridge -- node /absolute/path/to/figma-mcp-bridge/dist/cli.jsThe first start creates the token file
~/.figma-mcp-bridge/token(mode 0600).In the Figma desktop app: Plugins › Development › Import plugin from manifest… and pick
plugin/manifest.json.Open the file to edit and run Plugins › Development › Figma MCP Bridge. Paste the token from
~/.figma-mcp-bridge/tokenonce; the plugin keeps it. Leave the plugin window open (you can collapse it) while agents work in the file.
Security
The server listens on the loopback addresses only.
Both ends of every connection prove they know the token with an HMAC challenge-response; the token itself never crosses the socket. The plugin and other sessions relay nothing, and the plugin does not even name its file, until the server on the port has proved itself, so a different program that takes the port first learns nothing and cannot send the plugin commands. The server holds the port on both loopback addresses
localhostresolves to (127.0.0.1 and ::1), and refuses to start if another program holds either, so nothing can sit on the second address between the plugin and the server. Connections from web page origins are refused before the handshake.The token file and its folder must belong to you and be private (modes 0600 and 0700); the server refuses to start otherwise, because a token other accounts could read may already be exposed. Access control lists that grant other accounts access are refused too. To get a new token, stop every agent session that runs the bridge (each keeps the token it read), delete
~/.figma-mcp-bridge, and paste the new token into the plugin.figma_run_scriptruns arbitrary code with full access to the open file and to the plugin's own storage, which holds the token. Anything that can talk to your agent can change or delete the file's content, and choosing a session selects a file but does not limit what a script can do. Figma's version history is the undo of last resort.Layer names and text in a file are input to your agent. Treat files from others as untrusted.
The bridge assumes one person uses the computer. Any program under your own account can read the token file, and on a Mac shared by several user accounts, a program under another account that takes the port before an agent session starts could relay the plugin's connection and read or alter what passes through it. Messages after the handshake are not signed or encrypted.
Limits that remain
These come from Figma, not from the bridge:
The plugin must be running in each file, in the desktop app.
A long synchronous script blocks the Figma editor until it finishes. The server stops waiting after the timeout you pass, but Figma cannot interrupt the script.
A single message is capped at 100 MiB (the
wslibrary's default), so a very large export fails with an error; export at a smaller scale.Plan limits still apply through the Plugin API, for example the Starter plan's 3 pages per file and single variable mode per collection.
Development
pnpm typecheck
pnpm test
pnpm format:checkThe port 38547 and the message cap appear in src/protocol.ts, plugin/manifest.json and plugin/ui.html; a test checks they agree. The plugin sandbox has no crypto API, so plugin/src/hmac.ts implements HMAC-SHA256, and a test checks it against node:crypto.
License
MIT
Available Tools
3 toolsfigma_export_pngA
Render a node of a connected Figma file to PNG and return the image, to look at what a script made.
Inputs: scale (required), nodeId (required), timeoutSeconds (required), session.
figma_run_scriptA
Run JavaScript against the Figma Plugin API in a connected file. code is the body of an async function with figma and console in scope; await works and return sends a value back. The returned value is serialized as JSON: an object with a string id, a string type and a boolean removed (a node) becomes { id, name, type }, a Uint8Array becomes a base64 string, a bigint a decimal string, and a circular reference "[circular]". console.log lines come back as logs. The plugin uses dynamic page loading: use figma.getNodeByIdAsync, figma.setCurrentPageAsync and page.loadAsync() before reading another page, and figma.loadFontAsync before editing text. Each plugin window runs one command at a time; a second one fails as busy until the first finishes, even when its caller stopped waiting. The bridge closes an undo step when a run returns or throws, so its edits undo together unless the script commits undo itself; an error does not roll them back.
Inputs: code (required), timeoutSeconds (required), session.
figma_statusA
List the Figma files connected through the Figma MCP Bridge plugin, with the session to pass to the other tools. A file connects when the plugin runs in it (Plugins › Development › Figma MCP Bridge in the Figma desktop app).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools split cleanly along lifecycle lines: discover/connect (figma_status), mutate/inspect via code (figma_run_script), and visually verify (figma_export_png). The only theoretical overlap is that a script could return binary data, but export_png exists specifically to return renderable images, so an agent won't misselect.
All tools share a consistent `figma_` namespace prefix followed by snake_case, which is predictable and readable. The minor deviation is that `figma_status` uses a noun rather than a verb like `run`/`export`, but it still reads naturally as a state-query tool.
Three tools is thin, but the design is deliberate: one escape-hatch executor over the full Figma Plugin API plus a discovery endpoint and a render endpoint covers essentially unlimited operations. A slightly larger surface (e.g. session teardown or file metadata) would round it out.
Because figma_run_script exposes the entire Plugin API, almost any read/write operation is reachable, and status + PNG export close the discovery and verification loops. Gaps are minor: no explicit cancel/busy-status tool despite the documented 'busy' failure mode, and no dedicated way to inspect a file's structure without writing JS.
Maintenance
Related MCP Connectors
The Figma MCP server brings Figma design context directly into your AI workflow.
Design canvas for agents: create, edit, render and export Figma-shaped designs over MCP.
Keeps Figma in sync with your Storybook and sends designers' changes to your coding agent.
Figma + Claude Code on your real app: screens, comments, tasks and drop-off for your coding agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceFigma MCP server that lets agents execute arbitrary JavaScript inside a running Figma desktop app via a local development plugin, enabling real-time document inspection and manipulation while avoiding REST API rate limits.3MIT
- AlicenseAqualityCmaintenanceEnables an agent to read, edit, and build Figma designs from scratch — including style guides, variables, components, and screens — through a local plugin bridge to the open file's Plugin API, with no Figma token or REST API calls.211MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, create, edit, and organize Figma documents directly through a local plugin bridge, without needing a Figma AI subscription.3Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI coding agents to read and edit the file currently open in Figma Desktop through a local development plugin, supporting node inspection, JSON/image exports, and arbitrary Plugin API scripts without REST API rate limits.79 npmMIT