MCP needs the desktop app or the CLI. The browser editor on this site can’t be driven by an agent; to design from a prompt in the browser, use the AI UI generator.
Two ways to run it
| Mode | How | What it does |
|---|---|---|
| Headless | figcraft-cli mcp | An in-process engine with one untitled document and the CPU renderer. No window. |
| Attached | figcraft-cli mcp --attach 7979, with the app started as figcraft --control 7979 | Drives the running app through its control channel, which listens on 127.0.0.1 only. You see every change live. |
The server speaks MCP over stdio. Text is laid out with FigCraft’s built-in fonts plus your installed fonts; add --no-system-fonts for renders that come out the same on every machine.
Set up with Claude Code
Get figcraft-cli: on macOS it is the separate figcraft-cli-0.5.1-macos-universal.zip release download; the Linux .deb and .rpm install it as /usr/bin/figcraft-cli; the Windows installer and portable zip include figcraft-cli.exe. Then register it:
# headless
claude mcp add figcraft -- /path/to/figcraft-cli mcp
# drive the running app (start it with: figcraft --control 7979)
claude mcp add figcraft-app -- /path/to/figcraft-cli mcp --attach 7979Or add it to .mcp.json in your project (Claude Desktop takes the same block in claude_desktop_config.json):
{
"mcpServers": {
"figcraft": { "command": "/path/to/figcraft-cli", "args": ["mcp"] },
"figcraft-app": { "command": "/path/to/figcraft-cli", "args": ["mcp", "--attach", "7979"] }
}
}What the agent gets
- Building:
create_node(frame, rectangle, ellipse, polygon, star, line, arrow, text, vector, section, component or slice),set_properties(geometry, fills, strokes, effects, corner radius, auto layout, sizing, constraints),pointerandkeyfor gestures and shortcuts,type_text. - Every command:
list_commandsandrun_commandreach everything in the menus, such aslayout.add,component.create,variable.bind,proto.interaction.addandinspect.code;batchruns several as one undo step. - Looking:
inspect_documentandget_nodereturn the layer tree as JSON,screenshota PNG the model can see. - Files:
open_file(.figcraft, .fig best effort, REST API JSON, SVG, images),save_file, andexportto PNG, JPG, WebP, SVG, PDF or experimental .fig. - Ready-made prompts:
mobile_screen,design_system,landing_pageandprototype_flow, each a step-by-step plan naming the tools to use.
Prompts to try
- “Design a mobile sign-up screen for a running app with auto layout, using a primary colour variable, and show me a screenshot.”
- “Build a button component set with Primary, Secondary and Ghost styles in Default, Hover and Disabled states.”
- “Open
app.figcraft, give me the React code for the Trip card component, and export every top-level frame as PNG at 2x.”
Without MCP: the CLI on its own
# Render and export headless
figcraft-cli render landing.figcraft -o landing.png --scale 2
figcraft-cli export app.figcraft -o hero.svg --node "Hero"
# Run a script of commands without a window
figcraft-cli run build-card.json --out card.figcraft
# Every command, with its parameters
figcraft-cli commands --filter autoLayoutFAQ
Can an AI agent control the browser version on this site?
No. Browsers can’t listen on a network port, so the web build has no control channel. The MCP server is part of figcraft-cli and drives either its own headless engine or the desktop app. In the browser, use the AI panel to design screens from a prompt.
Which agents work with it?
Any MCP client that can launch a local stdio server: Claude Code, Claude Desktop, Cursor, VS Code agents and others. The project documents the Claude Code and Claude Desktop setups; other clients take the same command and arguments in their JSON config.
Do I watch the agent work?
If you attach it to the app. Start FigCraft with figcraft --control 7979 and register the server with mcp --attach 7979: every layer the agent creates appears in your window as it happens. Headless, it works on its own document and shows you screenshots.
Source: FigCraft’s MCP server documentation and CLI reference. Flags can change between releases; check figcraft-cli mcp --help.