Figmagent
Provides tools for bridging AI agents with Figma: reading and searching node trees, editing and creating nodes, managing components/instances, design tokens/variables/styles, linting, screenshots, comments, and file navigation via either a local Figma plugin/relay or Figma's official remote MCP.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Figmagent MCP
MCP server that bridges AI agents (Claude Code, Cursor) with Figma. Originally forked from sonnylazuardi/cursor-talk-to-figma-mcp, now a standalone project with significant additions: structured tree inspection (FSGN), design token binding, batch operations, component property management, design linting, library access, file comments, plugin concurrency control, and sub-agent orchestration.
Two transports share one command implementation:
plugin: AI Agent <-(stdio)-> MCP Server <-(WebSocket)-> Relay <-(WebSocket)-> Figma Plugin
remote: AI Agent <-(stdio)-> MCP Server <-(HTTPS/OAuth)-> Figma official MCP (use_figma)The default FIGMA_TRANSPORT=auto picks the plugin path when the local relay is running (fastest: ~10–75ms/command) and falls back to the remote path when you're authed with Figma (headless, no relay, no plugin, no open Figma client; ~1–2.5s/command, atomic scripts). Both transports passed a full read-parity and build A/B with identical outputs, call counts, and error counts.
Setup
Prerequisites
Bun runtime
Figma desktop app (plugin transport only)
Quick Start (remote transport — no relay, no plugin)
Install dependencies and configure MCP:
bun setupThis installs dependencies and writes Cursor's MCP config (.cursor/mcp.json). For Claude Code, install the plugin instead (see Claude Code Setup) — it ships the MCP server plus skills, sub-agents, and the /figmagent:reauth command.
Issue any Figma tool call. On first run the server prints an OAuth URL to stderr (and opens your browser) — approve, and tokens persist to
~/.figmagent/auth.json. Select a file by passing a Figma URL touse_fileor settingFIGMA_FILE_KEY.
Plugin transport (fastest — local relay + Figma plugin)
When per-command latency matters (large interactive sessions, parallel sub-agents), run the local path; auto prefers it whenever the relay is up:
Start the WebSocket relay in a separate terminal:
bun socketIn Figma: Plugins > Development > Link existing plugin > select
src/figma_plugin/manifest.jsonRun the plugin in Figma and click Connect. The MCP server auto-joins on the first tool call.
Claude Code Setup
Figmagent ships as a Claude Code plugin — installing it registers the MCP server and the bundled Figma skills, sub-agents, and the /figmagent:reauth command in one step, available across all your projects (no per-project .mcp.json).
Install straight from GitHub — the repo is its own plugin marketplace (.claude-plugin/marketplace.json), and the repo root is the plugin (.claude-plugin/plugin.json, commands/, skills/, agents/, .mcp.json):
/plugin marketplace add dabowman/Figmagent
/plugin install figmagent@figmagentOr from a local clone, if you're developing on it:
/plugin marketplace add /absolute/path/to/cursor-talk-to-figma-mcp
/plugin install figmagent@figmagentRequires Bun on your PATH. .mcp.json runs the server via bun ${CLAUDE_PLUGIN_ROOT}/src/figmagent_mcp/server.ts; Bun resolves the dependencies on first run, so no bun install step is needed for plugin use (run it only when working on the repo itself).
Reload, and mcp__Figmagent__* tools, the /figmagent:reauth command, and the Figma skills/sub-agents are available everywhere. Update with /plugin marketplace update figmagent then /plugin update figmagent. Releases are cut nightly by the auto-improve pipeline (see CHANGELOG.md and GitHub Releases); a new version must be released before /plugin update picks up merged changes, because Claude Code pins a plugin to its plugin.json version and keeps the cached copy until that number changes.
Manual MCP registration (alternative, no plugin): if you only want the MCP server (not the bundled skills/commands), register it directly — but then skills and /figmagent:reauth are not installed:
claude mcp add Figmagent -- bun /path-to-repo/src/figmagent_mcp/server.tsCursor Setup
Add to your MCP configuration:
{
"mcpServers": {
"Figmagent": {
"command": "bun",
"args": ["/path-to-repo/src/figmagent_mcp/server.ts"]
}
}
}Windows/WSL
Uncomment the hostname: "0.0.0.0" line in src/socket.ts to allow connections from the Windows host.
Transport selection
Select with the FIGMA_TRANSPORT env var on the MCP server process:
auto(default) — plugin when the local relay is reachable, otherwise remote when a cached OAuth token exists (~/.figmagent/auth.json), otherwise pluginplugin— local relay + Figma plugin, alwaysremote— Figma's official MCP (mcp.figma.com), always; full read + write command surface, atomic per-script execution (a failed write rolls back entirely; oversizedwritepayloads are chunked at depth-1 with a per-chunk rollback note)
First-run OAuth: on the first remote command the server prints an authorization URL to stderr (and tries to open your browser), then waits up to 5 minutes for the redirect on a local loopback port. Approve in the browser; tokens are saved to ~/.figmagent/auth.json (0600) and refreshed automatically. Headless machines: open the printed URL anywhere, then complete the redirect from a browser that can reach 127.0.0.1 on that machine.
Re-authenticating: if commands start failing with an authorization error or "you don't have edit access" (usually the stored token belongs to the wrong Figma account), run the /figmagent:reauth slash command (Claude Code) or call the reauthenticate tool directly — no need to hand-edit ~/.figmagent/auth.json. It clears the cached token, reopens the browser login so you can pick an account with editor access, and reports which account is now authenticated. (use_figma runs every command — reads included — as a script in the file's VM, so the authenticated account must be an editor on the file.) Note: because Figmagent is a stdio MCP server doing its own OAuth, it can't surface a "Reauthenticate" entry in Claude Code's /mcp menu — that menu is reserved for remote HTTP servers whose OAuth Claude Code manages.
Selecting a file: the remote transport has no channels. Pass a Figma file URL (or bare fileKey) to use_file, or set FIGMA_FILE_KEY. Override the endpoint with FIGMA_MCP_URL if needed.
Parity harness: bun scripts/parity-check.ts --file <figmaUrl> [--channel <relayChannel>] runs the read suite (add --battery for the representative 8-variant build A/B) on both transports against the same file, diffs normalized outputs, and prints per-command latency. Measured (2026-06-11, 13-command suite + battery): identical outputs and call counts on both transports; remote ~0.8–2.5s/call vs plugin ~5–75ms/call — remote trades per-call speed for zero local setup and atomic rollback.
Related MCP server: figma-rest-mcp
Tools (39)
The core tools mirror Claude Code primitives (read, grep, edit, write) but operate on Figma nodes, not files.
Core
Tool | Description |
| Select the working file: relay channel (plugin transport) or Figma URL/fileKey (remote transport) |
| Read Figma nodes and subtrees in FSGN (YAML). No |
| Search Figma nodes by regex pattern or criteria: |
| Modify existing nodes: fill, stroke, corner radius, opacity, font, layout, variables, text/effect styles, variant swap, exposed instances — plus x/y move, rename, reorder ( |
| Create nodes from a spec — single or nested tree. Types: FRAME, TEXT, RECTANGLE, COMPONENT, INSTANCE, SVG. |
| Scan a subtree for unbound properties, match against variables (CIE76 deltaE for colors), auto-fix exact matches |
| Export a node as PNG, JPG, SVG, or PDF |
| Get the user's current selection |
| Escape hatch (remote transport only): run a raw Plugin API script with the |
Files & Navigation
Tool | Description |
| Create a blank Figma file and target it (remote transport only) |
| Select and scroll to a node |
| Select multiple nodes |
Components & Instances
Tool | Description |
| List component sets and standalone components, with variant axes |
| Combine components into a COMPONENT_SET (auto-layout enabled) |
| Batch add/edit/delete/bind property definitions. |
| Extract overrides from an instance |
| Apply overrides to target instances |
| Get variants for a component set |
Design Tokens & Styles
Tool | Description |
| Get all styles and variables in one call |
| Create variable collections, modes, and variables (COLOR, FLOAT, STRING, BOOLEAN) |
| Update values, rename, or delete variables |
| Create paint, text, effect, and grid styles in batch |
| Update, rename, or delete styles |
| Convert DTCG design token JSON to |
Library (REST API)
Requires FIGMA_API_TOKEN environment variable.
Tool | Description |
| Browse library component catalog |
| Search library components by name |
| Import and instantiate a library component |
| Batch import multiple library components in parallel |
| Get design token variables from a library |
Annotations
Tool | Description |
| Get annotations from nodes (single, batch |
| Create or update an annotation |
| Batch create/update annotations |
Prototyping & Connections
Tool | Description |
| Get prototype reactions from nodes |
| Set default connector style |
| Create connector lines between nodes |
Comments (REST API)
Requires FIGMA_API_TOKEN with file_comments:read and file_comments:write scopes.
Tool | Description |
| Read file comments |
| Post a comment or reply |
| Delete a comment |
Session
Tool | Description |
| Export session log (tool call metrics, errors, timing) for analysis |
Renamed, folded & retired (since the surface reshape)
MCP tool names changed; wire-protocol command names are unchanged.
Old tool | Now |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| folded into |
| folded into |
| retired — |
| retired — |
MCP Prompts (6)
Prompt | Description |
| End-to-end workflow for reading, creating, and modifying Figma designs |
| Strategy for finding and replacing text content |
| Guide to building components, variants, and instances |
| Converting manual annotations to native Figma annotations |
| Transferring overrides between instances |
| Converting prototype reactions to connector lines |
Development
bun install # Install dependencies
bun socket # Start WebSocket relay (port 3055)
bun run build:plugin # Bundle Figma plugin (src/ → code.js)
bun run test # Run tests
bun run lint # Lint with Biome
bun run lint:fix # Auto-fix lint + format
bun run check # Lint + format checkReleases
bun run release --dry-run # preview the next version and its CHANGELOG section; writes nothing
bun run release # patch release — what the nightly pipeline runs
bun run release --minor # or --major, by hand, to mark a milestoneA release bumps package.json and .claude-plugin/plugin.json in lockstep, prepends a section to CHANGELOG.md, commits chore(release): vX.Y.Z, tags vX.Y.Z, pushes main and the tag, and creates a GitHub Release with that section as notes. The gate: a clean main checkout with no .pipeline.paused file, a green CI run for HEAD (checked with gh), and at least one change outside .claude/analysis/, .claude/plans/ and CHANGELOG.md since the last v* tag — analysis-only nights do not release. --force skips that last check (never the CI one); --no-push keeps everything local for testing on a clone; AUTO_IMPROVE_RELEASE=0 disables the nightly cut.
Architecture
The MCP server is modular (src/figmagent_mcp/):
server.ts— entry pointtools/— domain-grouped tool registrations (document, create, apply, components, find, scan, tokens, lint, libraries, comments, export)prompts/— AI prompt definitionsconnection.ts— WebSocket management and channel auto-discoverytypes.ts,utils.ts— shared types and utilities
The Figma plugin source lives in src/figma_plugin/src/ as ES modules, bundled into code.js via bun run build:plugin. It includes concurrency control (node-level locks, global mutex, max 6 concurrent operations) for safe parallel agent execution.
See CLAUDE.md for detailed agent guidance, design patterns, and known gotchas.
License
MIT — see LICENSE
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
The Figma MCP server brings Figma design context directly into your AI workflow.
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
Access and maintain design system docs, tokens, components, skills, and contexts across any project.
Lets your AI build and edit websites and apps in Xodia, an AI builder and visual editor for real code (Vite, React, Tailwind CSS or plain HTML in your own git repo): read and write site files, create pages and CMS collections, make database tables and visitor sign-in on the built-in Xodia database or your own Supabase, write server tasks, run typecheck, design, link and security checks, take screenshots, manage forms and translations, and pick up change requests the user sends from the visual editor. 67 tools. Sign in once with your Xodia account (OAuth). Free plan, no card needed. Setup: https://xodia.ai/ai/mcp
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to read and write Figma designs through a local WebSocket relay, turning Figma selections into framework-aware code and building/editing designs directly on the canvas. Provides 112 MCP tools for bidirectional design-code workflows with support for any MCP client.MIT
- AlicenseBqualityCmaintenanceEnables deterministic, headless access to Figma design files from AI agents and CI workflows using a personal access token, with tools for design snapshots, node search, text extraction, variables/tokens, and project discovery.41MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, analyze, and modify Figma designs, including bulk style updates, accessibility audits, comment triage, and code generation from designs.844 npmMIT
- AlicenseCqualityBmaintenanceEnables AI agents to read and edit a live Figma file through a local plugin bridge, with no API token or rate limits. Provides 85 tools for inspecting design context, creating and modifying nodes, managing styles and variables, and exporting screenshots, tokens, and SVG.85MIT