Open editor
For developers

FigCraft MCP: a design tool your agent can drive

Every menu item, tool and drag in FigCraft is a command, from one registry of more than 400. The command-line tool exposes them as an MCP server, so an agent can create frames, set auto layout, make components and variants, wire a prototype, read the result as JSON and look at it as a PNG. The example designs in the FigCraft project were built this way.

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

ModeHowWhat it does
Headlessfigcraft-cli mcpAn in-process engine with one untitled document and the CPU renderer. No window.
Attachedfigcraft-cli mcp --attach 7979, with the app started as figcraft --control 7979Drives 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 7979

Or 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

Prompts to try

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 autoLayout

FAQ

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.