grafta
Provides tools for opening, inspecting, editing, rendering, and saving Figma files locally, covering Figma Design (.fig), Figma Slides (.deck), FigJam (.jam), and Figma Sites (.site). Supports reading and modifying nodes, colors, variables, components, slides, stickies, and layouts, plus rendering previews and exporting PDFs without requiring a Figma account or API.
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.
What is it? A free, open-source tool your AI app uses: Claude, Cursor, Codex and others. It connects through MCP, the way AI apps connect to tools. It reads a Figma file on your computer exactly, so your AI works from the real values and never guesses. With grafta's panel open in Figma's desktop app, it works on the file you have open too, and you see each change as it is made.
What is a .fig? A Figma file. In Figma: File → Save local copy… Somebody may also just send you one. Slides, FigJam and Sites files work too.
Is it for me? If you have a Figma file and an AI app. A designer changes it, a developer turns it into code, and someone who was sent it asks what it is.
Try it
Install grafta in your AI app.
Get a file: yours, or this sample, the card in the video.
Ask, in words:
Using grafta, what's in order.fig?
Make it light, and check the contrast.
Now turn it into code.
In Claude Desktop, say where the file is, like ~/Downloads/order.fig. A file uploaded to the chat lives in Claude's cloud, so Claude copies it to a folder on your Mac that you allow, and grafta opens it there.
No AI app at hand? Open a Figma file in your browser: its pages and screens, PNGs and design tokens, with grafta running in the page and nothing uploaded.
grafta never writes over your file: it saves a new one, and reads it back before it says it is done. Open it in Figma to see it. How good the code is depends on your AI: grafta gives it exact values, and writes no code itself.
Related MCP server: @echobt/figma-mcp
Install
Where | Run | Needs |
Claude Desktop | download | nothing else |
Claude Code |
| Node.js 18+ |
ChatGPT desktop, Codex |
| Node.js 18+ |
macOS, Linux |
| nothing else |
Homebrew |
| Homebrew |
Windows |
| nothing else |
npm |
| Node.js 18+ |
Rust |
| Rust |
Claude Desktop installs the bundle from Settings → Extensions when you open it; no terminal and no Node.js. The binaries are not signed: if macOS says it cannot check grafta the first time it runs, allow it in System Settings → Privacy & Security. If something does not work, Troubleshooting goes by what you see.
The Claude Code plugin registers the server and teaches the model how to use it. Anywhere else, register it once:
claude mcp add grafta -- grafta mcpOr, in a client configured with JSON:
Client | File | Configuration |
Cursor |
|
|
Windsurf |
| the same as Cursor |
Claude Desktop, by hand |
| the same as Cursor |
VS Code |
|
|
With grafta installed by the script, Homebrew or Cargo, "command": "grafta", "args": ["mcp"] does the same without npm.
Prebuilt for macOS (Apple silicon and Intel), Linux (x86_64 and arm64) and
Windows (x86_64). One self-contained binary. We have run it by hand on a Mac with
Apple silicon; the tests also pass on Linux and Windows in CI. Claude Code, Cursor,
VS Code, Windsurf, Codex and the ChatGPT desktop app start it with npx, which needs
Node.js 18 or newer. We have tried Claude Code and Claude Desktop; the others use the
same setup. ChatGPT on the web reads no local server, so it cannot use grafta yet.
In Figma
To work on the file you have open in Figma's desktop app, add grafta's panel to Figma once. grafta must be installed in your AI app as above, the same release as the panel.
Download
grafta-figma-plugin.zipand unzip it.In Figma's desktop app: Plugins → Development → Import plugin from manifest…, and choose the
manifest.jsonin that folder.Open a file, then Plugins → Development → grafta. The panel looks for grafta on your computer.
With your AI app running grafta, the panel finds it and asks whether to allow it. Click Allow: it does not ask again on this computer.
Then ask about what you have open:
Using grafta, what have I selected in Figma?
Make the selected card's corners 12 and its title bold.
Each change shows in the file as it is made, and Figma saves it: each call
grafta makes is one step of Edit → Undo. The panel gathers the calls of each
request and shows each one before and after, with Revert this request to put it all back. Choose
Ask me first to apply or skip each change yourself, protect the layers the AI must not touch,
and Stop refuses every call until you press Resume. It talks to grafta on your computer and to nothing
else. A few tools are not there yet, such as export_pdf and check_contrast:
the tool reference says, for each, what it does on the open file.
Figma in a browser has not been tried.
Why
A model is good at reading intent into a design and deciding what to build. It
is bad at binary formats, and it guesses numbers. grafta is the opposite. It gives your model 45 tools
to open a .fig, read every node, colour, variable and component in it, change
it, draw it to check, and save a new file that Figma opens.
Four products
The same tools open, read, draw and save every file Figma saves, and each product's files were opened in that product to prove it.
Product | File | What grafta speaks |
Figma Design |
| screens, components and variants, variables with modes, styles, auto-layout, rich text, images, vectors |
Figma Slides |
| slides in their grid, speaker notes, templates; transitions and object animations, kept when slides move |
FigJam |
| stickies, shapes with text, connectors between nodes, sections, tables, stamps |
Figma Sites |
| a site's pages by route, each holding its breakpoints; inside a breakpoint, every tool works as on a frame |
See it
The same frame, three times. Each picture is grafta's own render_node; every
change between them is a tool call a model would make
(58 of them).
A draft | Designed | Dark mode |
frames and text | 9 colour variables, Lucide icons, auto-layout | one property on the frame: |
From Figma to json-render
A screen in a Figma file, written as a json-render spec, the JSON an AI writes and json-render draws with your components. Left, the Edit profile dialog in the shadcn/ui Figma kit; right, the spec your AI wrote from it with grafta, drawn by json-render's shadcn components.
In Figma | Drawn by json-render |
How, step by step, and what does not match: From Figma to json-render.
How a model works with it
Results are bounded: when something is left out, the result says so under
omitted and how to get it. Nothing is truncated silently.
What to ask
Prompts that work as written. The model chooses the tools.
Job | Ask | Tools it reaches for |
Understand it | Open handoff.fig with grafta. What's in it, how is it organised, and which colours and components does it use? |
|
Turn it into code | Open checkout.fig with grafta. Build the payment screen in our stack, with the file's exact sizes, colours and icons. |
|
A json-render spec | Using grafta, open shadcn.fig and write the dialog as a json-render spec for @json-render/shadcn's catalog. (guide) |
|
Dark mode | Open app.fig with grafta. Turn the colours on the Settings screen into Light and Dark variables, bind every fill to them, render both modes, and save as app-dark.fig. |
|
Design-system audit | Open library.fig with grafta. List its components, variables and styles, and tell me which colours are used on screens without being a variable or a style. |
|
Design tokens | Open library.fig with grafta and export its variables as design tokens into tokens/. (W3C Design Tokens, a file per mode, as Figma imports them) |
|
Accessibility | Open checkout.fig with grafta and check every screen's text contrast against WCAG AA. Fix what fails with the file's own colours, and show me before and after. |
|
Screens from data | Open shop.fig with grafta. Place the Product card component once per row of products.csv in a wrapping grid, with each row's name, price and photo. |
|
HTML to layers | Import page.json, a snapshot of our landing page, into a new page of site.fig with grafta. |
|
A deck | Open pitch.deck with grafta. Add three slides after the title with our Q3 numbers, a fade between them, and speaker notes; then export every slide as one PDF. |
|
In CI, without a model: grafta tool --batch with open_file then export_tokens writes the same files from a .fig in the repository.
What it can do
Job | Tools | |
Find your way |
| pages, a page's screens (a deck's slides, a site's breakpoints), counts, nodes by name or type, with their path |
Read |
| a node exactly, in the Figma plugin API's names |
See |
| a frame as a PNG, unsaved edits included, in its variable mode; frames as a vector PDF, a page each; every text's WCAG AA contrast against what is drawn behind it |
Draw |
| frames, rich text, shapes, SVG icons, instances |
Import |
| a web page's layout as frames, text, images and auto-layout, from a snapshot a browser takes (below) |
Change |
| fills, strokes, effects, auto-layout, sizing, constraints, images, order |
Design system |
| components, variants and their properties; a component placed once per row of JSON or CSV |
Tokens |
| collections with modes (Light, Dark), aliases, bindings; exported as W3C Design Tokens, a file per mode, as Figma imports them |
Styles |
| colour, text and effect styles |
Save |
| a new file from nothing, or the open one with its edits |
Every tool, with its arguments, is in the tool reference,
generated from the server's own tool list
(on the website); grafta tool
lists them in a terminal.
Why it can be trusted
Promise | What it means |
Exact | every figure is read from the file's bytes: no heuristics, no model, no network |
Says what it left out | a cut result names what is missing; a picture names what it drew approximately |
Does not write over your files |
|
Survives restarts | unsaved edits are journaled as they are made ( |
Refuses rather than breaks | it will not delete a node something points into, or write what Figma would repair; it says why |
Limits
It does not interpret designs. Your model does. grafta answers what is in the file, and writes what it is told.
On a file, it is not live. You work on a saved copy, and open the new file it gives back. For the file you have open, add grafta's panel to Figma's desktop app, or use Figma's own server.
How good the code is depends on your model. grafta gives it exact values, and writes no code itself. Figma's server and Framelink also serve design to code, from a Figma link, with an account.
It is not affiliated with Figma, and reads and writes its format with no help from it.
It works on files, and with its panel on the file open in Figma's desktop app, not Figma's cloud:
.figfrom Figma Design,.deckfrom Figma Slides,.jamfrom FigJam and.sitefrom Figma Sites. Save a local copy, and open the result in Figma.new_filetakes Figma's format from a.figyou have; grafta does not ship it.Pictures are close, not Figma's. They use the fonts installed on your machine: with the design's font installed, most lines lay out within 2% of Figma's width; without it, a stand-in is used and the caption says so. Install the font and restart the server.
An open file costs memory, far more than its size: on one Mac, a 57 MB file took 1.3 GB while open and an 86 MB one 5.5 GB. Close what you are done with.
Not yet: auto-layout grids, component slots, boolean operations, directional transitions and mouse enter and leave in a prototype written (they are read), Dev Mode annotations, and component properties on variants.
Only grafta's own variables and styles can be changed. The file's existing ones are read and bound to, not edited.
From a web page
import_layout turns HTML into an editable design: flexbox becomes auto-layout,
sized fill, hug or fixed as the browser measured it. grafta runs no browser; a
browser takes a snapshot of what it laid out, and grafta reads that.
curl -fsSLO https://n0ss4.github.io/grafta/snapshot.sh && curl -fsSLO https://n0ss4.github.io/grafta/snapshot.js
sh snapshot.sh page.html page.json 'main' # headless Chrome; a CSS selector picks the partOr, in any browser console or a model's browser tool, paste
snapshot.js and run copy(JSON.stringify(graftaSnapshot('main'))).
Then ask the model to import page.json. What does not map (a gradient, a
transform, an inline SVG, a remote image) is listed, not guessed.
From a terminal
The same tools, without a model:
grafta tool # list the tools
grafta tool read_node # what one takes, with an example
grafta tool open_file '{"path":"design.fig"}' # call one: each call starts afresh
grafta tool --batch calls.json # a sequence on one open fileA batch is a JSON array of { "tool", "args", "out"? }; "$0.handle" in an
argument is call 0's result field, and "out" writes a picture to a file. The
showcase is one.
FAQ
Do I need a Figma account or an API key? No. grafta works on the file on your disk. You need Figma only to save a local copy and to open the result, or, for the file you have open, Figma's desktop app with grafta's panel.
Does my file leave my machine? grafta makes no network call, and its panel in Figma talks to grafta on your computer and to nothing else. What your model reads through it is a tool result like any other, sent wherever your MCP client sends the conversation.
Can it break my file? It does not write over one: save_as refuses a path
that exists and reads back what it wrote. It refuses what Figma would have to
repair, and unsaved edits survive a restart.
Which clients and models? Any MCP client over stdio (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf…) with any model it runs.
Is it affiliated with Figma? No. It is free and open source, under the MIT licence.
Contributing
How it is built (ARCHITECTURE), where it is going (ROADMAP) and how to work on it (CONTRIBUTING). What changed is in the CHANGELOG; report a vulnerability as SECURITY says.
MIT licence. Not affiliated with Figma.
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.
Read-only design skills, components and tokens from your Alpy library for any AI agent.
Give AI agents your deeepSpace design system: components, tokens, styles and code mappings.
Access and maintain design system docs, tokens, components, skills, and contexts across any project.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI assistants to read, analyze, and modify Figma designs, manage design tokens, and create prototype connections, all while keeping data local.63267 npm10MIT
- AlicenseBqualityDmaintenanceEnables offline reading and rendering of Figma .fig files, allowing AI agents to extract design specs, export assets, and generate code without needing the Figma API or network access.262MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI tools to read, edit, check, and export the currently open Figma file locally, with support for design files, FigJam boards, and Slides decks plus quality checks and design-to-code workflows.1MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to read and edit the file currently open in Figma Desktop through a local development plugin, supporting node inspection, JSON/image exports, and arbitrary Plugin API scripts without REST API rate limits.77 npmMIT