figwright is a free, open source design & prototyping project written in TypeScript and released under MIT. It has 1,608 GitHub stars, 105 forks and 4 open issues, and was last pushed 11 hours ago. On this registry it ranks #96 of 127 tracked projects in Design & Prototyping, with 5 head-to-head comparisons available. It gained 96 stars over the last 8 tracked days.

What is figwright?

Figwright is a free, MIT-licensed, two-way Figma MCP server that lets AI coding agents turn a Figma selection into framework-aware code and push code back to the canvas, built for developers using Claude Code, Cursor, Codex, or any other MCP client.

What it is

Figwright is a TypeScript project that connects an MCP server to a Figma plugin over a local WebSocket relay. The server, relay, and plugin all run on the user's machine, and the README states that designs are never sent anywhere. It is designed for coding agents rather than for manual design inspection: an agent can read a selection and act on the resulting design context, or author and edit the canvas directly.

The concrete problem is the gap between a design file and a working implementation, plus the one-way limitation of read-only design context. Figwright replaces the official Figma Dev Mode MCP workflow, which the README says is gated behind a paid Dev Mode seat, with a free alternative that pairs with a Figma plugin instead of a Dev Mode seat. Its read path produces framework-aware code grounded on de-duplicated design context covering layout, typography, variables, and components; its write path lets an agent create frames, text, auto-layout, styles, variables, components, and whole screens. The stated aim is to avoid generic markup that has to be rewritten.

Key capabilities

  • Bidirectional canvas work through 147 tools that span reading and writing, rather than read-only inspection.
  • The read path turns a Figma selection into framework-aware code grounded on layout, typography, variables, and components.
  • The write path authors and edits frames, text, auto-layout, styles, variables, components, and whole screens.
  • Provider-first codegen detects the real stack, meaning the framework and styling system, and reuses existing components, tokens, and icons.
  • A Figma plugin connects to the MCP server over a local WebSocket relay, with the server, relay, and plugin running locally and designs never sent anywhere.
  • One agent per file support lets several agents work at once, each claiming its own open Figma file, so switching tabs does not send one agent's edits into another's design.
  • Read and write workflows ship as installable skills that can be adopted or forked, installed with "npx skills add awdr74100/figwright/skills".

Who uses it and how

  • Developers using Claude Code, Cursor, Codex, or another MCP client who want an agent to implement a selected Figma frame as code.
  • Designers and developers on the free Figma tier who need design-to-code work without a paid Dev Mode seat.
  • Front-end teams with an existing framework, styling system, components, tokens, and icons, who want generated code to reuse those assets instead of generic markup.
  • Multi-agent workflows where several agents work at once and each claims its own open Figma file.
  • Privacy-sensitive users who want the server, relay, and plugin to run on their own machines, with designs never sent anywhere.

Getting started

Add the server to an MCP client such as Claude Code with an "npx" command running "@figwright/mcp@latest" in the client's configuration, then install the Figma plugin by downloading the plugin zip from the latest GitHub release, unzipping it, and importing its "manifest.json" through the Figma desktop app under Plugins, Development, Import plugin from manifest. The server requires Node.js 20.19+ or 22.12+.

How it compares

The official Figma Dev Mode MCP is behind a paid Dev Mode seat, while Figwright is MIT-licensed and runs on the free Figma tier. Figwright is self-hosted at the level of the server, relay, and plugin, and its README states that designs are never sent anywhere, so the design data stays on the user's machine. Its cost model is free and open source rather than a paid seat.

When to use it — and when not to

Use Figwright when the team already has an MCP-capable coding agent and wants two-way Figma work under local control. A self-hoster must run the Node server on a supported version, with Node 18, 21, and 22.0–22.11 unsupported, and must import the plugin from a GitHub release manifest in the desktop app, because the plugin is not yet on the Figma Community marketplace. It is a poor fit for anyone who needs a marketplace-installed plugin or cannot run a local server and relay; updates also require updating both the server and the plugin.

project readme (upstream, from github) — read inline


A free, two-way Figma MCP server for coding agents.
Pairs with a Figma plugin, not a Dev Mode seat.

About · Setup · Skills · Tools · Plugin · FAQ · Contributing

