Figwright logo

Figwright

Community
awdr74100

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 client.

Publisherawdr74100
Repositoryfigwright
LanguageTypeScript
Forks
47
Stars
843
Available tools
92
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Figwright exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 92 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    843 stars and 47 forks from the linked repository.

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

npm CI License: MIT

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. 113 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):

json
{
  "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:

bash
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 are model-invoked: your agent loads one automatically when the task matches its description.

SkillWhat it does
figma‑codegenTurn a Figma selection into framework-aware code, grounded on your stack and existing components.
figma‑buildBuild 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:

bash
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 113 MCP tools in three groups:

  • Read: selection, document and node inspection, styles, variables, components, fonts, reactions, 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, auto-layout, effects, styles, variables, components (including authoring their boolean/text/instance-swap properties), pages, reactions, and Motion animations (keyframes, animation-style presets, timelines); 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.

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.

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:

text
┌─────────────────────────────────────────────────────────────────────┐
│ 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.

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

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:

    json
    {
      "mcpServers": {
        "figwright": {
          "command": "/Users/you/.local/share/fnm/node-versions/v24.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):

    bash
    pnpm add -D @figwright/mcp   # or: npm i -D @figwright/mcp
    json
    {
      "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:

    bash
    npm i -g @figwright/mcp
    which figwright-mcp
    json
    {
      "mcpServers": {
        "figwright": {
          "command": "/absolute/path/to/figwright-mcp"
        }
      }
    }

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).

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, 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.

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

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; 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.

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.

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:

text
> 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

Installation

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

Available Tools

  • ping

    Health check. Returns server info plus, when a plugin is connected, end-to-end info from the Figma sandbox.

  • get_selection

    Return the IDs and basic geometry of the currently selected nodes on the active Figma page.

  • get_document

    Return the full node tree (recursive children) of the active Figma page, with base geometry, rotation, opacity, cornerRadius, and fills enrichment.

  • get_node

    Return a single Figma node by id, with full recursive children subtree.

  • get_nodes_info

    Return multiple Figma nodes by id. Output preserves input order; missing ids slot null.

  • get_metadata

    Return file metadata: fileName, current page, and all page references.

  • get_pages

    Return id+name of every page in the active Figma file.

  • search_nodes

    Search the node tree by case-insensitive name substring and/or exact node type. At least one of name or type is required. Scope to a subtree with root (a node id); defaults to the current page. Returns a flat array of matching nodes.

  • scan_text_nodes

    Return every TEXT node within a subtree, each with its characters / fontSize / fontName. Scope with root (a node id); defaults to the current page.

  • scan_nodes_by_types

    Return every node whose type is in the given types list, within a subtree. Scope with root (a node id); defaults to the current page. Returns a flat array of matching nodes.

  • get_styles

    Return the document's local styles grouped as { paints, texts, effects, grids }. Paint styles carry their paints; text styles carry fontName / fontSize / lineHeight / letterSpacing; effect styles carry their effects; grid styles carry their layout grids.

  • get_variable_defs

    Return the document's local variables as { collections, variables }. Each collection lists its modes and defaultModeId; each variable lists its resolvedType and valuesByMode (primitives, RGBA colors, or { type: "VARIABLE_ALIAS", id } references to other variables).

  • get_local_components

    Return the components and component sets within a node subtree (or the current selection) as { components, componentSets }. Scans a subtree, not the whole document — pass nodeId, or select the frames to scan. Components carry their variantProperties (when part of a set); component sets carry their variantGroupProperties (available values per axis) and the ids of their variant components.

  • get_component_api

    Return a component's full property API — the prop contract behind its instances. Pass a COMPONENT, COMPONENT_SET, or INSTANCE id (an instance resolves to its main component / set). Returns { id, name, type, properties } where properties maps each property name to { type (VARIANT|BOOLEAN|TEXT|INSTANCE_SWAP|SLOT), defaultValue, variantOptions?, preferredValues?, description? }. Property names come back verbatim for set_instance_properties: VARIANT by bare name (e.g. "Size"), BOOLEAN/TEXT/INSTANCE_SWAP suffixed with #id (e.g. "Label#2:0"). Unlike get_local_components (a subtree inventory), this targets one component and is safe on large files.

  • get_viewport

    Return the current page viewport as { center, zoom, bounds } — the on-screen center point, zoom level (1.0 = 100%), and visible bounds rect.

  • get_fonts

    Return every font used on the current page as { fonts: [{ fontName, count }] }, sorted by usage frequency (descending). Mixed-font text contributes one count per styled segment.

  • get_annotations

    Return Dev Mode annotations as { annotations: [{ nodeId, nodeName, annotations }] }. With nodeId, returns that node's annotations; without it, scans the current page for all annotated nodes.

  • get_reactions

    Return the prototype reactions on a node as { nodeId, reactions: [{ trigger, actions }] }. Each reaction pairs an interaction trigger (click, hover, timeout…) with its actions (navigate to node, open URL, back/close…).

  • list_files

    Return the files reachable from the plugin as { files: [{ fileKey, fileName, currentPage }] }. A plugin only sees its host document, so this is a single-element list describing the current file.

  • get_design_context

    Get a depth-limited, token-efficient node tree for exploring large files — prefer this over get_document. Starts from nodeId, else the current selection, else the current page. depth limits child levels (omit or 0 = unlimited). detail is minimal / compact / full. dedupeComponents collapses repeated component instances (children of an already-seen main component are omitted and flagged deduped). A deduped instance still carries textOverrides — the visible text it renders ({ name, characters }) — so per-instance content (card titles, list items, form labels) is available without re-expanding the collapsed subtree.

  • get_screenshot

    Export nodes as base64 images: { images: [{ nodeId, format, base64, recovered?, empty? }] }. format is PNG (default) / JPG / SVG; scale applies to raster formats (default 1). base64 is null for missing or non-exportable nodes. Nodes that are fully clipped or off-canvas (carousels, masks, off-screen states) are auto-recovered at their intrinsic bounds and flagged recovered:true. empty:true means the node genuinely renders nothing even unclipped (hidden / no content) so the export is blank.

  • save_screenshots

    Export nodes and write them to disk under outDir: { saved: [{ nodeId, format, path, recovered?, empty? }] }. format is PNG (default) / JPG / SVG; scale applies to raster formats (default 1). path is null for missing or non-exportable nodes. Nodes that are fully clipped or off-canvas (e.g. a carousel's edge items) are auto-recovered at their intrinsic bounds and flagged recovered:true. empty:true means the node genuinely renders nothing even unclipped (hidden / no content) so the file is blank. Files are named after a sanitized node id.

  • export_pdf

    Export a node (or the current page) to a single PDF file on disk: { nodeId, path, empty? }. Renders the target as one PDF page — Figma's plugin API exports one page per node and cannot paginate a page into one-frame-per-page or combine multiple nodes into a multi-page file. Pass a frame / section id for a vector PDF of that node; omit nodeId for the current page (large pages can be slow). path is null if the target is missing or not exportable; empty:true means it rendered nothing (blank PDF).

  • analyze_project

    Detect the local project profile (framework, language, styling system, component file extensions, svg handling) by reading manifests and config — the foundation scan_components / component_map switch on. Optional standalone probe: those tools run detection internally and return the same profile, so call this only to inspect detection in isolation (no Figma, no file scan). Runs on the server filesystem. rootDir defaults to the server cwd. Detects Tailwind v3 (config file) and v4 (CSS-first @import/@theme) and reports tailwindVersion; detects svg loader (svgr / vite-svg-loader / …) → svg.mode component vs url + an import hint.

  • scan_components

    Scan the local project for existing UI components so they can be reused instead of regenerated. Runs on the server filesystem, not in Figma. Identifies components by AST signature (exported, PascalCase, function-ish) rather than by folder layout, so any structure works. React (.tsx/.jsx) is parsed for name + props; Vue/Svelte derive the name from the file and parse props from the block (defineProps / export let / $props). extensions defaults to the detected profile's; rootDir defaults to the server cwd. Returns { components, profile }.

  • component_map

    Map the Figma component instances in a selection/subtree to existing local code components, so they can be reused instead of regenerated. Joins the grounded Figma component names (and their variant axes) against an AST scan of the project; an explicit docs/figma-component-map.md row overrides the fuzzy match. Each distinct component is mapped once with all its instance ids. A mapped candidate also reports matchedProps (Figma axes the component already has) and unmatchedProps (axes it lacks → component-extension TODOs). Returns { mappings (candidate + confidence + status high/medium/low/unmapped), unmapped, profile }.

  • token_map

    Map the document's Figma variables to the project's design tokens, so generated code references existing tokens instead of hard-coded values. Joins the grounded Figma variable names + values against tokens parsed from the project CSS (Tailwind v4 @theme or :root custom properties); the match is name-based with an exact color value-match as confirmation. On a Tailwind project a variable that hits a framework built-in scale (spacing/N, line-height/N, weight/*) is reported as status 'framework-builtin' with { builtin: { scale, step } } rather than unmapped — it has no @theme token but the utility (p-4 / gap-4, leading-7, font-bold) is still usable. tokenSource overrides the detected styling config; rootDir defaults to the server cwd. Tailwind v3 JS configs are not yet parsed (pass tokenSource to a CSS file). Returns { mappings (candidate + confidence + status + matchedBy + builtin), unmapped, tokenSource, profile }.

  • icon_map

    Map the Figma icon nodes in a selection/subtree to the project's existing .svg files, so codegen reuses the designer-curated asset instead of re-exporting a duplicate. Joins the grounded Figma icon names against the repo svg files (gitignore-aware scan), name-based and near-exact (a wrong icon is a silent visual bug, so unsure matches fall through to a fresh export rather than mis-reuse). Each match reports the file path, the color contract read from the file (currentColor / fixed / multi-color), and how to recolor it in this project (currentColor → text-{token}, gated on the svg mode since currentColor dies through an ). It does not fabricate the import line — compose it from the file path and profile.svg (importHint gives the loader form: svgr ?react / vite-svg-loader ?component / { ReactComponent } / url <img>), mirroring the project's existing imports for the alias/relative path. Unmatched icons are returned in unmapped; iconLibraries lists any installed icon com

  • set_fills

    Set a node's fills. SOLID: { type:'SOLID', color:{r,g,b} } (0–1). Gradient: { type:'GRADIENT_LINEAR'|…, gradientStops:[{position,color:{r,g,b,a}}], gradientTransform } (round-trips get_node output). Returns { ok, nodeId }.

  • set_text

    Replace a TEXT node's characters. The plugin loads the node's fonts first. Returns { ok, nodeId }.

  • set_text_properties

    Set a TEXT node's typography and layout/overflow properties. Typography: fontName ({ family, style }), fontSize, lineHeight, letterSpacing, textCase, textDecoration — these load the required fonts first. Layout/overflow: textTruncation (ellipsis), maxLines (line clamp), textAutoResize. Any field may be omitted to leave it unchanged. maxLines applies when textTruncation is ENDING. Returns { ok, nodeId }.

  • create_frame

    Create a frame, optionally sized/positioned and appended to a parent (else the current page). Returns { ok, nodeId, name, type }.

  • set_opacity

    Set a node's opacity (0–1). Returns { ok, nodeId }.

  • set_visible

    Show or hide a node. Returns { ok, nodeId }.

  • rename_node

    Rename a node. Returns { ok, nodeId }.

  • delete_nodes

    Delete nodes by id. Missing / non-removable nodes are skipped. Returns { ok, affected } — the ids actually removed.

  • create_text

    Create a TEXT node with the given characters (default font loaded automatically), optionally sized/positioned and appended to a parent (else the current page). Returns { ok, nodeId, name, type }.

  • create_rectangle

    Create a rectangle, optionally sized/positioned and appended to a parent (else the current page). Returns { ok, nodeId, name, type }.

  • set_corner_radius

    Set a node's corner radius. Pass radius for a uniform radius, and/or per-corner topLeftRadius / topRightRadius / bottomRightRadius / bottomLeftRadius (for nodes that support individual corners, e.g. a card rounded only on top, a tab or a chat bubble). A per-corner value overrides radius for that corner. At least one of radius or a corner is required. Returns { ok, nodeId }.

  • set_strokes

    Set a node's strokes (SOLID or gradient paints, same shape as set_fills) plus optional strokeWeight, strokeAlign (INSIDE / OUTSIDE / CENTER), dashPattern (dashes), and per-side weights (strokeTopWeight / strokeRightWeight / strokeBottomWeight / strokeLeftWeight — for nodes that support individual stroke weights, e.g. a border-bottom-only divider). A per-side weight overrides strokeWeight for that side. Any field may be omitted to leave it unchanged. Returns { ok, nodeId }.

  • move_nodes

    Translate nodes by (dx, dy). Nodes without a position are skipped. Returns { ok, affected }.

  • resize_nodes

    Resize nodes to the given width × height (positive). Non-resizable nodes are skipped. Returns { ok, affected }.

  • set_auto_layout

    Configure a frame's auto layout. layoutMode NONE disables it; HORIZONTAL/VERTICAL enable flex (padding / itemSpacing / alignment / wrap); GRID enables CSS-Grid-style layout (padding / gridRowCount / gridColumnCount / gridRowGap / gridColumnGap). Returns { ok, nodeId }.

  • set_layout_props

    Set a node's auto-layout child properties — how it behaves inside its auto-layout parent. layoutAlign (STRETCH = fill the counter axis, INHERIT = default). layoutGrow (1 = grow to fill the primary axis / "fill container", 0 = hug). layoutPositioning (ABSOLUTE = ignore the flow and position freely, AUTO = participate in layout). Any field may be omitted to leave it unchanged. Returns { ok, nodeId }.

  • set_blend_mode

    Set a node's blend mode (e.g. NORMAL, MULTIPLY, SCREEN, OVERLAY). Returns { ok, nodeId }.

  • set_mask

    Set whether a node is a mask — a mask clips its later siblings to its own shape. Pass isMask true/false, and optionally maskType (ALPHA / LUMINANCE / GEOMETRY) when enabling. Returns { ok, nodeId }.

  • set_arc

    Turn an ellipse into a pie slice / gauge or a ring / donut by setting its arc data. startingAngle / endingAngle are in radians and carve out the visible wedge (a full circle is 0 → 2π ≈ 6.28319; a half is π ≈ 3.14159); innerRadius is 0–1 of the radius (0 = a solid disc, > 0 = a ring with a hole, e.g. 0.6 for a donut or progress ring). Only ellipses have arc data. Pass any subset — omitted fields keep their current value. At least one is required. Returns { ok, nodeId }.

  • set_constraints

    Set a node's resize constraints relative to its parent. Returns { ok, nodeId }.

  • rotate_nodes

    Set absolute rotation (degrees) on nodes. Nodes without rotation are skipped. Returns { ok, affected }.

  • lock_nodes

    Lock nodes (prevent selection/editing on canvas). Returns { ok, affected }.

  • unlock_nodes

    Unlock nodes. Returns { ok, affected }.

  • clone_node

    Duplicate a node next to the original (same parent). Returns { ok, nodeId, name, type } for the copy.

  • set_effects

    Set a node's effects. Shadows (DROP_SHADOW / INNER_SHADOW) need color + offset; blurs need radius. Returns { ok, nodeId }.

  • create_paint_style

    Create a local paint (color) style. SOLID or gradient paints (same shape as set_fills). Use a/b/c slashes in the name for folder grouping. Returns { ok, styleId, name }.

  • create_text_style

    Create a local text style. The font is loaded before assignment. lineHeight unit is AUTO / PIXELS / PERCENT (AUTO omits value); letterSpacing unit is PIXELS / PERCENT. Returns { ok, styleId, name }.

  • create_effect_style

    Create a local effect style. Shadows (DROP_SHADOW / INNER_SHADOW) need color + offset; blurs (LAYER_BLUR / BACKGROUND_BLUR) need radius. Returns { ok, styleId, name }.

  • create_grid_style

    Create a local layout-grid style. GRID is uniform (sectionSize); ROWS / COLUMNS carry count + gutterSize + alignment. Returns { ok, styleId, name }.

  • update_paint_style

    Update an existing paint style by id. Any of name / paints / description may be omitted to leave unchanged. Returns { ok, styleId, name }.

  • apply_style_to_node

    Bind a shared style to a node. field selects which slot the style applies to: fill / stroke / effect / grid / text. Returns { ok, nodeId }.

  • delete_style

    Delete a local style (paint / text / effect / grid) by id. Returns { ok, styleId, name }.

  • create_variable_collection

    Create a variable collection. Figma auto-creates a default mode. Returns { ok, collectionId, defaultModeId, name }.

  • add_variable_mode

    Add a mode (e.g. "Dark") to a variable collection. Returns { ok, modeId, name }.

  • create_variable

    Create a variable in a collection. resolvedType is BOOLEAN / FLOAT / STRING / COLOR. Use set_variable_value to populate per-mode values. Returns { ok, variableId, name }.

  • set_variable_value

    Set a variable's value for a mode. value is a boolean / number / string, a color { r, g, b, a } (0–1), or an alias { type: "VARIABLE_ALIAS", id }. Returns { ok, variableId, name }.

  • bind_variable_to_node

    Bind a variable to a node field (e.g. width, height, characters, itemSpacing, topLeftRadius, or cornerRadius to bind all four corners at once), or unbind by passing variableId: null. The variable type must match the field. Returns { ok, nodeId }.

  • bind_variable_to_paint

    Bind a COLOR variable to a SOLID fill or stroke paint (the design-token way to colour a node) — or unbind by passing variableId: null. Figma stores fill/stroke colour bindings on the paint, not the node, so this is separate from bind_variable_to_node (which covers scalar fields like width / padding / radius). target is fills (default) or strokes; index selects which paint (default 0). The paint at that index must be SOLID. Returns { ok, nodeId }.

  • rename_variable

    Rename a variable (e.g. "color/primary" → "color/brand"). Returns { ok, variableId, name }.

  • delete_variable

    Delete a variable by id. Returns { ok, variableId, name }.

  • delete_variable_collection

    Delete a variable collection by id, removing the collection and every variable in it (bindings to those variables revert to raw values). Returns { ok, collectionId, name }.

  • group_nodes

    Group nodes under their shared parent. nodeIds must be a non-empty list. Returns { ok, nodeId, name, type } for the new group.

  • ungroup_nodes

    Ungroup GROUP nodes by id; non-group nodes are skipped. Returns { ok, affected } — the ids of the children promoted out of the groups.

  • reparent_nodes

    Move nodes into a new parent (optionally at index). Nodes that no longer exist are skipped. Returns { ok, affected }.

  • reorder_nodes

    Reorder nodes within their current parent by inserting each at index (0 = bottom of the z-order). Detached nodes are skipped. Returns { ok, affected }.

  • find_replace_text

    Replace a substring across all TEXT nodes under a scope. Without rootId the whole current page is searched; matching is case-insensitive unless caseSensitive is true. Fonts are loaded before each edit. Returns { ok, affected } — the text node ids changed.

  • batch_rename_nodes

    Rename many nodes at once from a [{ nodeId, name }] list. Missing nodes are skipped. Returns { ok, affected }.

  • add_page

    Create a new page (optionally named). Returns { ok, nodeId, name, type }.

  • delete_page

    Delete a page by id. The current page and the last remaining page cannot be deleted. Returns { ok, nodeId }.

  • rename_page

    Rename a page by id. Returns { ok, nodeId }.

  • navigate_to_page

    Switch the active page. Subsequent selection / read tools operate on this page. Returns { ok, nodeId }.

  • set_reactions

    Replace a node's prototype reactions. Each reaction has a trigger (e.g. { type: 'ON_CLICK' }) and an actions array (e.g. { type: 'NODE', destinationId, navigation, transition }). Best used to round-trip get_reactions output. Returns { ok, nodeId }.

  • remove_reactions

    Clear all prototype reactions from a node. Returns { ok, nodeId }.

  • swap_component

    Swap an instance's main component. Provide componentKey (published component, imported via the API) or componentId (a local COMPONENT node). Returns { ok, nodeId } (the instance id).

  • set_instance_properties

    Set an instance's component properties (variant / boolean / text / instance-swap). Keys are the property names from get_component_api, used verbatim: VARIANT by bare name (e.g. "Size": "Large"), BOOLEAN/TEXT/INSTANCE_SWAP suffixed with #id (e.g. "Label#2:0": "Sign in", "Disabled#1:2": true). An INSTANCE_SWAP value is the target component node id. Unspecified properties keep their value; SLOT properties are not settable. Returns { ok, nodeId }.

  • detach_instance

    Detach an instance into a plain frame (breaks the component link). Returns { ok, nodeId, name, type } for the resulting frame.

  • import_image

    Import a raster image (PNG / JPG / GIF) and place it as a rectangle with an IMAGE fill. Provide data (base64-encoded image bytes) or url. The rectangle defaults to the image size unless width/height are given. scaleMode is FILL / FIT / CROP / TILE (default FILL). For vector SVG (logos / icons) use import_svg instead. Returns { ok, nodeId, name, type }.

  • import_svg

    Import an SVG and place it as editable vector nodes (a FRAME of VECTOR paths) via createNodeFromSvg — use this for vector logos, brand marks, and icons. Provide the SVG's raw markup string (read it from the project asset, or inline it). The frame defaults to the SVG intrinsic size unless width/height are given. For raster photos (PNG / JPG) use import_image instead; when a matching icon component already exists, create_instance it rather than re-pasting the SVG. Returns { ok, nodeId, name, type }.

  • create_ellipse

    Create an ellipse, optionally sized / named / positioned and placed under a parent (default: current page). Returns { ok, nodeId, name, type }.

  • create_component

    Create a reusable main component. Pass fromNodeId to convert an existing node into a component (e.g. a frame of vectors from import_svg, or a built layout) — it keeps the node's position and parent unless parentId is given; omit fromNodeId to create an empty component to build into. Then create_instance the result to reuse it. Optionally sized / named / positioned and placed under a parent (default: current page). Returns { ok, nodeId, name, type }.

  • create_section

    Create a section (a canvas-level grouping container), optionally sized / named / positioned. Sections live on a page or inside another section. Returns { ok, nodeId, name, type }.

  • create_instance

    Instantiate a component. Provide componentId (a local COMPONENT node) or componentKey (a published component imported via the API). Optionally name / position / parent the instance. Returns { ok, nodeId, name, type } for the new instance.

  • combine_as_variants

    Combine two or more existing COMPONENT nodes into a single COMPONENT_SET (a variant set). Name each component with Figma variant syntax (e.g. "Size=Small", "Size=Large") beforehand so the set derives its properties. The components are reparented into the new set under parentId (default: the first component's current parent). Returns { ok, nodeId, name, type }.

  • batch

    Apply multiple invertible write ops atomically (all-or-nothing with rollback). ops is an ordered list of { tool, params } where tool is an invertible write (e.g. set_fills, rename_node, move_nodes, create_frame). Destructive ops (delete_*, ungroup_nodes, …) are rejected. Returns { ok, results } with one result per op in order.

Use Figwright MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Figwright is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Figwright as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Figwright MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "figwright": {
      "command": "npx",
      "args": [
        "-y",
        "figwright"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Figwright MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Figwright MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Figwright to help me with this task?
Figwright
Sure. I read it.
Here is what I found using Figwright.

Frequently asked questions

What is the Figwright MCP server used for?

Figwright is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Figwright MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Figwright with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Figwright MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Figwright connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Figwright MCP to TypingMind?

Figwright runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Figwright MCP provide in TypingMind?

Figwright exposes 92 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Figwright MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Figwright requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

figma_to_code

Generate framework-aware code from a Figma selection that reuses the project’s existing components and design tokens instead of regenerating them (the cross-client form of the figma-codegen workflow: get_design_context + component_map + token_map).

code_to_figma

Build a Figma design from code or a description in the connected file, reusing the file’s existing components / variables / styles instead of drawing primitives (the cross-client form of the figma-build workflow: get_variable_defs + scan_components + create_instance + bind_variable_to_paint / bind_variable_to_node).

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