figcp
v0.2.2Bidirectional Figma Desktop MCP bridge (Free plan, local fonts & RTL, zero REST API).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
figma_status
Check figcp connection status, role, port, connected Figma Desktop files, and recent manual edits made on the canvas by the user.
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Target fileKey when multiple files are connected. |
sinceChangeSeq | integer | Only return manual changes with seq > sinceChangeSeq. |
run_figma_js
Execute arbitrary Figma Plugin API JavaScript inside the connected Figma Desktop file. Globals `figma` and `helpers` are in scope. Runs in a serial queue, captures console logs and stack traces, and checkpoints undo by default (pass commitUndo=false for read-only scripts).
| Parameter | Type | Description |
|---|---|---|
code * | string | Async JavaScript body with `figma` and `helpers` in scope. Return JSON-serializable data. |
commitUndo | boolean | Call figma.commitUndo() on mutation (default true; pass false for read-only inspections). |
fileKey | string | Target Figma fileKey (required only when multiple Figma files are connected). |
timeoutMs | integer | Execution timeout in ms (default 30000, max 180000). |
inspect_design_system
Read the open Figma file's Local Variable Collections (with resolved alias names), Paint/Text/Effect Styles, Component Sets (variant counts & properties), and optionally filter installed local fonts (e.g. fontQuery='IRANSans').
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Target Figma fileKey when multiple files are connected. |
fontQuery | string | Case-insensitive substring to filter available local fonts (e.g. 'IRANSans'). |
format | string | Output format: standard 'figma' snapshot or standard W3C 'dtcg' design tokens (compatible with Terrazzo and Tailwind v4). |
maxPages | integer | Maximum number of pages to load/scan (default 50). |
pageQuery | string | Optional case-insensitive substring to filter pages scanned for Component Sets. |
inspect_node_bounds
Inspect a node subtree's geometry (absoluteBoundingBox, absoluteRenderBounds), Auto Layout, bound variables, deterministic DS/RTL lint issues (overflow, overlap, unbound fills/spacing, RTL alignment), and optionally capture a PNG screenshot.
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Target Figma fileKey when multiple files are connected. |
includeScreenshot | boolean | Export PNG screenshot of the node and return it inline as an MCP image. |
maxDepth | integer | Maximum subtree traversal depth (default 4). |
nodeId | string | Target node ID ('5031:4449' or '5031-4449'). Defaults to current selection. |
screenshotScale | number | PNG export scale factor (default 2). |
figma_undo
Revert the last checkpointed run_figma_js mutation (action='undo') or save a named Figma version history restore point (action='snapshot').
| Parameter | Type | Description |
|---|---|---|
action | string | 'undo' (default) or 'snapshot'. |
fileKey | string | Target Figma fileKey when multiple files are connected. |
title | string | Snapshot title when action='snapshot'. |
get_design_context
Extract code-generation design context from a Figma node subtree: computed CSS/Tailwind geometry, Auto Layout (flexbox), fills, borders, typography, shadows, matching local Code Connect components (figcp.map.json), and optional offline NormalizedSpec export for ui-level visual verification.
| Parameter | Type | Description |
|---|---|---|
exportUiLevelDir | string | Optional directory path to write spec.json and reference.png ready for ui-level. |
fileKey | string | Target Figma fileKey when multiple files are connected. |
includeScreenshot | boolean | Capture reference PNG screenshot of the design context root. |
maxDepth | integer | Maximum subtree traversal depth (default 6). |
nodeId | string | Target node ID ('5031:4449'). Defaults to current selection. |
screenshotScale | number | PNG export scale factor (default 2). |
workspaceDir | string | Frontend workspace directory to search for figcp.map.json (defaults to server cwd). |
export_node_assets
Export a Figma node as SVG (vector/icons) or PNG (raster/imagery). Returns the content inline or saves to outputDir.
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Target Figma fileKey when multiple files are connected. |
filename | string | Optional output filename. Defaults to sanitized node name. |
format | string | Export format: 'SVG' (default) or 'PNG'. |
nodeId | string | Target node ID ('5031:4449'). Defaults to selection. |
outputDir | string | Optional directory to write asset file. If omitted, returns asset inline. |
scale | number | PNG export scale (default 2). |