npm CI License: MIT

Figwright on Trendshift

About

Figwright connects an MCP server to a Figma plugin over a local WebSocket relay, so an AI agent (Claude Code, Cursor, Codex, or any other MCP client) can work with Figma instead of just looking at it.

It works in both directions:

Read: turn a Figma selection into framework-aware code, grounded on faithful, de-duplicated design context (layout, typography, variables, components).

Write: author and edit the canvas directly, from frames and text to auto-layout, styles, variables, components, whole screens.

Everything runs on your machine: the server, the relay, and the plugin. Your designs are never sent anywhere.

Why Figwright

  • Not gated: the official Dev Mode MCP is behind a paid Dev Mode seat. Figwright runs on the free tier.
  • Bidirectional: not read-only. 147 tools span reading and writing the canvas, so an agent can both implement designs and build them.
  • Provider-first codegen: Figwright detects your real stack (framework + styling system) and reuses your existing components, tokens, and icons, instead of emitting generic markup you have to rewrite.
  • One agent per file: several agents can work at once, each claiming its own open Figma file. Switching tabs no longer sends one agent's edits into another's design — see working across files.
  • Open & extensible: the read/write workflows ship as installable skills you can adopt or fork.

Setup

You need an MCP client (Claude Code, Cursor, …), Node.js 20.19+ or 22.12+, and Figma. The free Figma tier is enough, though the desktop app is needed to import the plugin. The server runs via npx as its own process, so its Node version is independent of the one your project builds with; Node 18/21 and 22.0–22.11 are not supported.

1. Add the server to your MCP client

For Claude Code, add this to your .mcp.json (other clients use the same shape):

{
  "mcpServers": {
    "figwright": {
      "command": "npx",
      "args": ["-y", "@figwright/mcp@latest"]
    }
  }
}

npx fetches and runs the published server, so no global install is needed.

2. Install the Figma plugin

The plugin isn't on the Figma Community marketplace yet, so install it from the latest release:

  1. Download the plugin zip from the latest GitHub Release and unzip it.
  2. In the Figma desktop app: Menu → Plugins → Development → Import plugin from manifest… and pick the unzipped manifest.json.

3. Connect

Open the Figwright plugin in Figma (Plugins → Development → Figwright). It connects to the local server automatically and shows Connected. Ask your agent to run ping to confirm the link.

4. (Optional) Install the skills

The skills make agents reach for Figwright at the right moment and follow the grounded workflows:

npx skills add awdr74100/figwright/skills

5. Try it

With a frame selected in Figma, prompt your agent:

Code this Figma selection as a React component.

or, the other direction:

Build a pricing section in Figma from this spec.

Updating

Each release ships the server and the plugin together, so update both. The skills are optional and update the same way you installed them.

1. Restart the server. With the @latest config above there is nothing to install, because every launch fetches the newest release. A session that is already open keeps the server it started with, so new tools don't appear until you restart it: in Claude Code, run /mcp, pick figwright and choose Reconnect (or restart Claude Code); in other clients, restart the client. Do this in each client you use Figwright from.

If you installed the package instead of using @latest (see the FAQ), update it before restarting: npm i -D @figwright/mcp@latest, or npm i -g @figwright/mcp@latest for a global install.

2. Replace the plugin. Download the zip from the latest release, unzip it, and copy its manifest.json and dist into the folder you imported the plugin from, replacing the old ones. Figma runs a development plugin straight from that folder, so you don't import it again. Close the plugin and run it again.

3. Update the skills. Run npx skills update. Agent sessions you start after that use the new version.

To confirm, open the plugin's Debug tab: it lists the server and plugin versions side by side. If the plugin is still too old for the server, the panel header says so, and so does every tool result (see the FAQ).

Skills

Agent skills orchestrate Figwright's tools. They are model-invoked: your agent loads one automatically when the task matches its description.

Skill What it does
figma‑codegen Turn a Figma selection into framework-aware code, grounded on your stack and existing components.
figma‑build Build a Figma design from code or a description, reusing the file's existing components and styles.

Install across any supported agent with the skills CLI:

npx skills add awdr74100/figwright/skills      # both
npx skills add https://github.com/awdr74100/figwright/tree/main/skills/figma-codegen  # one

