openfig-mcp
v0.4.0MCP server that turns Figma .fig files into LLM-ready design specs: frames, HTML/CSS, tokens, components, hover states, animations, SVG icons, images and fonts.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_fig_files
List the Figma .fig files available in the workspace (or passed on the command line).
list_frames
List the pages and top-level frames (screens, component sets, frames) in a .fig file, with ids, sizes and prototype flow starting points.
| Parameter | Type | Description |
|---|---|---|
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
includeComponents | boolean | Include component sets/components placed on pages (default true). |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
page | string | Only this page (name or id). |
query | string | Filter by frame/section/page name. |
get_frame
Convert a frame/screen/component (any node) into implementation-ready design data: summary of fonts, components + variants, design tokens, hover/active states, auto-playing animations, navigation and modals, plus an HTML+CSS reproduction. Writes index.html, styles.css, tokens.css, spec.json, DESIGN.md, preview.png and assets/ (SVG icons, images) to disk.
| Parameter | Type | Description |
|---|---|---|
frame * | string | Frame/node to use: a node id like "1:234", a Figma URL containing node-id=1-234, or the frame name (e.g. "MacBook Pro 14\" - 4", "Login"). |
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
includeHtml | boolean | Include HTML/CSS inline in the response (default true). |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
outDir | string | Where to write the export. Default: <OS temp>/openfig-mcp/<file>/<frame>-<id>/ (outside the workspace). Pass a project folder (e.g. "src/assets/figma") to keep the files. |
textSizing | string | exact (default): text boxes get the size Figma measured, so the layout matches the design exactly. fluid: text that hugs its content is sized by the browser (only exact with the same fonts). |
render_frame
Optional: render a frame/node to a PNG for a visual overview (drawn from the file's own geometry and glyph outlines). Not needed for implementation: get_frame has the exact values.
| Parameter | Type | Description |
|---|---|---|
frame * | string | Frame/node to use: a node id like "1:234", a Figma URL containing node-id=1-234, or the frame name (e.g. "MacBook Pro 14\" - 4", "Login"). |
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
maxSize | integer | Max width/height of the returned image in px (default 1600). |
outPath | string | Also save the PNG here. |
verify_implementation
Verify your implementation against the Figma design. Opens the page (URL or .html file) in Edge/Chrome, compares every element tagged data-figma-id="<Figma id>" with the position and size Figma stored and its computed style with Figma's (corner radius, background, border, shadow, opacity, text color/size/weight/line height/letter spacing — catches UI-library defaults overriding the design), checks the text, and compares the page pixels with the design. Lists what is off. Call it at the end, fix, and call it again until it matches.
| Parameter | Type | Description |
|---|---|---|
frame * | string | Frame/node to use: a node id like "1:234", a Figma URL containing node-id=1-234, or the frame name (e.g. "MacBook Pro 14\" - 4", "Login"). |
target * | string | Where your implementation runs: a URL (e.g. "http://localhost:5173/login") or a path to an .html file. |
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
outDir | string | Where to write implementation.png, design.png and diff.png (default: next to the frame export in the OS temp dir). |
selector | string | CSS selector of the element that represents the frame (default: [data-figma-id="<frame id>"], else the first element in <body>). |
tolerance | number | Allowed difference in px (default 0.5). |
waitMs | integer | Extra time to wait after load (animations, data), in ms. |
check_fonts
List the fonts a frame (or the whole file) needs, the font file found for each (project fonts/ folder, OPENFIG_MCP_FONT_DIRS or installed fonts), and which are missing (those fall back to system fonts; mention them to the user when you finish).
| Parameter | Type | Description |
|---|---|---|
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
frame | string | Frame/node (id, Figma URL or name). Omit for every font used in the file. |
get_design_tokens
Get the design tokens of the file: color, text (typography), effect (shadow) styles and Figma variables (collections with modes, e.g. light/dark). Returns CSS custom properties + typography classes, or JSON.
| Parameter | Type | Description |
|---|---|---|
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
format | string | css (default) or json |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
list_components
List components and component sets (with variant properties like State=Hover, Size=lg) and how often they are used.
| Parameter | Type | Description |
|---|---|---|
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
query | string | Filter by component name. |
get_component
Get one component / component set: every variant with its properties, the CSS differences between interactive states (hover, pressed, …) and an HTML/CSS reproduction of the variants. Also writes an export folder like get_frame.
| Parameter | Type | Description |
|---|---|---|
component * | string | Component (set) name or id, e.g. "Button". |
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
outDir | string |
search_nodes
Find layers by name or text content (e.g. "Sign in", "logo", "price"). Returns ids you can pass to get_frame/render_frame/export_svg.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
limit | integer | |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
get_prototype_flows
Prototype navigation graph: flow starting points and every click/hover/timer link between screens, overlays (modals) and URLs.
| Parameter | Type | Description |
|---|---|---|
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
export_svg
Export a node (icon, logo, illustration, vector) as SVG markup; optionally save it to a file.
| Parameter | Type | Description |
|---|---|---|
node * | string | Frame/node to use: a node id like "1:234", a Figma URL containing node-id=1-234, or the frame name (e.g. "MacBook Pro 14\" - 4", "Login"). |
file | string | Path or name of the .fig file. Optional when the workspace has exactly one .fig file or one was passed on the command line. |
maxChars | integer | Character budget for this response (server default 40000). Raise it for large-context models, lower it for small ones. Full files are always written to disk. |
outPath | string |