Figtional MCP
Provides Figma-compatible MCP tools and a subset of the Figma Plugin API for reading and editing local Figma .fig export files, including text, colors, variables, components, auto layout, and pages, plus a read-only web viewer.
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.
Figtional MCP
Figtional MCP is a local MCP server that lets AI agents read and edit Figma .fig export files as if they were connected to Figma, but limited to the files you choose.
The official Figma MCP server gives an agent access to every file in your Figma account. Figtional works on local .fig exports instead: you export the file(s) you want to share, point Figtional at them, and the agent sees only those files. Nothing leaves your machine.
Use it to:
Practise working with Figma MCP in a safe environment. The tools have the same names, parameters and behaviour as Figma's, so what you learn carries over.
Edit Figma files locally with an AI agent, then import the result back into Figma.
It also includes a read-only web viewer that shows .fig files the way Figma does, with pages, layers, an inspect panel and a prototype preview.

Status: version 0.3.0, early development, usable for testing. See CHANGELOG.md for what's in each version. All of Figma MCP's read tools work, the viewer works, and
use_figmasupports a growing subset of the Plugin API for editing (see Limitations). The roadmap is in PLAN.md.
Contents
Related MCP server: figsnap-mcp
Features
Figma-compatible MCP tools:
whoami,get_metadata,get_design_context(React + Tailwind or HTML/CSS),get_screenshot,get_variable_defs,search_design_system,get_libraries,get_code_connect_map,create_design_system_rulesanduse_figma, with the same names and parameters as the official Figma MCP server, so existing prompts and Figma's own agent skills keep working.Editing through Figma's Plugin API (
use_figma): frames, auto layout, shapes, text, pages, variables and modes, styles, images, SVG icons and vectors, components with properties and variants. Changes are saved straight to the.figfile, which you can import back into Figma.Explicit scope: one file, a list of files, or a folder of
.figfiles. Nothing else is visible to the agent, and files are read-only unless you allow edits.Library support: library components, styles and variables that Figma embeds in the export work normally.
Web viewer: pages, layers, an inspect panel, prototype arrows and a click-through preview. It reloads when an agent changes the file.
Fully local: no Figma account, no network access. Runs on Windows, macOS and Linux.
Quick start
1. Prerequisites
You need | Version | Check with |
22.15 or newer (the LTS version is fine) |
| |
An MCP-capable AI client | e.g. Claude Code, Claude Desktop, Cursor or VS Code with GitHub Copilot | |
A Figma account | only to export | |
only to install from source |
|
Optional: install the fonts your designs use. Text that hasn't been edited always looks right, but edited or new text is measured and drawn with the fonts on your machine (missing fonts fall back to a basic font).
2. Install
Pick one. Releases from 0.1.1 on have the downloads under Assets on the Releases page.
A. Download (no command line needed)
Download
figtional-<version>.zip. The same zip works on Windows, macOS and Linux.Unzip it somewhere permanent, for example in your Documents folder. Your AI apps run Figtional from there, so if you move the folder later, run the setup again.
Run the setup:
Windows: double-click
Set up Figtional.cmd.macOS: double-click
Set up Figtional.command. If macOS won't open it, right-click it, choose Open, then Open again.Linux: run
./figtional setupin the folder.
Answer its questions: which folder holds your
.figfiles (the agent can open nothing else), whether the agent may edit them, and which apps to connect. It finds Claude Code, Claude Desktop, Cursor and VS Code and adds Figtional to each one you choose, keeping a.bakcopy of any settings file it changes.Restart the apps you connected (in Claude Code, start a new session) and continue with step 3.
B. Claude Desktop extension
Download figtional-<version>.mcpb and double-click it, or drag it to Settings → Extensions in Claude Desktop. Choose your designs folder and whether Claude may edit the files, then enable the extension. Figtional needs Node.js 22.15 or newer. If the extension doesn't start because Node.js is too old, install the current LTS version from nodejs.org, and if Claude Desktop has the option Use Built-in Node.js for MCP (Settings → Extensions → Advanced settings), turn it off.
C. From source (for development, or the latest unreleased changes)
git clone https://github.com/JoelSaarimaki/figtional-mcp.git
cd figtional-mcp
npm install
npm run build
npx figtional setupnpx figtional works anywhere inside the repository folder; npx figtional --help lists the commands. The setup connects your apps to this clone. After pulling new changes, run npm install and npm run build again. The main branch always holds the latest release; development has the changes for the next one.
Next to the agent, open the web viewer. It shows your
.figfiles the way Figma does and updates within a couple of seconds whenever the agent changes one, so you can see what an edit actually did. It comes with every install option except the Claude Desktop extension: extension users can download the zip as well and use it only for the viewer (no setup needed).
3. Export a .fig file from Figma
In Figma, open the file and choose Main menu → File → Save local copy…. Put the .fig file in a folder of its own, for example C:\designs\ or ~/designs/. If the file uses shared libraries, the parts it uses are included in the export.
To bring edits back into Figma later, drag the edited .fig into the Figma file browser (or use Import). This creates a new Figma file: comments, version history and links to the original file are not carried over.
4. Connect your AI agent
figtional setup (step 2) does this for you. This section is for doing it by hand, or for clients the setup doesn't know.
Figtional is an MCP server that talks over stdio: the AI client starts it as a command. Every client needs the same three things:
command:
nodeargs: the full path to Figtional's script, then
mcp, then the files or folders the agent may use. Add--writableto allow edits,--recursiveto include subfolders. The script islib/figtional.mjsin the downloaded folder, orpackages/cli/dist/bin.jsin a clone of the repository.Use absolute paths. In JSON on Windows, write paths with forward slashes (
C:/Users/me/designs) or doubled backslashes.
figtional setup --print <folder> prints the exact command and JSON for your computer without changing anything. The examples below use these placeholders; replace them with your own paths:
/path/to/figtional-mcp/packages/cli/dist/bin.jsis the script (see above), e.g.C:/Users/me/Documents/figtional-0.3.0/lib/figtional.mjs./path/to/designsis the folder with your.figfiles.
Keep the real Figma MCP server switched off while you practise with Figtional, so the agent can't reach your Figma account through it. Both servers use the same tool names, so with both connected the agent could pick either.
Claude Code
From the folder you want to work in:
claude mcp add figtional -- node /path/to/figtional-mcp/packages/cli/dist/bin.js mcp --writable /path/to/designsOr add a .mcp.json file to the project folder, which you can share with your team:
{
"mcpServers": {
"figtional": {
"command": "node",
"args": ["/path/to/figtional-mcp/packages/cli/dist/bin.js", "mcp", "--writable", "/path/to/designs"]
}
}
}Start Claude Code in that folder and check the connection with /mcp (a server from a shared .mcp.json asks for approval first). If you also install Figma's official Claude Code plugin for its skills (figma:figma-use, figma:figma-design-to-code, …), disable its Figma MCP server for this project, as noted above; the skills then guide the agent while it uses Figtional's tools.
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude Desktop:
{
"mcpServers": {
"figtional": {
"command": "node",
"args": ["/path/to/figtional-mcp/packages/cli/dist/bin.js", "mcp", "--writable", "/path/to/designs"]
}
}
}Cursor
Add the same mcpServers block to .cursor/mcp.json in your project (or to ~/.cursor/mcp.json for all projects).
VS Code (GitHub Copilot agent mode)
Add .vscode/mcp.json to your project:
{
"servers": {
"figtional": {
"type": "stdio",
"command": "node",
"args": ["/path/to/figtional-mcp/packages/cli/dist/bin.js", "mcp", "--writable", "/path/to/designs"]
}
}
}Other clients
Any MCP client that can start a stdio server works with the same command and arguments.
First prompts to try
"Use the figtional MCP server. Call
whoamiand list the pages of my file withget_metadata.""Implement the frame called Home as a React component." (uses
get_design_contextandget_screenshot)"With
use_figma, add a card with a title and a button next to the existing screens."
whoami lists the files the agent can use and their file keys. Agents can also use Figma-style URLs: https://www.figma.com/design/<file key>/Any-name?node-id=1-4.
5. Watch the files in the viewer
Open a terminal in the Figtional folder (the folder you unzipped, or your clone of the repository) and start the viewer. After serve --open, give it the designs folder, the same one you gave the agent:
.\figtional.cmd serve --open "C:\path\to\designs" # Windows, in the unzipped folder
./figtional serve --open ~/path/to/designs # macOS / Linux, in the unzipped folder
npx figtional serve --open /path/to/designs # in a clone of the repositoryOpening a terminal there: on Windows, right-click the Figtional folder in File Explorer and choose Open in Terminal. On macOS, right-click it in Finder and choose Services → New Terminal at Folder, or type
cd(with a space) in Terminal, drag the folder into the window and press Return.Windows: keep the
.\in front offigtional.cmd. Windows' default terminal (PowerShell) needs it, and it also works in Command Prompt. Put quotes around paths with spaces.From any folder:
figtional setupends by printing the viewer command with full paths for your folders. That command works without changing to the Figtional folder first.
This opens http://127.0.0.1:3846 in your browser. Keep the terminal open while you use the viewer; Ctrl+C stops it.
The viewer and the agent run side by side. The MCP server (started by your AI app, or the Claude Desktop extension) and the viewer are separate programs that read the same files, so you can start them in any order and keep both running. Only the MCP server changes files; the viewer never does.
Automatic updates. Every 2 seconds the viewer checks whether the open file changed on disk. When the agent saves an edit, the viewer reloads the file and keeps the page and selection you were looking at. (It pauses while the browser tab is hidden and catches up when you return.)
New files that appear in the folder show up in the file switcher after you reload the browser page.
Edit copies: if you run the MCP server with
--out <folder>, the edits are saved in that folder, so point the viewer at it to see them.
Using the MCP server
Choose what the agent can access when you start the server: one file, several files, or every .fig file in a folder.
figtional mcp ./designs/App.fig # one file, read-only
figtional mcp ./designs/App.fig ./designs/Marketing.fig # specific files
figtional mcp ./designs/ # every .fig directly in the folder
figtional mcp --recursive ./designs/ # ...and in its subfolders
figtional mcp --writable ./designs/App.fig # allow edits
figtional mcp --writable --out ./edited ./designs/App.fig # save edits to copies in ./edited
figtional mcp --extra-tools ./designs/ # also enable Figtional-only helper tools(Inside the repository use npx figtional …; elsewhere node /path/to/figtional-mcp/packages/cli/dist/bin.js ….)
Scope. Nothing outside the given files and folders is reachable. Folder contents are checked on every use, so
.figfiles added later appear automatically. Symlinks pointing out of the folder are ignored.Read-only by default.
--writableallowsuse_figmaedits. Each saved edit keeps the previous version as<file>.fig.bak, or use--out <dir>to leave the originals untouched.File keys. A file's key is its file name as a slug (
My App.fig→my-app). Files from subfolders get the folder in the key with--(archive--old-landing).Extra tools.
--extra-tools(or--extra-tools=figtional_find_nodes,…) adds Figtional-only tools:figtional_list_files,figtional_list_pages,figtional_find_nodes,figtional_get_node_json. They're off by default so the tool set matches Figma MCP's.Assets.
get_design_contextserves the images and vector exports it references from a local asset server onhttp://localhost:3845(or a free port), as Figma's desktop MCP server did. It only serves assets from files in scope.
You can also put the sources in a config file and start with figtional mcp --config figtional.config.json:
{
"sources": [
{ "file": "./designs/App.fig", "key": "app", "writable": true },
{ "file": "./designs/Marketing.fig" },
{ "dir": "./designs/archive", "recursive": true }
],
"outDir": "./edited",
"extraTools": false
}Relative paths in the config file are relative to the config file.
Editing with use_figma
With --writable, the agent sends Plugin API code, exactly as with Figma MCP:
await figma.loadFontAsync({ family: "Inter", style: "Semi Bold" });
const card = figma.createAutoLayout("VERTICAL", { itemSpacing: 12, paddingLeft: 24, paddingRight: 24 });
const title = figma.createText();
title.fontName = { family: "Inter", style: "Semi Bold" };
title.characters = "Hello";
card.appendChild(title);
return { id: card.id };Saved immediately. Each successful call is saved to the file (or to
--out), as Figma applies edits live.All or nothing. A call that throws changes nothing. (Figma can leave partial edits behind; Figtional doesn't.)
Laid out like Figma. Text is measured with your installed fonts and auto layout is recalculated immediately, so sizes read in the same script, screenshots and the viewer show the result. Figma recalculates text layout itself when you import the file.
Supported:
frames, auto layout and layout sizing,
rectangles, ellipses (with arcs and rings), lines, polygons and stars,
groups (
figma.group,ungroup), boolean operations (union,subtract,intersect,exclude) andflatten,text (content, fonts, sizes, ranges, truncation with
maxLines),fills, strokes (caps, dashes), effects, corner radii and smoothing, layout grids,
pages,
variables (collections, modes, values, binding to fills and spacing) and explicit modes per frame (e.g. light and dark),
paint, text, effect and grid styles: creating, applying (
set*StyleIdAsync), editing and removing,new images (
figma.createImage,createImageAsyncwithdata:URLs) and image fills,SVG import (
figma.createNodeFromSvg) and vectors (createVector,vectorPaths,vectorNetwork),components and instances, component properties (text, boolean, instance swap), variants (
combineAsVariants,setProperties) anddetachInstance,text, visibility and fill changes inside instances,
instance
overrides,resetOverrides()and swappingmainComponent,plugin data (
setPluginData,setSharedPluginData),exportAsync(PNG, SVG),getCSSAsync,node.query(),node.set()andnode.screenshot().
Figma's rules and error messages are copied, for example "load fonts before editing text".
Unsupported calls fail with
NotSupportedInFigtional: …. That's a Figtional limitation, not necessarily a Figma one.
The web viewer
figtional serve # every .fig below the current folder
figtional serve ./designs/ # a folder (subfolders included)
figtional serve ./designs/App.fig # one file
figtional serve --port 4000 ./designs/Top bar: file switcher, page selector, zoom, the Prototype toggle (connection arrows) and Present (click through prototype flows; a basic version of Figma's prototype player).
Left: the layer tree. Right: the inspect panel (position, auto layout, fills, text, components, variables, prototype) and a File tab with variables per mode and styles.
Canvas: drag to pan, scroll to move, Ctrl/Cmd + scroll to zoom. Click selects a layer; Ctrl/Cmd-click selects the deepest layer. Shift+1 zooms to fit, Shift+2 zooms to the selection.
Links:
?file=<key>&page=<id>&node-id=1-4, plus&proto=1or&present=1.Read-only, local. It only listens on
127.0.0.1. It can run at the same time as the MCP server, and reloads the open file within about 2 seconds when it changes on disk (see step 5).Without arguments it serves every
.figbelow the current folder. To avoid long scans it refuses drive roots, your home folder and system folders, and stops after 2,000 folders.
Other commands
figtional setup # connect Figtional to your AI apps (see Quick start)
figtional dump App.fig # pages, node counts, format version
figtional inspect App.fig 1:4 # a node as an XML outline; --json for the decoded data
figtional validate App.fig # format version and a byte-for-byte round-trip check
figtional help <command> # help for one command (or: figtional <command> --help)Limitations
Plugin API subset.
use_figmasupports a subset of the Plugin API. Not supported yet: prototype interactions, grid auto layout (layoutMode = 'GRID'), JPG/PDF export,isExposedInstance, FigJam and Slides APIs, and SVG text, images, gradients, masks and filters increateNodeFromSvg(SVG groups are flattened). Boolean operations Figtional creates are drawn from their operands; their exact outline is computed by Figma on import.createImageAsynconly acceptsdata:URLs, because Figtional makes no network requests.Not a sandbox. The
use_figmaruntime (Node'svm) keeps scripts away fromrequire, files and the network by convention, but it is not a security boundary. The access boundary is the file scope you start Figtional with.Rendering. Screenshots and the viewer are visually faithful but not pixel-identical to Figma. Background blur isn't drawn, and angular/diamond gradients are approximated.
Fonts. Text that hasn't been edited is drawn exactly as Figma laid it out. Edited or new text uses fonts installed on your machine. If a font is missing, Figtional falls back to a basic font for measuring and display, but the file keeps the original font, so Figma shows it correctly after import. Because the fallback has different widths, sizes of edited text (and auto layout around it) can differ by a few pixels in Figma;
use_figmaand the screenshot tools add a "Figtional limitation" note whenever this happened.Present mode is basic. It follows clicks, overlays and back/close, but lacks Smart Animate, most transitions, other triggers and Figma's hotspot hints.
What a
.figexport leaves out. "Save local copy" saves the file's design content, not its life in Figma's cloud. Not in the export, so Figtional can't show or edit them:comments and their threads,
version history, and branches other than the one you exported,
sharing, permissions, the team or project the file belongs to, and its URL,
live library connections. Components, styles and variables used from shared libraries are embedded as copies, so they display normally, but library updates don't flow into the
.fig,Code Connect mappings and other Dev Mode integrations,
fonts. Font names are kept, but font files aren't included; text shows correctly where the fonts are installed,
multiplayer state such as cursors and selections.
Kept: pages and layers, components and variants, styles, variables and modes, images, prototype flows, annotations, Dev Mode ready-for-dev statuses, plugin data and export settings.
Importing an edited
.figback into Figma creates a new file. Comments, history and links of the original stay with the original, and library instances only reconnect if you have access to those libraries.
How it works
A .fig export is a ZIP archive containing canvas.fig (Figma's binary fig-kiwi document), meta.json, thumbnail.png and an images/ folder.
Reading. Figtional decodes
canvas.figwith the schema embedded in the file itself and builds a document tree, resolving components, instances, styles and variables.Writing. It re-encodes the document with the same schema, so files round-trip byte for byte and import cleanly into Figma.
What's known about the format is in docs/fig-format.md, and the design is in PLAN.md.
Development
npm install
npm run build # compile all packages
npm test # unit tests (run against the sources; no build needed)
npm run lint
npm run format
npm run package # the release downloads: release/figtional-<version>.zip and .mcpbPackages:
fig-format(file format),fig-model(document, layout, editing),fig-render(SVG/PNG),mcp-server(tools anduse_figma),viewerandcli, all underpackages/.Reference files. Tests that compare against real Figma exports use a local, git-ignored
references/folder (.figfiles with Figma's PNG/SVG exports of their frames). Those tests skip when the files are missing.Branches and releases. Work happens on
development; each merge intomainis a release with a new patch version and avX.Y.Ztag. Pushing the tag makes GitHub Actions build the downloads, test them on Windows, macOS and Linux, and publish them as a GitHub release. Changes are listed in CHANGELOG.md.Contributing. See CONTRIBUTING.md for how to contribute and release, and docs/compat-log.md for Figma import checks.
License
Disclaimer
Figtional is an independent project. It is not affiliated with or endorsed by Figma, Inc. "Figma" is a trademark of Figma, Inc.
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
Design canvas for agents: create, edit, render and export Figma-shaped designs over MCP.
Persistent file storage for AI agents. Save files over MCP, get a link a human can open.
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
A real-time, multiplayer filesystem for agents and humans: shared files, live edits, history.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to access Figma design context, generate code from frames, extract variables, components, and layout data, and create or modify Figma files directly from MCP clients.-
- AlicenseAqualityDmaintenanceEnables coding agents to interact with the currently open Figma file via local MCP tools, including reading the design, extracting nodes as PNG, React, HTML or CSS, editing the canvas when permitted, and sharing saved component sets.3957 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to read and inspect local Figma .fig files entirely offline, exposing document structure, geometry, styles, text, components, variables, and embedded images via MCP tools.1286 npm5MIT
- AlicenseAqualityBmaintenanceProvides read-only Figma design data to AI agents via MCP, supporting local .fig files and browser-based figma.com access without plugins or API tokens.1886 npm1MIT