[!NOTE] Skills need the @figwright/mcp server connected. On their own they have no tools to drive.

Tools

Figwright exposes 147 MCP tools in three groups:

  • Read: selection, document and node inspection, styles, variables, components, fonts, prototype reactions and flows, motion (animation) state, screenshots, original image-fill assets, PDF export, and video export of animated frames (MP4 / GIF / WebM); plus list_files / use_file for working across more than one open Figma file at once.
  • Write: create and edit frames, text, shapes (lines, polygons, stars, boolean operations, flattening), FigJam connectors, auto-layout, alignment and distribution, effects, images (as a new layer or into an existing layer's fill), styles (including their documentation links), variables (including their descriptions, scopes and publishing, importing a team library's variables and styles, and switching a frame to a mode such as Dark), components (including authoring their boolean/text/instance-swap properties and their documentation: description and documentation link), Dev Mode annotations, their categories and measurements, pages, prototype reactions and flows, Motion animations (keyframes, animation-style presets, timelines), 3D transforms (turning a layer in depth, and the perspective a frame gives its children), and Figma Draw (vector paths drawn and edited point by point from any SVG path data, outlined strokes, repeat groups, text on a path, brush / dynamic / variable-width strokes, pattern fills); plus a batch tool to apply many edits at once.
  • Grounding: get_design_context for faithful, de-duplicated design context, and component_map / token_map / icon_map, which join Figma data to your codebase so codegen reuses what you already have; plus design_diff, which reports what changed in a design against a saved baseline so you update only the affected code.

[!TIP] Your MCP client lists every tool at connect time, which is always the authoritative, up-to-date catalog.

Plugin

The Figma-side plugin isn't a black box. It shows every call as it happens, lets you inspect the exact payload sent to the model, and surfaces its own connection health.

Activity: every call, with timing and a jump to the nodes it touched · Payload: exactly what the model received · Debug: health, versions, and a one-click diagnostic bundle

And it follows your Figma theme, light or dark.

The window is yours to arrange. Drag the bottom-right corner to resize it. A taller panel keeps more of the log in view, and the size is remembered next time you open it. Or put it away: Run in background, in the panel header right under Figma's own ✕, hides the panel while the connection stays live, so a long-running agent keeps working. Run the plugin again to bring it back. The ✕ above it closes the plugin instead, connection and all.

Resize: drag the corner, the size sticks · Background: the panel hides, the relay stays connected

How it works

Your MCP client launches the @figwright/mcp server and talks to it over stdio. The server relays each tool call over a local WebSocket to the Figwright plugin, which carries it out through Figma's Plugin API. Every agent runs its own server process; the processes elect a leader that holds the plugin connections, and the rest forward to it. The plugin runs in every file you open it in, so several agents can each work in their own file at once, and the whole path is built to ride out dropped sockets, leader handovers and long reads:

┌─────────────────────────────────────────────────────────────────────┐
│ MCP CLIENTS  ·  each agent's client launches its own server         │
│ Claude Code · Cursor · Claude · any MCP-capable client              │
└─────────────────────────────────────────────────────────────────────┘
                                   │  MCP protocol over stdio
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│ @figwright/mcp  ·  the server processes elect one leader            │
│                                                                     │
│ LEADER   (holds every plugin connection)                            │
│    • WebSocket relay on 127.0.0.1:3055, Host- and Origin-checked    │
│    • routes each agent to the file it claimed with use_file,        │
│      otherwise to the file the user was last active in              │
│    • session resume: a dropped plugin has 30 s to reconnect, and    │
│      calls bound for it wait instead of failing                     │
│    • "busy ≠ dead" heartbeat: a busy plugin isn't taken for dead    │
│    • endpoints:  /ws (plugins) · /ping (health) · /rpc (followers)  │
│                  /abdicate (hand over to a newer build)             │
│                                                                     │
│ FOLLOWERS                                                           │
│    • forward tool calls to the leader over HTTP /rpc                │
│    • retry a call caught in a leader handover                       │
│    • take over automatically if the leader exits, and ask an older  │
│      leader to step down once it goes idle                          │
└─────────────────────────────────────────────────────────────────────┘
                                   │  local WebSocket · msgpack (binary)
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│ FIGMA  (desktop or browser)  ·  one plugin per file it's open in    │
│                                                                     │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Figwright plugin                                                │ │
│ │   • UI (Vue 3 iframe): WebSocket client, heartbeat, reconnect   │ │
│ │   • sandbox: executes Figma Plugin API calls                    │ │
│ │       – replays a retried write instead of applying it twice    │ │
│ │       – long reads yield every ~40 ms to keep Figma responsive  │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│                                                                     │
│              │ Figma Plugin API                                     │
│              ▼                                                      │
│            Canvas                                                   │
└─────────────────────────────────────────────────────────────────────┘

