# Repository Briefing: gethopp/figma-mcp-bridge
> Source: https://repoforai.com/repo/gethopp/figma-mcp-bridge (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/gethopp/figma-mcp-bridge
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (92/100 · Maintenance 35/35 · Adoption 17/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.0.29 (2026-11-25) — https://github.com/gethopp/figma-mcp-bridge/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: MCP, CLI, Self-Hosted
- **Momentum**: 985 ★ total (+1 24h / +24 7d) · 130 forks
- **Topics**: `design-to-code`, `figma`, `mcp`, `mcp-server`
- **When to Use**: Best for: Design-to-code teams that work in Figma Desktop and need live selections, design tokens, asset exports, or scoped edits across open files. Skip if: You need browser-only setup, unattended ingestion from file links, or an authenticated bridge that can be exposed to an untrusted network.

## Overview
```text
### Architecture & Core Mechanics
Figma MCP Bridge pairs a TypeScript/React development plugin running inside Figma with a TypeScript/Node.js MCP server. The plugin accesses the open document and connects to `ws://localhost:1994/ws`. The server keeps a WebSocket session registry keyed by `fileKey`. An MCP tool call goes to the plugin for the selected file, and the result returns through the bridge to the client. Document access on this path does not use Figma’s REST API.

The server separates startup (`server/src/index.ts`), tool definitions (`tools.ts`), and WebSocket routing (`bridge.ts`). `leader.ts` owns the HTTP service and bridge, while `follower.ts` proxies requests over HTTP. `node.ts` handles role switching, and `election.ts` handles leader election and health monitoring. This lets multiple MCP client processes share one active bridge while that bridge maintains simultaneous sessions with several files. One active bridge does not mean one connected file.

### Key Capabilities & Differentiators
The read tools cover the current page tree, selection, individual nodes, and a depth-limited design context. They also expose file metadata, local paint, text, effect, and grid styles, plus variable collections, modes, and values. Exports support PNG, SVG, JPG, and PDF as Base64 responses or files on the server’s local filesystem. Prototype tools inspect reactions and trace navigation, including nested branch conditions; in Figma Design, `set_reactions` replaces the target node’s reactions.

Figma Design supports file edits such as node creation and batch property updates. `apply_paint_style` replaces fills or strokes with a linked local paint style, returns per-node errors in a batch, and does not import shared library styles. Dev Mode is read-only. FigJam supports board edits such as creating stickies and connectors, but not prototype tools, Auto Layout, or motion tools. The release history confirms component creation from a node and variant combining; it does not establish broad component or instance editing.

### Trade-offs & Limitations
Compared with a REST-based tool such as Figma-Context-MCP, the plugin avoids spending REST API quota on tool calls and can read the live selection or edit an open file. The cost is a desktop-only installation step and dependence on an active plugin session for each target file. This favors interactive design-to-code work over unattended ingestion from file links. For complex pages, prefer selection or depth-limited reads before requesting a full tree or embedding Base64 exports in model context.

The leader binds to `127.0.0.1` by default, and its endpoints have no authentication. Changing `FIGMA_BRIDGE_HOST` for a VM or container can expand who can reach the bridge; do not expose it on a public or untrusted network. Keep `run_script` off unless specifically needed. Its opt-in is checked by the active leader, so setting it only on a follower does not make the tool available. Local bridge transport also does not guarantee that the MCP client keeps returned design content on the device.

### Hardware & Deployment Guide
Run the development plugin in Figma Desktop on macOS or Windows. The browser client cannot import it. Download the plugin from a release, import `plugin/manifest.json` via the Figma Development menu, and open the plugin in each file you want to query. Configure the MCP client to launch `npx -y @gethopp/figma-mcp-bridge`; pin a tested package version for a repeatable rollout.

For source builds, install root tooling with Bun, then run `bun install` and `bun run build` separately in `server/` and `plugin/`. Point the MCP client at `server/dist/index.js` with `node`. The self-hosted bridge still needs a live Figma desktop session. Release v0.0.27 added local paint style application; v0.0.28 added component creation from nodes and variant combining; v0.0.29 added `set_reactions`. Validate the plugin and server together before adopting the newer write tools.
```

## Key Capabilities
```text
- File routing: `list_files` discovers active plugin sessions, and `fileKey` selects a connected file.
- Process coordination: One leader owns the WebSocket bridge; follower processes forward calls over HTTP.
- Design context: Read a depth-limited node tree, local styles, and variable collections with their modes and values.
- Asset export: Export PNG, SVG, JPG, or PDF as Base64, or save exports to the server’s local filesystem.
- Prototype tooling: Trace navigation and inspect branch conditions; `set_reactions` replaces rather than merges a node’s reactions.
- Editing boundaries: Dev Mode is read-only, FigJam has a distinct tool subset, and `run_script` is disabled by default.
```

## Quick Start / Clone
```bash
bun run format        # format the whole repo
bun run format:check  # verify formatting without writing (useful in CI)
```
