figma-console-mcp
v0.6.7The most comprehensive MCP server for Figma — design tokens, variables, components, write tools, version history diff, accessibility audits, FigJam, Slides…
An MCP server that connects AI agents to Figma Desktop: read and write variables and design tokens, components and their properties, nodes, styles, comments, annotations, FigJam boards and Slides decks; diff file versions; audit design-code parity and accessibility; and run Plugin API code — 112 tools in all. It runs on your machine (Local Mode) and talks to Figma through the bundled Desktop Bridge plugin. Upstream's Cloud Mode (Cloudflare Workers, remote SSE, OAuth) is not part of this fork — see Relationship to upstream.
Summary extracted from the README.
@muloka/figma-console-mcp
An independently maintained fork of southleft/figma-console-mcp.
An MCP server that connects AI agents to Figma Desktop: read and write variables and design tokens, components and their properties, nodes, styles, comments, annotations, FigJam boards and Slides decks; diff file versions; audit design-code parity and accessibility; and run Plugin API code — 112 tools in all.
It runs on your machine (Local Mode) and talks to Figma through the bundled Desktop Bridge plugin. Upstream's Cloud Mode (Cloudflare Workers, remote SSE, OAuth) is not part of this fork — see Relationship to upstream.
Install with npx @muloka/figma-console-mcp. npx figma-console-mcp installs upstream instead. This fork is versioned independently on a 0.x line.
Setup
You need Node.js 22+, Figma Desktop (not just the web app), and an MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, …).
1. Create a Figma personal access token
In Figma, create a personal access token with these scopes: File content (read), File versions (read), Variables (read; Enterprise plans only, so skip it on other plans: the server reads variables through the Desktop Bridge on every plan), Comments (read and write). Copy it — it starts with figd_.
2. Add the server to your MCP client
Claude Code:
claude mcp add figma-console -s user -e FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN -- npx -y @muloka/figma-console-mcp@latest
Claude Desktop, Cursor, Windsurf (JSON config):
{
"mcpServers": {
"figma-console": {
"command": "npx",
"args": ["-y", "@muloka/figma-console-mcp@latest"],
"env": { "FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN" }
}
}
}
| App | macOS | Windows |
|---|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
%APPDATA%\Claude\claude_desktop_config.json |
| Cursor | ~/.cursor/mcp.json |
%USERPROFILE%\.cursor\mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
%USERPROFILE%\.codeium\windsurf\mcp_config.json |
Restart the client afterwards.
3. Import the plugin
The plugin is called Toko Relay in Figma's menus. The server keeps it in its own folder, ~/.figma-console-mcp/toko-relay/, and refreshes the files on every start. To print the exact path of its manifest.json:
npx @muloka/figma-console-mcp --print-path
In Figma Desktop, open a file, then Plugins → Development → Import plugin from manifest… and pick that manifest.json. On macOS the folder is hidden, so the file dialog won't show it: press Cmd+Shift+G in the dialog and paste the path.
Run it from Plugins → Development → Toko Relay in each file you want the agent to work in. It scans ports 9223–9232 and connects to your running server on its own. Ask your agent to "check Figma status" (figma_get_status) to confirm the connection.
Already using Figma Desktop Bridge? From 0.6.6 the plugin has its own name and plugin ID, so Figma treats it as a new plugin rather than an update. Import the new folder's manifest.json as above, not the old ~/.figma-console-mcp/plugin/ one, then remove the old entry: Plugins → Development → Manage plugins in development. Until you switch, the old plugin keeps working and shows an update notice.
When to re-import the plugin
Figma caches plugin files (code.js, ui.html) and keeps using its cached copy until you re-import the manifest, even though the server refreshes the files on disk.
- Re-import when a release says
figma-desktop-bridge/changed. Otherwise the new server stays compatible with the plugin you have. - The server tells you when a re-import is needed (from 0.6.1).
- The plugin's
PLUGIN_VERSIONtracks the upstream lineage it was vendored from (currently 1.35.0), so it never changes for this fork's own plugin edits. - The plugin therefore also reports a fork revision. When yours is older than the one the server ships,
figma_get_statusandfigma_diagnosereportpluginUpdateAvailable, and the plugin window shows Plugin update available. - Plugins imported before 0.6.1 don't report a revision, so they're flagged once; re-importing clears it.
- The plugin's
- To re-import: Plugins → Development → Import plugin from manifest…, then choose the same
manifest.jsonagain.
Configuration
| Variable | Default | What it does |
|---|---|---|
FIGMA_ACCESS_TOKEN |
— | Personal access token for Figma REST calls (file data, versions, comments, images). |
MCP_HTTP_PORT |
off | Also serve MCP over Streamable HTTP at http://localhost:<port>/mcp — see below. |
FIGMA_WS_PORT |
9223 |
Preferred Desktop Bridge WebSocket port. If it's taken (another instance), the server tries the next ports in a 10-port range. |
FIGMA_WS_HOST |
localhost |
Interface the WebSocket server binds. |
ENABLE_MCP_APPS |
off | true registers the two MCP Apps. |
LOG_LEVEL |
info |
Server log level (logs go to stderr). |
Sharing one server between clients (MCP_HTTP_PORT)
stdio only serves the client that started the server. Set MCP_HTTP_PORT and the same process also serves MCP over Streamable HTTP, so several local clients can share one Desktop Bridge connection. Start the server with the variable set, either from a terminal or by adding MCP_HTTP_PORT to the env of the client that launches it:
MCP_HTTP_PORT=3333 FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN npx -y @muloka/figma-console-mcp@latest
Then point other clients at the URL:
claude mcp add --transport http figma-console http://localhost:3333/mcp
- Both MCP protocol eras on one URL. 2025-era clients (an
initializehandshake, then one POST per request; the endpoint is stateless and issues no session id) and 2026-07-28 clients (noinitialize, a per-request_metaenvelope) both work at/mcp. stdio serves both eras too. - Loopback only. It binds
127.0.0.1. Every request must name an exact loopbackHost(localhost:<port>,127.0.0.1:<port>or[::1]:<port>) and carry either noOrigin(non-browser clients) or anhttp:/https:loopback one, so web pages can't reach it through DNS rebinding. Anything else gets a 403, whichever protocol era the request uses. - Discoverable. The port is published as
mcpHttpPortin the instance's port-discovery file and onGET /. - Outlives its stdio client. When the client that spawned the server closes stdin, HTTP keeps serving. A server started without
MCP_HTTP_PORTshuts down when stdin closes.
Upstream later added its own, separate HTTP endpoint under FIGMA_MCP_HTTP_PORT (advertised as mcpHttpUrl); this fork's MCP_HTTP_PORT / mcpHttpPort are unchanged.
Working in several files at once
fileKeyon every write tool. All 31 write tools —figma_execute, the variable/collection/mode tools, node manipulation, component creation and instantiation, and the design lint/audit tools — take an optionalfileKey. With it, the call runs only in that file, whatever file is active, so several agents can work in different files at the same time. If that file isn't connected, the call is refused, naming the file and listing the connected ones, rather than landing in the active file. WithoutfileKey, nothing changes. Details:docs/tools.md.- Verifiable targeting.
figma_executeresults carryfileContext({ fileName, fileKey }of the file the code ran in) andresultAnalysis. They need the Desktop Bridge plugin re-imported from v0.5.4 or later; a missingfileContextmeans the targeting is unverified. - Target pins.
figma_navigatewithlock: truepins the active file. A pinned file that disconnects keeps its pin, so untargeted commands are refused instead of silently going to another file, while explicitfileKeycalls still reach the other connected files.
Tools
| Area | Tools |
|---|---|
| Status, files & navigation | figma_get_status, figma_diagnose, figma_list_open_files, figma_navigate, figma_reconnect, figma_get_selection, figma_get_design_changes |
| Plugin console & screenshots | figma_get_console_logs, figma_watch_console, figma_clear_console, figma_reload_plugin, figma_take_screenshot, figma_capture_screenshot |
| Run Plugin API code | figma_execute |
| Variables & design tokens | figma_get_variables, figma_get_token_values, figma_create_variable(_collection), figma_update_variable, figma_rename_variable, figma_delete_variable(_collection), figma_add_mode, figma_rename_mode, figma_batch_create_variables, figma_batch_update_variables, figma_setup_design_tokens, figma_export_tokens, figma_import_tokens |
| Components | figma_search_components, figma_get_component(_details/_image), figma_get_component_for_development(_deep), figma_analyze_component_set, figma_instantiate_component, figma_set_instance_properties, figma_add/edit/delete_component_property, figma_create_component_set, figma_arrange_component_set, figma_set_description |
| Nodes | figma_create_child, figma_clone_node, figma_delete_node, figma_rename_node, figma_move_node, figma_resize_node, figma_set_fills, figma_set_image_fill, figma_set_strokes, figma_set_text |
| Slots | figma_create_slot, figma_get_slots, figma_append_to_slot, figma_reset_slot, figma_add_slot_property |
| Design system & libraries | figma_get_design_system_summary, figma_get_design_system_kit, figma_get_styles, figma_get_file_data, figma_get_file_for_plugin, figma_get_library_components, figma_get_library_component_by_key, figma_get_library_variables, figma_import_library_variable |
| Parity, docs & accessibility | figma_check_design_parity, figma_generate_component_doc, figma_lint_design, figma_audit_component_accessibility, figma_scan_code_accessibility |
| Version history | figma_get_file_versions, figma_get_file_at_version, figma_diff_versions, figma_get_changes_since_version, figma_generate_changelog, figma_blame_node |
| Comments & annotations | figma_get_comments, figma_post_comment, figma_delete_comment, figma_get_annotations, figma_set_annotations, figma_get_annotation_categories |
| FigJam | figjam_create_sticky, figjam_create_stickies, figjam_create_connector, figjam_create_shape_with_text, figjam_create_section, figjam_create_table, figjam_create_code_block, figjam_auto_arrange, figjam_get_board_contents, figjam_get_connections |
| Slides | figma_list_slides, figma_get_slide_content, figma_get_slide_grid, figma_create_slide, figma_delete_slide, figma_duplicate_slide, figma_reorder_slides, figma_focus_slide, figma_get_focused_slide, figma_skip_slide, figma_add_text_to_slide, figma_add_shape_to_slide, figma_set_slide_background, figma_get/set_slide_transition, figma_get_text_styles, figma_set_slides_view_mode |
Every tool's input schema is a plain type: "object" with no top-level anyOf/oneOf/allOf/$ref, and contains no propertyNames, tuples or untyped (z.any()) nodes, so it is accepted by Claude and by Gemini-based clients alike. JSON replies are tagged with _mcp: "figma-console-mcp" and errors a tool throws are prefixed [figma-console-mcp], so an agent running several Figma MCP servers can tell which one answered. (Plain-text replies, and the SDK's own errors for invalid arguments or an unknown tool, carry no tag.)
Full reference: docs/tools.md.
MCP Apps (optional)
With ENABLE_MCP_APPS=true, hosts that support MCP Apps can render two interactive views: a Token Browser (figma_browse_tokens) and a Design System Dashboard (figma_audit_design_system).
What this fork changes
- MCP SDK v2 and Zod 4 (0.6.0) — built on
@modelcontextprotocol/serverv2, serving both the 2025-era protocol and 2026-07-28 on stdio and onMCP_HTTP_PORT. Tool schemas stay Gemini-clean on Zod 4: thepropertyNameskeyword Zod 4 emits for string-keyed records (which Gemini rejects with a 400) is stripped. Upstream's Cloud Mode was removed along with its Cloudflare dependencies. - Fresh variable reads (0.6.1) — every variable read that isn't served from the server's 5-minute cache reads the file live through the plugin. This covers
figma_get_variables, token export and import, the design-system summary and kit,figma_get_token_values, component docs, and the MCP Apps.- Reads right after a write are current, keep
codeSyntax, and read the file that was asked for. Previously, a plain read returned the variables as they were when the plugin connected. - Edits made in Figma show up once they clear the server's cache, which happens on node and style changes and after at most 5 minutes.
- Aliased tokens in the design-system summary and
figma_get_token_valuesreport their resolved value andaliasOf. An alias to a library variable reportsvalue: null.
- Reads right after a write are current, keep
- Create-variable rollback (0.6.1) — when
figma_create_variablefails after creating the variable (a bad mode id, value or scope), the plugin removes it again, and the error says so. - Stale-plugin detection (0.6.1) — the plugin reports a fork revision alongside its upstream
PLUGIN_VERSION, so the server flags a plugin that predates this fork's latest plugin changes (see When to re-import the plugin). - Tool annotations (0.6.2) — every tool declares MCP
readOnlyHint,destructiveHint,idempotentHintandopenWorldHint, so a client can tell a read likefigma_get_statusfrom a write or a delete. Deletes, arbitrary code (figma_execute) and tools that write local files are destructive; since 0.6.3 so are updates (see below). The classification started from upstream's, trimmed to this fork's tools. - Stdio result cap (0.6.2) — on stdio, a tool result above 8 MB comes back as an error saying it was withheld, that any changes made in Figma still happened, and how to ask for less. Without it, a client such as Claude Code drops the whole stdio connection on an oversized message. Results over
MCP_HTTP_PORTare not capped. - Real errors from
figma_get_variables(0.6.2) — when every read method fails, the error names each method with its own message, for example the plugin's "File … is not connected to the Desktop Bridge … Connected files: …", and lists them in acausesobject. It used to say only "All methods failed". The failure is always returned as an error, whatever text the causes contain. - Alias objects (0.6.3) —
figma_update_variable,figma_create_variable,figma_batch_create_variables,figma_batch_update_variablesandfigma_setup_design_tokensaccept Figma's own alias form,{ "type": "VARIABLE_ALIAS", "id": "VariableID:…" }, wherever they take a value. It's the recommended way to alias, and the only onefigma_create_variablesupports. In the other four tools aVariableID:string still aliases today; from 0.7.0, aVariableID:string on a STRING variable will be stored as literal text. - Hints clients can act on (0.6.3):
- The 22 tools that overwrite values (updates, renames, sets, moves, resizes) are
destructiveHint: true, a deliberate difference from upstream. The MCP spec definesdestructiveHint: falseas "only additive updates", and Codex's defaultautoapproval mode runs tools that are neither destructive nor open-world without asking. Codex users inautomode are now asked before these tools run. - Four tools no longer claim
idempotentHint, because repeating the same call changes the file again or loses data:figma_set_annotations(mode: "append"),figma_arrange_component_set,figjam_auto_arrange(a node id listed twice) andfigma_get_design_changes(clear: true). Clients such as Claude Code won't retry these automatically after a dropped connection.
- The 22 tools that overwrite values (updates, renames, sets, moves, resizes) are
- Safe concurrent reads (0.6.3) — clients such as Claude Code run read-only tools in parallel. Concurrent variable reads of one file now share a single plugin read, and a read that a write overtakes is returned but never cached, so a later read can't pick up pre-write data.
figma_import_tokensandfigma_import_library_variablenow clear the variable cache after writing, like the other variable writes.figma_executeclears it after every run, failed or not, because a script can change variables without Figma reporting it. The next design-system summary or component search then rebuilds too. - Exit when stdin closes (0.6.3) — a server without
MCP_HTTP_PORTshuts down when its client closes stdin: it stops the bridge, removes its port file and exits 0, instead of running on and holding its port. WithMCP_HTTP_PORTserving, it keeps running, as before. - Library variable tools (0.6.3) —
figma_get_library_variableslists the file's subscribed library collections; it used to return none.figma_import_library_variablereports a failed import as an error, and on success returns the imported variable with its id. - Per-file caching (0.6.4) — an edit or a plugin disconnect in one file clears only that file's cached variables and design-system data, and ends only that file's shared plugin reads. Before, an edit in any open file also stopped in-flight reads of every other open file from being cached.
- One design-system build per file (0.6.4) —
figma_get_design_system_summary,figma_search_components,figma_get_component_detailsandfigma_get_token_valuesshare one build of the file's design-system data. The build reads components and variables from the file it started for, even if the active file changes while it runs, and a build that an edit overtakes is returned but not cached. Concurrent builds of one file share a single component scan. - Arranging a component set touches only that set (0.6.4) —
figma_arrange_component_set, andfigma_create_component_setwithautoArrange, no longer delete other component sets' containers on the same page.- A re-run replaces the container a previous run built around this set, and only when that container holds nothing but the previous arrangement. If it holds anything else (another component, an instance, a note), it is kept and the new container goes beside it.
- The new container is built before the old one is removed, so a font that fails to load changes nothing.
- A set on another page is arranged on its own page, and your current page, selection and view stay put.
- The result reports
removedContainerId,keptContainer, andsetPagefor a set that isn't on the current page.figma_create_component_setnever removes a container.
- Writes clear their own file's caches right away (0.6.5) — every tool that can change a file (creates, updates, deletes,
figma_execute, token imports) clears that file's cached variables and design-system data as soon as the call finishes, whether it succeeded, failed or threw. Before, a node write such as creating a component leftfigma_get_design_system_summaryandfigma_search_componentsanswering from pre-write data until Figma's edit event arrived, which can take about a minute when Figma is in the background.- Only the files the call sent commands to are cleared. A write to one file, whether by
fileKeyor to the active file, leaves every other open file's caches warm. Variable writes andfigma_executeused to clear every file; they now clear only their own as well. - Read-only tools clear nothing, and neither does a write rejected before it reaches Figma.
- Edits you make by hand in Figma still wait for the edit event, as before.
- Only the files the call sent commands to are cleared. A write to one file, whether by
- Fetch warnings in every design-system tool (0.6.5) — when the plugin's component scan or variable read fails,
figma_get_component_detailsandfigma_get_token_valuesnow say so in awarningslist, asfigma_get_design_system_summaryandfigma_search_componentsalready did. Before, they answered from the partial data without a word, so a failed component scan read as "component not found". - The plugin's own name and folder (0.6.6) — the plugin is Toko Relay, with its own plugin ID, so Figma lists it apart from upstream's Figma Desktop Bridge. The server copies it to
~/.figma-console-mcp/toko-relay/and no longer writes~/.figma-console-mcp/plugin/. While people switch, messages that send you to the plugin give both names, and an older plugin gets the steps: import the new folder, then remove the old entry (see step 3). - No cloud pairing (0.6.6) — the plugin no longer carries upstream's cloud pairing, and its manifest allows network access to localhost only.
- A quieter plugin window (0.6.6) — two short status lines, with Pause or Resume, Activity and Minimize on one row underneath. It reads "Ready" until your AI acts, then the time and the last action; a failed action turns that line red. Minimize shrinks the window to one row at the same width, and the plugin remembers that across files and restarts. The plugin and server versions are at the top of the open activity log.
- Logged errors keep their details (0.6.6) — an error the server logs keeps its message and stack trace. Before, many came out as
{}. - The arranger cleans up after a failure (0.6.6) — when
figma_arrange_component_setfails before the set moves into its new container, it removes the layers it created in that run. Once the set has moved it removes nothing, and a layer it couldn't remove is reported. - Honest error reporting — the eight single-op variable/collection/mode write tools check the bridge's result envelope, so a plugin-side failure surfaces its real error text instead of a false success or a masking TypeError; batch-create failure rows identify variables that were created before the throw (
created/id/valueSet: false). - Mode-limit safety —
figma_setup_design_tokensandfigma_create_variable_collectionroll the collection back on a mode-limit failure instead of orphaning it, and the setup tool returns your file's real ceiling asplanModeLimit; the schema's stale 4-mode cap is now a 40 sanity bound (current Figma plans allow 10/20/unlimited — the runtime limit governs). - No orphaned nodes on failure —
figma_create_connectorvalidates endpoints before creating, and create-child / add-text-to-slide / create-table remove their partially-created node on error; batch stickies report the id of any sticky a failed row left behind.figma_create_childalso gains the POLYGON/STAR/VECTOR types the plugin always supported. - Per-command dispatch budgets — long-running bridge commands (variable refresh and component scans at 300s, lint/audit at 120s, large component sets) are no longer cut off at 30s: the server's real timeout rides in each WebSocket frame and the plugin's dispatcher honors it (upstream #94 lineage).
- Streamable HTTP transport (
MCP_HTTP_PORT, upstream #48) and per-call file targeting (fileKey, held target pins) — see above. VariableID:alias support, hex validation and sandbox-safe JSON escaping infigma_batch_create_variables,figma_batch_update_variablesandfigma_setup_design_tokens(upstream #52): invalid color strings throw instead of writingNaNchannels,#RGB/#RGBA/#RRGGBB/#RRGGBBAAare all supported, and serialized payloads escapeimport,(andU+2028/U+2029so caller text can't trip Figma's plugin import-expression scanner.- Security —
figma_scan_code_accessibilitynever executes<script>tags or inline handlers from the HTML it scans; the plugin's activity log escapes quotes; current MCP SDK and Zod lines. - Daemon and bridge reliability:
- ESM-safe startup orphan cleanup with 3-way PID verification (it never kills or removes files for unrelated or inconclusive PIDs) and multi-candidate eviction.
- Guarded WebSocket heartbeat pings and post-write variable cache invalidation.
- IPv6 loopback fallback (
::1→127.0.0.1) when the defaultlocalhostbind isn't accepting connections. - Desktop Bridge UI: synchronous-throw handling and socket-identity tracking, with a 10s connect timeout.
- Partial-failure orphan ids forwarded to callers.
page/pageSizehonored infigma_get_variablesformat: "full"(upstream #98).- Plugin and server build versions surfaced in the Desktop Bridge UI and diagnostics.
- CI and plugin-asset guards — Node 22/24 test matrix, a clean typecheck, a pinned
tools/listsnapshot with schema-invariant checks, and regression tests that parse the plugin files and run Figma's own import-expression scanner againstcode.js, so a comment can never again brick the plugin loader.
Relationship to upstream
- Frozen at the upstream v1.36.0 base — this fork does not track upstream releases.
- Upstream fixes are cherry-picked when they matter to this fork's use cases, with original authorship preserved. So far:
- v1.38.2: orphan-reaper fix
- v1.39.0: relay fix that lets
figma_execute'sfileContext/resultAnalysisreach the server - v1.39.1: plugin-update-banner direction fix
- v1.41.0: accessibility-scan script isolation (the Local Mode part)
- v1.41.0: exit on stdin EOF and synchronous stdio logging, guarded so an
MCP_HTTP_PORTdaemon keeps serving - v2.3.3: held-pin fix
- v2.5.1: IPv6 loopback fallback
- v2.x: MCP Apps theming fix
- Not in this fork: upstream's Cloud Mode (Cloudflare Workers deployment, remote SSE, OAuth) and its 2.x feature line. For those, use southleft/figma-console-mcp and its documentation. The Desktop Bridge plugin still shows upstream's cloud pairing option; it connects to upstream's hosted relay and is not supported here.
- Bugs and requests for this fork go to this repo's issue tracker — please don't file them upstream.
- All credit for the original server and plugin goes to Southleft and the figma-console-mcp contributors. If it's useful to you, consider sponsoring them.
Development
npm ci
npm test # Jest
npx tsc --noEmit # typecheck (must be clean)
npm run build # build:local (server) && build:apps (MCP App bundles)
npm run dev:local # run the server from source with tsx
License
MIT — see LICENSE.