By design Figwright is provider-first: rather than a fixed compiler pipeline, the tools surface honest design context and let the model generate code that matches your codebase. The figma-codegen skill encodes this approach.

Security

Figwright runs entirely on your machine: your client launches the server over stdio, the server relays to the plugin over a WebSocket on 127.0.0.1:3055, and nothing is sent anywhere else. The plugin uses only Figma's public Plugin API, so it reaches the file you have open and nothing beyond it.

Loopback is not on its own a boundary, since a web page you visit can still reach a local port, so the relay gates every request on two headers a page cannot forge: Host, which must name loopback (this is what stops DNS rebinding), and Origin, which admits the plugin's sandboxed handshake and refuses browsers everywhere else. The leader's HTTP endpoints additionally require a media type that cannot be sent without a CORS preflight. See MCP Security Best Practices for the wider picture, and SECURITY.md for Figwright's threat model, what is in and out of scope, and how to report a vulnerability privately.

Figwright is not a substitute for reviewing what your agent does. Its write tools change your Figma file and its export tools write files to paths the agent chooses; an agent acting on a malicious design or a prompt-injected instruction can misuse both. Your MCP client's tool-approval controls are the boundary that matters.

FAQ

The server won't start: command not found, or it fails / disconnects with -32000 ("Connection closed").

Both come down to how your MCP client launches the server: it spawns the command directly, not through your interactive shell, so it inherits none of what your shell sets up. That bites hardest when Node is managed by a version manager (fnm, nvm, asdf, volta, mise), since those configure PATH and npm from shell hooks that only run in a real terminal. It is not specific to Figwright; it affects any npx-launched MCP server. There are two symptoms, with two different fixes.

command not found: the client can't find npx / node on its PATH.

  • Use an absolute path. In a normal terminal run which npx (or which node) and use that full path as command:

    {
      "mcpServers": {
        "figwright": {
          "command": "/Users/you/.local/share/fnm/node-versions/v26.x.x/installation/bin/npx",
          "args": ["-y", "@figwright/mcp@latest"]
        }
      }
    }
    
  • Or pass PATH through env. If your client supports a per-server env, add your version manager's bin directory to env.PATH.

-32000 / "Connection closed" / it just never connects: npx runs, but the server exits before the handshake.

