Skip to main content
Glama
figma-proxy-mcp

figma-proxy-mcp

by Semmargl

figma-proxy-mcp

MCP server for Figma → code pipelines. Reads Figma through the REST API and returns agent-friendly data instead of the raw Figma tree:

Tool

What it gives the agent

get_figma_component

Normalised IR of a node: summary:true (sections + boxes + tokens), format:"flat", lean:true (flat node list with coordinates relative to the root), CSS variables and a ready Tailwind theme

render_node_png

Reference render of a node (PNG, base64 + image URL)

verify_render

Renders your HTML in headless Chromium and diffs it against the Figma render → SSIM, pixel-diff %, clustered diff regions

export_svg, migrate_all_svgs, list_svg_cache

Icon / vector export

get_figma_file, get_cached_components, get_component_by_name

File tree and component cache

Read-only: it never writes to your Figma files.


1. Requirements

  • Node.js 20+ — https://nodejs.org (LTS). Check: node -v

  • git

  • A Figma personal access token (next section)

Related MCP server: Figma MCP Server by Bao To

2. Get your Figma token (2 minutes)

  1. Open Figma (web or desktop) → click your avatar (top-left) → Settings.

  2. Tab Security → section Personal access tokens → Generate new token.

  3. Name: figma-proxy-mcp. Expiration: your choice (90 days is fine).

  4. Scopes: File content → Read-only (enough for everything here). Optionally Dev resources → Read-only.

  5. 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. Install

git clone https://github.com/Semmargl/figma-proxy-mcp.git
cd figma-proxy-mcp
npm install
npx playwright install chromium     # needed only for verify_render
cp .env.example .env

4. Put the token in .env

Open figma-proxy-mcp/.env in any text editor (macOS: open -e .env) and replace the placeholder:

FIGMA_API_KEY=figd_your_new_token_here      ← before
FIGMA_API_KEY=figd_AbCdEf...your real token ← after

Save. .env is git-ignored — never commit it, never paste the token into code or MCP configs. (Alternative: set FIGMA_API_KEY in the MCP client's env block or in your shell.)

Check the token:

curl -s -H "X-Figma-Token: $(grep FIGMA_API_KEY .env | cut -d= -f2)" https://api.figma.com/v1/me

→ JSON with your email = OK. 403 = wrong/expired token.

5. Connect to your AI tool (stdio)

Use the absolute path to proxy-mcp.js.

Claude Code (in your project folder):

claude mcp add figma-proxy --scope project -- node /ABS/PATH/figma-proxy-mcp/proxy-mcp.js --stdio

Claude Desktop / Cursor (claude_desktop_config.json / .cursor/mcp.json):

{ "mcpServers": { "figma-proxy": { "command": "node", "args": ["/ABS/PATH/figma-proxy-mcp/proxy-mcp.js", "--stdio"] } } }

Restart the app. The key is read from .env next to proxy-mcp.js, whatever the working directory.

6. HTTP mode (scripts / agents that start it on demand)

node proxy-mcp.js            # → http://localhost:4444/mcp  (JSON-RPC: tools/list, tools/call)
curl -s localhost: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}}}'

7. Usage tips

  • Links must contain node-id: in Figma right-click a frame → Copy link to selection.

  • Start with summary:true, then fetch each section with format:"flat", lean:true. Use relativeBox for layout.

  • verify_render needs htmlPath (absolute, a self-contained HTML file) + frameWidth (Figma frame width).

  • Optional env: FIGMA_FILE_DEPTH (default 4), FIGMA_NODE_DEPTH (default 12).

Troubleshooting

Symptom

Fix

FIGMA_API_KEY is not set

.env missing or still has the placeholder (step 4)

403 / Invalid token

token expired or wrong — generate a new one

404 on a node

no access to the file, or wrong node-id

verify_render: executable doesn't exist

npx playwright install chromium

EADDRINUSE :4444

HTTP mode already running (or another app on 4444)

License

MIT

Available Tools

9 tools
export_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

    A3.6/5.0

    Scored across 9 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables 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.
      20
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to extract design systems, analyze components, and maintain design-code consistency from Figma files, providing intelligent component analysis and accessibility compliance.
      40 npm
      27
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      5
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables 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.
      41
      19 npm
      MIT