Skip to main content
Glama
Figma MCP Bridge

Figma MCP Bridge

by SrgGrch

Fijma

English | Русский

A local MCP bridge for reading and editing an open Design file in Figma Desktop. The MCP client gets structured tools for nodes, pages, local styles and variables, batch changes, and PNG/SVG exports. An optional trusted JavaScript/TypeScript executor provides full access to the pinned file after separate permission in the plugin UI.

Requirements

  • Node.js 20+ and npm.

  • Figma Desktop with access to Plugins → Development.

  • An MCP client that supports a local stdio server.

The project currently installs from source: there is no published npm package.

Fijma keeps the existing figma_* tool names, plugin ID, FIGMA_MCP_* environment variables, and .figma-mcp-bridge pairing directory for compatibility. Existing client configurations continue to work; new examples use fijma as the connection name.

Related MCP server: Figma Codex Bridge

Installation

git clone https://github.com/SrgGrch/Fijma.git
cd Fijma
npm ci
npm run build

Open a Design file in Figma Desktop. Select Plugins → Development → Import plugin from manifest and choose the absolute path to dist/plugin/manifest.json. Run Fijma.

Then connect the MCP server to your client. In the examples below, replace C:\path\to\Fijma with the absolute path to your cloned project. Backslashes are doubled in JSON. Node.js must be available in the client's PATH; specify the absolute path to node.exe if needed.

Codex CLI / Codex Desktop

Add the following to %USERPROFILE%\.codex\config.toml:

[mcp_servers.fijma]
command = "node"
args = ['C:\path\to\Fijma\dist\server\index.js']

Both CLI and Desktop read this configuration. In the CLI, you can also run codex mcp add fijma -- node C:\path\to\Fijma\dist\server\index.js. Codex MCP documentation.

Claude Code

Run this in the project directory:

claude mcp add --transport stdio --scope local fijma -- node C:\path\to\Fijma\dist\server\index.js

local ties the configuration to the current project. Use --scope user for all projects. Claude Code MCP documentation.

Cursor

Create .cursor/mcp.json in the project or %USERPROFILE%\.cursor\mcp.json for all projects:

{
  "mcpServers": {
    "fijma": {
      "type": "stdio",
      "command": "node",
      "args": ["C:\\path\\to\\Fijma\\dist\\server\\index.js"]
    }
  }
}

Cursor MCP documentation.

Gemini CLI

Run:

gemini mcp add fijma node C:\path\to\Fijma\dist\server\index.js

Alternatively, add the same mcpServers object with command and args to %USERPROFILE%\.gemini\settings.json. Gemini CLI MCP documentation.

Pairing and your first request

Restart or refresh the client's MCP connection. The adapter automatically starts the shared local bridge. It prints the path to pairing-secret.txt to stderr. If the client does not show stderr, run node scripts/manual-client.mjs from the project root: it displays the path and lets you send MCP requests as one JSON object per line.

Open the key file locally, paste it into the plugin panel, and click «Подключиться и запомнить» (“Connect and remember”). Do not send the key in chat. Call figma_get_context: the status should be ready, and the document name should match the intended file. Enable the toggle in the plugin panel to allow writes; writes are disabled again on a new connection. Other tools use the scope (sessionId and connectionGeneration) from the current context. See launch and pairing for details.

Building locally

npm ci
npm run build
npm test

npm run build creates dist/server/index.js and the plugin files in dist/plugin/. npm test runs automated checks, including communication through the MCP SDK and loopback WebSocket with simulated Figma behavior. After updating the build, close the plugin window, stop the old shared process with npm run stop, then restart the plugin and MCP connection.

How it works

MCP client ── stdio ── adapter ── shared local bridge ── WebSocket ── plugin UI ── Figma Plugin API

Each client starts its own stdio adapter; the shared bridge listens only on 127.0.0.1:55263 and serves one paired plugin connection. Document commands use a shared bounded FIFO queue; idle clients do not block others. Status and cancellation bypass the queue for the submitting client. An uncertain write blocks new commands with RECOVERY_REQUIRED until completion is confirmed or the plugin is restarted. The pairing secret is stored locally, and the plugin remembers it in figma.clientStorage.