npx … @latest re-resolves the package from the registry on every launch. In a directly-spawned environment that step can fail or stall (empty or different npm config, a corporate proxy or private registry that is not configured there, or no network), so the process dies before MCP connects and the client reports the connection as closed. (A missing node for the binary's shebang lands here too.)

The fix is to install the package so launch needs no registry fetch:

  • As a project dependency, the quickest unblock. Install it, then drop @latest from your config. The @latest tag is what forces the registry round-trip; without it, npx uses the copy already in node_modules (a project-scoped config like Claude Code's .mcp.json runs from your project root):

    pnpm add -D @figwright/mcp   # or: npm i -D @figwright/mcp
    
    {
      "mcpServers": {
        "figwright": {
          "command": "npx",
          "args": ["-y", "@figwright/mcp"]
        }
      }
    }
    
  • Or globally, pinned to the binary. Install once, then point command straight at it, with no npx and no per-launch resolution. Use the absolute path from which figwright-mcp:

    npm i -g @figwright/mcp
    which figwright-mcp
    
    {
      "mcpServers": {
        "figwright": {
          "command": "/absolute/path/to/figwright-mcp"
        }
      }
    }
    
The plugin stays on "Waiting" and never connects.

The server is launched by your MCP client, so it only runs while that client is open. Check that:

  • your MCP client is running and has Figwright configured (try a ping);
  • the plugin is open in the same Figma app on the same machine (the relay is local-only, 127.0.0.1);
  • nothing is blocking local loopback connections (some firewall / security tools do).
How do I know the server and plugin are in sync?

The plugin's Debug tab lists both versions side by side, so a mismatch is visible in one place.

Mostly you don't need to look. The two halves update through different channels — the server re-resolves itself on every launch via npx @latest, while the plugin is a zip you imported by hand and then stop thinking about — so drifting apart is the normal state here rather than an edge case. It is also a silent one: a handler that predates an argument ignores it without erroring, so a write can report success having done only part of what was asked. When your plugin is old enough for that, the panel says so and tells you how to update (Updating has the steps), and every tool result tells your agent the result is unverified.

It stays quiet on a difference that cannot bite — a plugin a version behind a server that changed no arguments is fine — so when the warning does appear it is worth acting on.

Do I need a paid Figma plan or Dev Mode?

No. Figwright talks to Figma through a plugin, so the free tier is enough. No Dev Mode seat or paid tier required.

Does it work in Dev Mode and FigJam?

It runs in both, with less available than in Figma Design, because those editors give plugins less rather than because Figwright holds anything back.

  • Figma Design: everything.
  • Dev Mode (Inspect panel): reads and exports only. Figma makes plugins read-only there, so screenshots, PDF export and every inspection tool work, while every write fails: nodes, pages, variables and styles alike. That suits the codegen direction; use Design mode to build. (The panel's own window controls — resize and Run in background — aren't there either: Figma owns that frame.)
  • FigJam: frames, sections, shapes and text work, connectors join them, and the words on stickies, shapes with text, table cells and connectors are read and rewritten (set_text); components, variables, styles and Motion don't exist in that editor, so the tools for them don't apply.

get_metadata reports the editor (editorType / mode), and any tool that fails because of the editor says so in its error, so an agent can re-plan rather than retry.

Can more than one agent use the same plugin at once?

Yes. Several MCP servers can share a single plugin via leader/follower election: one leads, the others follow, with a graceful handoff if the leader goes away.

Can two agents work on two different Figma files at the same time?

Yes, once each agent claims its file.

By default calls follow whichever file you last touched, so switching tabs switches what the agent sees — the right behaviour for one agent, and the wrong one for two, since the agent whose file isn't in front would silently get the other file's nodes. Whenever more than one file is open and an agent hasn't claimed one, every result it gets says so, so it can claim one before building anything on the wrong file.

list_files shows every file that currently has the plugin open, and use_file claims one for that agent:

> use the marketing site file
  → use_file({ fileName: "Marketing Site" })

The claim belongs to that agent's own server process, so it never affects the other agent, it survives closing and reopening the plugin panel, and calls keep reaching the file even while its tab sits in the background. That process is also the unit: one per MCP client, so the agents have to be separate clients — two editors, or two terminals. Everything inside one of them, subagents included, shares a server and therefore shares a claim. If two open files share a name (x and a second x), use_file refuses the name and asks for the sessionId that list_files prints, rather than guessing. Release it with use_file({ release: true }) to go back to following the foreground file.

Contributing

Contributions are welcome. See CONTRIBUTING.md for how to get set up and open a pull request, and AGENTS.md for the architecture, repo layout, tech stack, and conventions.

What's in the name

figwright follows the -wright tradition, an old English word for a maker or craftsman: a playwright writes plays, a shipwright builds ships, a wheelwright, wheels. The name is a nod to Playwright, which automates the browser. Where Playwright drives the browser, Figwright drives Figma, a maker of designs that both reads the canvas and crafts work back onto it.

License

MIT © Roya

Frequently asked questions

Is figwright free to use?

figwright is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does figwright do?

Free, two-way Figma MCP server. Turn designs into framework-aware code, and push code back to the canvas. Works with Claude Code, Cursor, Codex, and any MCP cli

What is figwright written in?

figwright is primarily written in TypeScript. Its source is publicly available at https://github.com/awdr74100/figwright, and it has 1,608 GitHub stars.