figwright
Open-source, bidirectional Figma agent for MCP clients — a free alternative to Figma's Dev Mode MCP. Reads designs with high-fidelity grounding and writes back to the canvas: frames, text, auto-layout, styles, variables, and components. 92 tools, no API token, no paid Figma seat.
README
<div align="center">
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/awdr74100/figwright/HEAD/.github/logo-full-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/awdr74100/figwright/HEAD/.github/logo-full-light.svg"> <img alt="Figwright" src="https://raw.githubusercontent.com/awdr74100/figwright/HEAD/.github/logo-full-light.svg" width="480" height="240"> </picture>
Where Playwright drives the browser, Figwright drives Figma.
</div>
<!-- TODO(demo): drop a short GIF / screenshot of a real codegen → canvas round-trip here. -->
What is Figwright?
Figwright connects an MCP server to a Figma plugin over a local WebSocket relay, so an AI agent — Claude Code, Cursor, 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: frames, text, auto-layout, styles, variables, components, whole screens.
Everything runs on your machine and talks to Figma through a plugin, so it needs no Figma Dev Mode seat and no paid tier.
Why Figwright
- Free — no Figma Dev Mode or paid seat. The official Dev Mode MCP is gated; Figwright isn't.
- Bidirectional — not read-only. 92 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.
- Any MCP client — Claude Code, Cursor, and other MCP-capable agents all work the same way.
- Open & extensible — the read/write workflows ship as installable skills you can adopt or fork.
How it works
Your MCP client talks to the @figwright/mcp server over stdio; the server relays to the Figma plugin over a local WebSocket. Several clients can share one plugin — they elect a leader that owns the connection — and the transport is built to ride out dropped sockets:
┌─────────────────────────────────────────────────────────────────────┐
│ MCP CLIENTS — one per agent │
│ Claude Code · Cursor · Claude · any MCP-capable client │
└─────────────────────────────────────────────────────────────────────┘
│ MCP protocol over stdio
▼
┌─────────────────────────────────────────────────────────────────────┐
│ @figwright/mcp — your client launches one; they elect a leader │
│ │
│ LEADER (owns the single plugin connection) │
│ • WebSocket relay · request idempotency │
│ • routes to the most-recently-active file │
│ • session resume · "busy ≠ dead" heartbeat │
│ • endpoints: /ws (plugin) · /ping (health) · /rpc (followers) │
│ │
│ FOLLOWERS │
│ • forward tool calls to the leader over HTTP /rpc │
│ • take over automatically if the leader exits │
└─────────────────────────────────────────────────────────────────────┘
│ local WebSocket · msgpack (binary)
▼
┌─────────────────────────────────────────────────────────────────────┐
│ FIGMA (desktop or browser) │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Figwright plugin │ │
│ │ • UI (Vue 3 iframe): WebSocket client + heartbeat │ │
│ │ • sandbox: executes Figma Plugin API calls │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ │ 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.
Quick start
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 — no global install needed.
2. Install the Figma plugin
The plugin isn't on the Figma Community marketplace yet, so install it from the latest release:
- Download the plugin zip from the latest GitHub Release and unzip it.
- 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.
Skills
Agent skills orchestrate Figwright's tools. They're 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/mcpserver connected — on their own they have no tools to drive.
Tools
Figwright exposes 92 MCP tools in three groups:
- Read — selection, document and node inspection, styles, variables, components, fonts, reactions, screenshots, and PDF export.
- Write — create and edit frames, text, shapes, auto-layout, effects, styles, variables, components, pages, and reactions; plus a
batchtool to apply many edits at once. - Grounding —
get_design_contextfor faithful, de-duplicated design context, andcomponent_map/token_map/icon_map, which join Figma data to your codebase so codegen reuses what you already have.
[!TIP] Your MCP client lists every tool at connect time — that's always the authoritative, up-to-date catalog.
Requirements
- An MCP client (Claude Code, Cursor, …).
- Node.js 24 LTS or newer — the server runs via
npx. - Figma — the free tier is enough; the desktop app is needed to import the plugin in development.
FAQ
<details> <summary><strong>My MCP client can't start the server — <code>npx</code> or <code>node</code> "command not found".</strong></summary>
This almost always means your MCP client can't find node / npx on its PATH — it isn't specific to Figwright and affects any npx-launched MCP server. It's especially common when Node is managed by a version manager (fnm, nvm, asdf, volta, mise): those set PATH from shell hooks that only run in interactive terminals, so a GUI app or MCP client that spawns the command directly never inherits them.
Fixes, easiest first:
-
Use an absolute path. In a normal terminal run
which npx(orwhich node) and use that full path ascommand:{ "mcpServers": { "figwright": { "command": "/Users/you/.local/share/fnm/node-versions/v24.x.x/installation/bin/npx", "args": ["-y", "@figwright/mcp@latest"] } } } -
Install it and point at the binary. Install the package (globally with
npm i -g @figwright/mcp, or as a local dependency), then setcommandto the absolute path fromwhich figwright-mcp. As a bonus this skips the network resolution thatnpx … @latestdoes on every launch. -
Pass
PATHthroughenv. If your client supports a per-serverenv, add your version manager'sbindirectory toenv.PATH.
</details>
<details> <summary><strong>The plugin stays on "Waiting" and never connects.</strong></summary>
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).
</details>
<details> <summary><strong>Do I need a paid Figma plan or Dev Mode?</strong></summary>
No. Figwright talks to Figma through a plugin, so the free tier is enough — no Dev Mode seat or paid tier required.
</details>
<details> <summary><strong>Can more than one agent use the same plugin at once?</strong></summary>
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.
</details>
Contributing & development
Contributions are welcome — see CONTRIBUTING.md for the workflow, and AGENTS.md for architecture, layout, and conventions.
packages/
shared/ # types, Zod schemas, msgpack codec, plugin↔server protocol (bundled into mcp)
mcp/ # the MCP server — @figwright/mcp (Node, ESM): relay, election, tools, joins
plugin/ # Figma plugin — Vue 3 + Vite + Tailwind v4 (UI) + sandbox (Figma API)
skills/ # agent skills that orchestrate the tools — installable via `npx skills add`
Run the canonical checks from the repo root (the same gates CI enforces):
pnpm install
pnpm typecheck && pnpm lint && pnpm format:check && pnpm knip && pnpm build && pnpm test
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。