Reading is available after pairing. Writes are enabled in the plugin UI for the pinned document and run in sequential batches with preconditions and result verification. Stop cancels subsequent steps and the queue; changes already applied are not rolled back. When you switch Figma windows, the plugin keeps working with the file where it was started. To use another file, disconnect the previous plugin and connect the new one. PNG/SVG exports pass through size-limited messages and temporary MCP resources.

Document requests and exports are sent to your MCP client and its selected model provider. Start writes with a copy of the document. For operation and size limits, see contracts, the limits profile, and batch execution. Source code is in plugin/, server/, and shared/; checks are in tests/.

Trusted execution

figma_execute runs an async JavaScript/TypeScript function with JSON arguments and cooperative cancellation. It is not a sandbox: code can modify the entire pinned document, and a timeout does not prove cancellation. Server and plugin must be updated together to protocol v2. See the execution contract, examples, and Desktop verification.

License

MIT.

Available Tools

10 tools
figma_apply_batch

Пакет структурированных изменений с предусловиями и ссылками на предыдущие шаги.

Inputs: scope (required), steps (required), operationId (required). Returns: object

figma_cancel_operationB

Запрос остановки операции без отката применённых изменений.

Inputs: scope (required), operationId (required). Returns: object

figma_export_nodeC

Экспорт выбранного узла в PNG или SVG.

Inputs: scope (required), format (required), nodeId (required), scale. Returns: object

figma_find_nodesC

Поиск узлов в явно заданной области текущего документа.

Inputs: limit (required), scope (required), name, types, +3 more. Returns: error, nodes, truncated, nextCursor

figma_get_contextB

Состояние моста и доступного документа. Не требует сессии.

Inputs: no named parameters. Returns: pages, state, limits, selection, +6 more

figma_get_local_resourcesB

Чтение локальных компонентов, стилей и переменных.

Returns: object

figma_get_nodesC

Чтение запрошенных свойств по nodeId.

Inputs: scope (required), fields (required), nodeIds (required). Returns: object

figma_get_operationC

Чтение известного состояния операции без повторного исполнения.

Inputs: scope (required), operationId (required). Returns: object

figma_get_treeC

Ограниченное дерево узлов текущей сессии.

Inputs: depth (required), limit (required), scope (required), rootId (required), +1 more. Returns: error, nodes, truncated, nextCursor

figma_navigateC

Явный переход к узлам и изменение выделения.

Inputs: scope (required), reveal (required), select (required), nodeIds (required), +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 10 tools

    Disambiguation4/5

    The read tools are mostly separable by scope: get_tree returns structure, find_nodes searches a bounded region, get_nodes fetches properties by nodeId, and get_context reports bridge state. The main soft spot is the tree/nodes/find_nodes cluster plus get_operation vs get_context, which an agent could plausibly swap, but the descriptions do enough to steer selection.

    Naming Consistency4/5

    All ten tools share a `figma_` prefix with a verb_noun pattern (get_tree, find_nodes, apply_batch, cancel_operation, export_node). The only deviation is `figma_navigate`, which drops the object noun, but the convention remains predictable overall.

    Tool Count5/5

    Ten tools is a well-scoped surface for a Figma bridge: reads, search, navigation, batched mutation, operation lifecycle, and export. Each tool maps to a distinct capability without padding.

    Completeness4/5

    The surface covers discovery, reading, mutation via apply_batch with preconditions, operation polling/cancel, and PNG/SVG export, so core workflows are closed. Minor gaps: no rollback/undo for applied batches (cancel explicitly does not revert), no file/document switching, and export limited to two formats.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables MCP clients to read design structure, take screenshots, create nodes, and edit UI directly on Figma canvas via a bridge between MCP and Figma Desktop.
      10
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables Codex and other MCP clients to read design context from Figma Desktop via a local bridge, providing design tokens, component trees, and screenshots without an API token.
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A local-only MCP bridge that connects an MCP client to an open Figma file via a Figma plugin, enabling direct document editing, inspection, export, and audit without using the Figma REST API.
      4
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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.
      2
      MIT