OpenPencil Design Editor
Skill by ara.so — Daily 2026 Skills collection.
OpenPencil is an open-source, AI-native design editor that reads and writes native Figma (.fig) files, provides a headless CLI, an MCP server for AI agents, and a Vue SDK for building custom editors. It is MIT-licensed and runs in the browser, as a desktop app (Tauri/macOS/Windows/Linux), or fully headlessly.
Installation
Web app (no install)
Visit app.openpencil.dev/demo.
Desktop (macOS)
Or download from releases.
CLI
MCP server
Local development
CLI Reference
The open-pencil CLI operates on .fig files headlessly. When the desktop app is running, omit the file argument to connect to the live canvas via RPC.
Inspect file structure
XPath queries
Export
Example Tailwind output:
Design token analysis
Scripting with Figma Plugin API (eval)
All commands support --json for machine-readable output:
MCP Server
The MCP server exposes 90 tools (87 core + 3 file management) for AI agents to read and write .fig files.
Stdio (Claude Code, Cursor, Windsurf)
Add to your MCP client config (e.g. ~/.claude/mcp.json or Cursor settings):
HTTP server (scripts, CI)
Claude Code desktop integration
- Install the ACP adapter:
- Add MCP permission to
~/.claude/settings.json: - Open the desktop app →
Ctrl+J→ select Claude Code from the provider dropdown.
Agent skill (quick setup)
AI Chat (Built-in)
- Open with
⌘J(macOS) orCtrl+J(desktop/web). - 87 tools: create shapes, set fills/strokes, manage auto-layout, work with components and variables, boolean operations, token analysis, asset export.
- Bring your own API key — no backend or account required.
Supported providers
Configure via the provider dropdown in the chat panel:
Real-time Collaboration
No server, no account. Peer-to-peer via WebRTC.
- Click the Share button (top-right).
- Share the generated URL:
app.openpencil.dev/share/<room-id>. - Peers see live cursors, selections, and edits.
- Click a peer's avatar to follow their viewport.
Project Structure
Tech stack
Development Commands
Desktop prerequisites: Rust + Tauri v2 platform deps.
Common Patterns
Batch-rename all text nodes in a .fig file
Extract all colors as JSON
Export every frame as PNG in CI
Query nodes matching a naming convention
Connect an MCP client to a running desktop app
When the desktop app is open, the MCP stdio server can connect to the live canvas. No file path needed — all reads and writes go to the open document.
Export a selection as Tailwind JSX programmatically
Troubleshooting
openpencil-mcp not found after install
- Ensure
bun's global bin dir is on yourPATH:export PATH="$HOME/.bun/bin:$PATH" - Or use
npx openpencil-mcpas the MCP command value.
Desktop app CLI connection fails
- The desktop app must be running before issuing commands without a file argument.
- Check that no firewall rule blocks the local RPC socket.
Tauri dev build errors
- Install platform prerequisites: v2.tauri.app/start/prerequisites
- Ensure Rust is up to date:
rustup update
.fig file won't open
- Confirm the file was exported from Figma (not a
.figbackup or plugin artifact). - Run
open-pencil info design.figto check if the codec can parse the header.
AI chat returns no response
- Verify your API key is set correctly in the provider settings panel.
- For OpenRouter, ensure your key has credits and the selected model is available.
Collaboration peers not connecting
- Both peers must use the exact same share URL (room ID is case-sensitive).
- WebRTC requires both peers to allow the browser/app through any firewall.
Links
- Web app: app.openpencil.dev/demo
- Documentation: openpencil.dev
- MCP tools reference: openpencil.dev/reference/mcp-tools
- Releases: github.com/open-pencil/open-pencil/releases
- License: MIT

