Back to Browse

Figcp MCP Server

Developer ToolsUse Caution4.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

Bidirectional Figma Desktop MCP bridge (Free plan, local fonts & RTL, zero REST API).

About

Bidirectional Figma Desktop MCP bridge (Free plan, local fonts & RTL, zero REST API).

Security Report

4.2
Use Caution4.2High Risk

figcp is a local Figma Desktop bridge whose core feature, run_figma_js, executes arbitrary Plugin API JavaScript requested by the MCP client, which is inherent to its purpose but a significant trust boundary. The visible code shows no external data exfiltration, path traversal in export_node_assets is guarded, and the loopback token is generated locally, but auth.ts and the WebSocket token validation were not shown, and arbitrary output paths for exports are unrestricted. Supply chain analysis found 9 known vulnerabilities in dependencies (0 critical, 6 high severity). Package verification found 1 issue.

12 files analyzed · 15 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

network_websocket

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

process_spawn

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "figcp": {
      "command": "npx",
      "args": [
        "-y",
        "figcp@0.2.2"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

figcp

TL;DR: Local-first, zero-quota, bidirectional Figma Desktop Plugin + MCP stdio bridge. Lets AI coding agents create components, verify RTL layouts, export design context and assets, and link to existing code directly inside Figma Desktop (100% Free/Starter plan compatible, local OS fonts like IRANSansXFaNum supported, zero Figma PAT/REST API needed).

figcp closed-loop self-healing demo in Figma Desktop


Why figcp?

Most Figma MCP servers rely on the Figma REST API — which makes them read-only, subject to strict rate limits, blind to local OS fonts, and locked behind paid Enterprise plans for Variables and Code Connect. figcp runs inside Figma Desktop over a local loopback bridge:

CapabilityTypical REST API MCPfigcp
100% Free / Starter Plan Compatible (Zero PAT / Quota)❌✅
Truly Bidirectional (AI → Figma + Figma → Code)❌ (Read-only)✅
Deterministic Layout/Token Linter + Screenshot Self-Healing❌✅
Local OS Fonts & RTL/Persian Bidi Verification❌✅
Local Code Connect (figcp.map.json) without Enterprise❌✅
Zero-Quota SVG/PNG Asset & W3C DTCG Token Export⚠️ Rate-limited✅
  • 100% Free & Zero REST API / PAT: Works natively on the Figma Starter (Free) Plan with zero rate limits or API tokens.
  • Truly Bidirectional (AI ↔ Code):
    • AI → Figma: Create/edit components via run_figma_js, catch overflow/overlap/unbound-token/RTL bugs via inspect_node_bounds, inspect inline PNG screenshots, and self-heal (or figma_undo).
    • Figma → Code: Extract Flexbox CSS & bound tokens via get_design_context, export SVG/PNG assets via export_node_assets, export W3C DTCG tokens, and verify rendered DOM/visual parity with ui-level.
  • Local OS Fonts & RTL Support: Uses fonts installed on your macOS/Windows machine (e.g., IRANSansXFaNum, Vazirmatn) directly inside Figma Desktop.
  • Local Code Connect (figcp.map.json): Map Figma components directly to your codebase components so agents reuse existing UI instead of duplicating it.

Requirements

  • Node.js >= 22.0.0
  • Figma Desktop

Quick Start

Option A: Install from npm (Recommended)

npm install -g figcp
figcp --setup
figcp --doctor

Or without global install:

npx -y figcp --setup

Option B: From Source

npm install
npm run build
npm run setup     # or: node packages/server/dist/index.js --setup
npm run doctor    # verify local environment and bridge health
  1. In Figma Desktop, open your document and go to Plugins → Development → Import plugin from manifest...
  2. Select ~/.figcp/plugin/manifest.json (run node packages/server/dist/index.js --print-path to copy the path).
  3. Run the figcp plugin in Figma Desktop and restart your MCP client.

npm run setup installs the plugin with a baked loopback token (~/.figcp/token), installs SKILL.md, and registers figcp in your MCP clients (with automatic .figcp.bak backups):

  • Cursor: ~/.cursor/mcp.json
  • Antigravity: ~/.gemini/config/mcp_config.json (falls back to the legacy ~/.gemini/antigravity/mcp_config.json on older installs)
  • Claude Code: ~/.claude.json (configured only if Claude Code is present)
  • Codex CLI: ~/.codex/config.toml (configured only if Codex CLI is present)
  • OpenCode: ~/.config/opencode/opencode.json

MCP Tools (7 Focused Tools)

ToolPipelinePurpose
figma_statusCoreChecks bridge health, role, connected Figma files, and tracks manual canvas edits (manualChanges).
inspect_design_system1 & 2Reads Local Variables (resolved hex & aliases), Styles, Components, local fonts (fontQuery), or exports W3C DTCG tokens (format: "dtcg").
run_figma_js1Executes arbitrary Figma Plugin API JS in a serial queue with figma and helpers in scope, captures console/errors, and checkpoints detected mutations.
inspect_node_bounds1Inspects node geometry, Auto Layout, bound tokens, deterministic DS/RTL linter issues, and returns inline PNG screenshot.
figma_undo1Undoes the latest Figma document undo step (which may include intervening user edits), or saves a named restore point (action: "snapshot").
get_design_context2Extracts code-generation design context (computed CSS flexbox, fills, typography, shadows), matches figcp.map.json components, and optionally exports ui-level specs.
export_node_assets2Exports node vector/icons as clean SVG or raster imagery as PNG inline or to outputDir (zero REST API dependency).

Bidirectional Workflows

Pipeline 1: AI → Figma (Authoring & Closed-Loop Healing)

  1. Discover: Call inspect_design_system to find exact tokens and fonts.
  2. Build: Call run_figma_js using helpers.requireFont(...), helpers.setAutoLayout(...), and helpers.makeBoundPaint(...).
  3. Verify: Call inspect_node_bounds (includeScreenshot: true) to run deterministic linter checks and inspect visual RTL text rendering.
  4. Heal/Revert: Patch errors or call figma_undo.

Pipeline 2: Figma → Code (Context, Code Connect & Assets)

  1. Local Code Connect (figcp.map.json): Place a figcp.map.json in your project root to map Figma components to existing files:
    {
      "Button/Primary": { "file": "src/components/Button.tsx", "export": "Button" },
      "SearchBox": { "file": "src/components/SearchBox.tsx", "export": "SearchBox" }
    }
    
  2. Extract Context: Call get_design_context (pass workspaceDir if the MCP client runs outside your project root) to receive CSS properties, relative geometries, bound token names, and attached codeConnect hints.
  3. Export Assets: Call export_node_assets (format: "SVG", outputDir: "src/assets/icons").

Optional Add-Ons (All Off by Default, Zero Core Dependencies)

figcp core is 100% self-contained and requires zero heavy browser or native image dependencies. You can optionally pair it with:

  • ui-level (Visual & DOM Verification):
    • Published on npm: ui-level.
    • When enabled, get_design_context exports spec.json (NormalizedSpec) and reference.png ready for offline Playwright/CDP DOM geometry + CIEDE2000 ΔE verification.
    • Enable explicitly with: node packages/server/dist/index.js --setup --with-ui-level (or --enable-ui-level). To install globally from npm and configure all MCP clients automatically, run: node packages/server/dist/index.js --install-ui-level.
    • Use --no-prompt to skip interactive prompts during setup.
  • Terrazzo / Tokens Studio:
    • Export DTCG tokens via inspect_design_system({ format: "dtcg" }) and transform to Tailwind v4 / CSS variables with Terrazzo.
  • SVGO:
    • Clean and minify SVG assets exported via export_node_assets.

Development

npm run typecheck   # Strict TypeScript checks across all packages
npm test            # Run 50+ automated unit & E2E tests
npm run build       # Build plugin dist and server CLI bundle
npm run doctor      # Run local diagnostics

Reviews

No reviews yet

Be the first to review this server!