figma-proxy-mcp
Summary: figma-proxy-mcp is a read-only MCP server that reads Figma through the REST API and returns agent-ready data for Figma → code pipelines.
Inspect nodes as IR —
get_figma_componentreturns a pruned, tokenized, componentized IR with a:root{}CSS-variable block, a ready Tailwind theme, and a component registry;summary:truegives a compact sections + boxes overview,format:"flat", lean:truegives a small flat node list with root-relative coordinates.Browse files and components —
get_figma_file(file tree),get_cached_components,get_component_by_name.Get reference renders —
render_node_pngexports a node as PNG (base64 + image URL) at a chosen scale.Verify your HTML —
verify_renderrenders your HTML in headless Chromium and diffs it against the Figma render, returning SSIM, pixel-diff %, and clustered diff regions (withclip,bg,thresholdoptions).Export vectors —
export_svg,migrate_all_svgs(bulk icon export),list_svg_cache.Connect easily — run via
npxover stdio (Claude Code, Cursor, Claude Desktop) or as a loopback HTTP JSON-RPC server; a hosted mode takes a per-request token and writes only to temp dirs.Stay safe — never writes to your Figma files; a
--checkcommand validates Node, token, and Chromium setup.
Reads Figma files, frames, and components through the Figma REST API and returns agent-friendly data. Provides a normalized IR of a node (sections, boxes, design tokens, CSS variables, and a ready Tailwind theme) in summary or flat/lean form, renders reference PNGs of nodes, exports SVG icons/vectors (with batch migration and cache listing), and browses file trees and cached components. Also includes a render-verification tool that renders agent-written HTML in headless Chromium and diffs it against the Figma render (SSIM, pixel-diff percentage, clustered diff regions). Read-only: never writes to Figma files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@figma-proxy-mcp Get the hero section from this Figma link with a Tailwind theme"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
figma-proxy-mcp
MCP server for Figma → code pipelines. It reads Figma through the REST API and returns data an agent can use directly, instead of the raw Figma tree:
Tool | What it gives the agent |
| Normalised IR of a node: |
| Reference render of a node (PNG, base64 + image URL) |
| Renders your HTML in headless Chromium and diffs it against the Figma render → SSIM, pixel-diff %, clustered diff regions |
| Icon / vector export |
| File tree and component cache |
Free and self-hosted (this package), or hosted with nothing to install: the same server
runs as a pay-per-event Actor on the Apify Store (see apify/README.md).
Read-only: it never writes to your Figma files. Every host it contacts and every file it writes is listed in SECURITY.md.
1. Requirements
Node.js 20+ (https://nodejs.org, LTS). Check with
node -v.A Figma personal access token (next section).
Optional, only for
verify_render: Chromium for Playwright (step 4).
Related MCP server: Figma MCP Server by Bao To
2. Get your Figma token (2 minutes)
Open Figma (web or desktop) → click your avatar → Settings.
Tab Security → Personal access tokens → Generate new token.
Name:
figma-proxy-mcp. Expiration: your choice (90 days is fine).Scopes: File content → Read-only (enough for everything here). Optionally Dev resources → Read-only.
Click Generate token and copy it now. It starts with
figd_and is shown only once.
The token can read every file your account can open. To work with someone else's file, ask them to share it with your Figma account (view access is enough).
3. Connect to your AI tool (npx, recommended)
No clone needed. npx downloads and runs the published package.
Claude Code (run in your project folder):
claude mcp add figma-proxy -e FIGMA_API_KEY=figd_your_token -- npx -y figma-proxy-mcp --stdioAdd --scope project to share the server with your team via .mcp.json, but then
do not put the token in that file: export FIGMA_API_KEY in your shell instead.
Cursor (.cursor/mcp.json or ~/.cursor/mcp.json) / Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"figma-proxy": {
"command": "npx",
"args": ["-y", "figma-proxy-mcp", "--stdio"],
"env": { "FIGMA_API_KEY": "figd_your_token" }
}
}
}Restart the app after editing the config.
Token lookup order: environment variable (the env block above) → .env in the working
directory → .env next to the package. Never commit a real token.
4. Check your setup
FIGMA_API_KEY=figd_your_token npx -y figma-proxy-mcp --checkIt checks the Node version, that the token is set (the value is never printed), that Figma
accepts it (GET /v1/me, only the HTTP status is shown), and whether Chromium is available.
Exit code 0 = ready, 1 = something required is missing.
For verify_render, install Chromium once:
npx playwright install chromiumAlready have Chrome/Chromium and cannot download? Set FIGMA_PROXY_CHROME_PATH to its binary.
5. Alternative: run from a git clone
git clone https://github.com/Semmargl/figma-proxy-mcp.git
cd figma-proxy-mcp
npm install
npx playwright install chromium # only for verify_render
cp .env.example .env # then put your token in .env
npm run checkConnect with the absolute path to proxy-mcp.js:
claude mcp add figma-proxy -- node /ABS/PATH/figma-proxy-mcp/proxy-mcp.js --stdio{ "mcpServers": { "figma-proxy": { "command": "node", "args": ["/ABS/PATH/figma-proxy-mcp/proxy-mcp.js", "--stdio"] } } }The .env next to proxy-mcp.js is found whatever the working directory is.
6. HTTP mode (scripts / agents that start it on demand)
npx -y figma-proxy-mcp # → http://127.0.0.1:4444/mcp (JSON-RPC: initialize, tools/list, tools/call)curl -s 127.0.0.1:4444/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_figma_component","arguments":{"figmaUrl":"<link with node-id>","summary":true}}}'It binds to loopback only. Change with FIGMA_PROXY_PORT / FIGMA_PROXY_HOST.
A request may carry its own token in the x-figma-token header; it is used for that request only.
Hosted mode
FIGMA_PROXY_HOSTED=1 is for running the server as a shared remote service (the Apify Actor uses it).
The token must come with each request (x-figma-token header, or figmaToken query parameter);
FIGMA_API_KEY and .env are ignored. Parameters that point at the server's disk
(htmlPath, figmaPngPath, outDir, outputDir, save, fileName) are hidden and rejected,
everything is written under the OS temp dir only, SVGs and the diff image come back inline, and
the HTML render may load only data: and public https:// resources.
7. Recommended workflow
The server also sends this to MCP clients as instructions on initialize.
Links must contain
node-id: in Figma right-click a frame → Copy link to selection.get_figma_component {figmaUrl, summary:true}: tokens, Tailwind theme, registry, root box, sections withrelativeBox.Per section:
get_figma_component {figmaUrl, format:"flat", lean:true}.Build the markup with the
$--vartokens andrelativeBoxcoordinates.render_node_png {figmaUrl, scale:2}for the reference image.verify_render {htmlPath | html, frameWidth, figmaUrl, scale:2}, fix only the reported regions, repeat until SSIM ≥ threshold (default 0.95).
verify_render needs exactly one of htmlPath (absolute path to a self-contained HTML file) or
html (the document itself as a string, max 5 MB), plus frameWidth (the Figma frame width =
root w from the summary). returnImage:true also returns the diff image (PNG, logical px).
export_svg / migrate_all_svgs with inline:true return the SVG markup instead of a preview / files.
8. Environment variables
Variable | Default | Purpose |
| (required) | Figma personal access token |
| 4 / 12 | Fetch depth for helper scripts |
|
| Base dir for everything the server writes |
|
| Component registry |
|
|
|
|
| Default SVG output dir |
| (Playwright's Chromium) | Use an existing Chrome/Chromium binary |
| 4444 / 127.0.0.1 | HTTP mode |
| unset |
|
| unset |
|
Troubleshooting
Symptom | Fix |
| Add it to the client's |
| Token expired, revoked or wrong: generate a new one. |
| No access to the file, or wrong |
| Use the key from the file URL: |
|
|
| Network/firewall. Behind an HTTP proxy, Node 22.21+/24 needs |
| HTTP mode already running, or set |
Development
npm test # offline smoke tests: stdio + HTTP JSON-RPC, doctor, image diffscripts/capture.js and scripts/inspect-ir.js are dev-only helpers (not in the npm package):
they save a raw Figma response to ./fixtures/ and print IR statistics for it.
Security
See SECURITY.md. Changes: CHANGELOG.md.
License
MIT
Available Tools
9 toolsexport_svgC
Export a specific Figma node as SVG and optionally save it
Inputs: fileId (required), nodeId (required), save, scale, +2 more.
get_cached_componentsB
Get previously fetched Figma components data
Inputs: no named parameters.
get_component_by_nameB
Get a specific Figma component by name from cached data
Inputs: name (required).
get_figma_componentA
Get a Figma node by URL. Returns a deterministic, pruned + tokenized + componentized IR with a :root{} CSS-variable block, a Tailwind theme, and a component registry. Colors/spacing/fonts are already resolved to $--var references — the caller does NOT need to re-match raw RGBA against :root. For large sections, call with summary:true FIRST to get a compact { cssVars, tailwindTheme, registry, sections[] } object (top-level children with bounding boxes) WITHOUT the full node tree; this replaces manual get_figma_file decomposition. Then fetch individual sections (optionally with maxDepth) to build them.
Inputs: figmaUrl (required), lean, prune, format, +5 more.
get_figma_fileC
Get Figma file data by file ID and transform it for development
Inputs: fileId (required).
list_svg_cacheB
List all cached SVG exports
Inputs: no named parameters.
migrate_all_svgsC
Automatically find and export all SVG icons from a Figma file
Inputs: fileId (required), outputDir.
render_node_pngB
Export a specific Figma node as PNG and return base64-encoded image data
Inputs: scale, fileId, nodeId, figmaUrl.
verify_renderA
Visual verification (MEASUREMENT ONLY): render an HTML file with headless Chromium INSIDE this server (does NOT use the user's Chrome / Control_Chrome) and compare it to the Figma design PNG. Returns SSIM (0-1, higher = closer), pixel-diff %, and clustered diff regions (bounding boxes of disagreement, in logical px). Provide the reference PNG via figmaUrl (auto-fetched), figmaPngPath, or figmaPngBase64. Use after generating HTML to objectively check fidelity, then fix only the reported regions — this tool never changes code. Requires npm install + npx playwright install chromium.
Inputs: htmlPath (required), frameWidth (required), bg, clip, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools are clearly distinct by resource and action, such as export_svg vs render_node_png and migrate_all_svgs vs export_svg. The main overlap is between get_figma_file and get_figma_component, though get_figma_component's detailed description and summary-first workflow help clarify its role. Cache tools are also differentiated by whether they list or retrieve by name.
All tool names use consistent snake_case and follow a predictable verb_noun pattern such as list_svg_cache, get_figma_file, export_svg, and verify_render. There are no mixed conventions or confusing abbreviations.
Nine tools is well within the ideal range and each tool appears to serve a distinct purpose in the Figma proxy workflow. The set is neither bloated nor too thin for fetching, exporting, caching, and verifying Figma assets.
The surface covers core workflows: fetching files/components, exporting SVG/PNG, migrating SVGs, using cached components, and verifying renders. Minor gaps exist, such as no explicit cache invalidation or Figma write operations, but these may be outside the server's read-only proxy scope.
Related MCP Connectors
Give your agent a real design system: tokens, measured WCAG contrast, and rules to follow.
Compare Figma designs against live websites and get visual + content QA reports, from inside Claude.
Design canvas for agents: create, edit, render and export Figma-shaped designs over MCP.
UI design from prompts, screenshots, and URLs for AI coding agents and theme tokens.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to interact with Figma to create, read, and manage designs using the Figma REST API and a dedicated plugin. It supports advanced features like UI generation from text, webpage reconstruction in Figma, and design token synchronization with codebases.20MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to extract design systems, analyze components, and maintain design-code consistency from Figma files, providing intelligent component analysis and accessibility compliance.103 npm27MIT
- AlicenseNot gradedqualityDmaintenanceEnables seamless integration with Figma API for extracting design tokens, generating production-ready code in multiple frameworks, capturing screenshots, and managing design assets directly from Figma.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, analyze, and modify Figma designs, including bulk style updates, accessibility audits, comment triage, and code generation from designs.842 npmMIT