Package Exports
- @autopus/figma-mcp
- @autopus/figma-mcp/dist/src/cli.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@autopus/figma-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
๐ @autopus/figma-mcp
Read Figma frames, write auditable descriptions โ straight from your AI client.
An MCP server for the Autopus Figma description workflow. It lets AI clients (Claude Code, Codex CLI, Cursor) read Figma frames, generate persona-tagged descriptions, manage project briefs, and write approved description artifacts back to Figma โ all behind explicit plugin consent.
English ยท ํ๊ตญ์ด ยท ็ฎไฝไธญๆ ยท ๆฅๆฌ่ช
What is this? (30-second version)
Designers describe screens; that knowledge usually gets lost in chat threads and stale docs. This package turns each Figma frame into a structured, reviewable, version-able description โ what the screen is for, how it behaves, its edge cases โ and writes the approved result back into Figma so the file stays the source of truth.
๐งญ Companion to the official Figma MCP. The official
figmaMCP server covers design creation (use_figma,generate_figma_design,generate_figma_library,generate_diagram). This package covers the description workflow โ what each frame means and how to write that knowledge back to Figma in an auditable way. The two are complementary; install both.
| You are aโฆ | Start here |
|---|---|
| ๐จ Designer (no code) | For designers โ then the full walkthrough |
| ๐ป Developer | Install โ Quick start |
| ๐งโ๐ผ PM / QA | Description workflow |
๐ฌ How it works (example flow)
Say a PM wants to document the Login screen of a checkout app so engineers and QA know exactly how it should behave. Here's the whole flow, written the way you'd actually type it into Claude Code (or Codex / Cursor):
1. Start a project brief
๐ฌ "Initialize a project brief for
checkout-app."
Claude runs init_project_brief { project_slug: "checkout-app" } and creates .autopus/runs/checkout-app/project-brief.json. You fill it in together โ target users, goals, tone โ in plain conversation, not inside Figma.
2. Point at the frames
๐ฌ "List the frames in Figma file
aBcD1234, then show me the Login frame's metadata."
Claude runs figma_list_frames { file_id: "aBcD1234" } โ figma_get_frame_meta, returning the frame's structure, screenshot, navigation, and source hash.
3. Generate a description
๐ฌ "Generate a description for the Login frame."
Claude runs generate_description { file_id: "aBcD1234", node_id: "12:345" } and returns a pending description โ nothing is written to Figma yet:
Frame: Login
Purpose: Authenticate returning users before checkout.
Behavior: Email + password; "Forgot password" opens the reset flow;
invalid credentials show an inline error under the field.
Edge cases: locked account, expired session, SSO fallback.
Success: user lands on the cart with items preserved.4. PM reviews it
๐ฌ "Preview pending
p-7f3a."
preview_description { pending_id: "p-7f3a" } renders the markdown for review. The PM tweaks wording if needed.
5. Approve & write back
๐ฌ "Approve
p-7f3aand apply it."
approve โ apply { pending_id: "p-7f3a", source_hash_recomputed: "..." }. Now โ and only now โ the description is written into the Figma file through the plugin's consent gate. The designer sees it appear on the frame.
6. Changed your mind?
๐ฌ "Undo that write."
undo { write_id: "w-91c2" } โ single-step rollback.
๐ Documenting a whole file at once? Swap step 3 for
submit_batch_lane { file_id, node_ids: [...] }to generate descriptions for many frames in one pass, then review and approve them together.
โก๏ธ For the bare tool sequence without the narrative, see Description workflow below.
Table of contents
- ๐ฌ How it works (example flow)
- โจ What you get
- ๐จ For designers (no code)
- ๐ฆ Install (developers)
- ๐ Quick start
- ๐งฐ MCP tool surface
- ๐ Description workflow
- ๐๏ธ Architecture
- ๐ค Companion tools
- ๐ ๏ธ Development
- ๐ Security
- ๐ License
โจ What you get
- Frame intelligence โ extract metadata, screenshots, navigation, design tokens, and source hashes from any frame.
- Description generation โ generate persona-tagged descriptions with mock, Anthropic, or OpenAI providers.
- PM-reviewable output โ preview, edit, approve, apply, and undo, with a full audit trail.
- Schema-backed manifests โ validate against JSON Schema and deterministic fixtures.
- Two transports โ long-running stdio server or loopback HTTP/SSE.
- Secure by construction โ secrets redacted at the wire, writes gated by explicit plugin consent.
๐จ For designers (no code)
Two pieces โ a Figma plugin + a local helper (this package):
- Figma plugin โ install Autopus Description from the Figma Community (Figma โ Plugins โ search), or import
dist/plugin/manifest.jsonin dev-mode before it is approved. - Local helper (one-click) โ download
autopus-description.mcpbfrom the latest release, then Claude Desktop โ Settings โ Extensions โ Install Extension. No Node / npm / JSON โ Node ships with Claude Desktop. - Connect โ run the plugin in Figma, paste the channel secret the helper prints (ask Claude "what's the figma channel secret?"), and click Connect.
โน๏ธ Which plugin am I looking for? In Figma's plugin list it shows as Autopus Description โ not
@autopus/figma-mcp(that's the npm / MCP server, not a Figma plugin). If you instead see Cursor MCP Plugin, orgoogle-analytics.comappears under the manifest'sallowedDomains, you imported the bundled upstreamvendor/manifest by mistake โ remove it and importdist/plugin/manifest.json.
๐ Full walkthrough: docs/guides/designer-figma-mcp-guide.md
๐ฆ Install (developers)
npm install -g @autopus/figma-mcpThis installs five CLI binaries:
| Binary | Purpose |
|---|---|
autopus-mcp-stdio |
Long-running MCP server (stdio transport) for Claude / Codex / Cursor |
autopus-mcp-http |
Loopback HTTP/SSE MCP variant |
autopus-daemon |
Background daemon for the Figma plugin bridge |
generate-descriptions |
CLI batch generator (Figma โ description manifest JSON) |
figma-read |
CLI read-only Figma snapshot tool |
๐ Quick start
Claude Code
claude mcp add autopus-figma -- autopus-mcp-stdioOr add to ~/.config/claude/mcp_servers.json:
{
"autopus-figma": {
"command": "autopus-mcp-stdio",
"env": {
"FIGMA_TOKEN": "figd_...",
"AUTOPUS_AUDIT_DIR": "~/.autopus"
}
}
}Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.autopus_figma]
command = "autopus-mcp-stdio"
args = []
[mcp_servers.autopus_figma.env]
FIGMA_TOKEN = "figd_..."
AUTOPUS_AUDIT_DIR = "/Users/<you>/.autopus"๐ก
FIGMA_TOKENis your Figma personal access token (figd_...). Create one at Figma โ Settings โ Security โ Personal access tokens. Keep it secret โ it grants file access.
๐งฐ MCP tool surface
autopus-mcp-stdio exposes up to 26 tools across 4 tiers. Extra tiers activate only when their dependency is wired at startup.
| Tier | SPEC | Tools | Always on? |
|---|---|---|---|
| Baseline read | SPEC-FIGMA-006 / 009 | get_active_selection, get_pending_descriptions, get_audit_events, get_stale_frames |
โ |
| Baseline write | SPEC-FIGMA-011 | plan_emit, dryRun, approve, apply, undo |
when writeExtension wired |
| Figma read + validate | SPEC-FIGMA-014 | figma_list_frames, figma_get_frame_meta, figma_export_image, figma_get_prototype_graph, validate_manifest |
when figmaAdapter wired |
| Single-frame generation | SPEC-FIGMA-014 | generate_description |
when descriptionGenerator wired |
| Project brief | SPEC-FIGMA-015 | get_project_brief, validate_project_brief, init_project_brief, update_project_brief |
when briefWorkspaceRoot set |
| Operational | SPEC-FIGMA-016 | get_batch_status, get_generation_mode, preview_description, get_daemon_status, submit_batch_lane, force_generation_mode |
when p2Context wired |
๐ See docs/runbooks/figma-014-mcp-expansion.md for the full ListTools ordering, invariants, and a wiring example.
๐ Description workflow
init brief โ fill brief โ validate โ inspect frames โ generate โ preview โ approve โ apply โ undoinit_project_brief { project_slug: "myproj" }โ generates.autopus/runs/myproj/project-brief.jsontemplate.- Fill the brief in conversation with stakeholders (PM / designer / dev / QA) โ not inside Figma.
validate_project_brief { brief_path }โ confirm required fields are present.figma_list_frames { file_id }thenfigma_get_frame_metaโ inspect target frames.submit_batch_lane { file_id, node_ids }(multi-frame) orgenerate_description { file_id, node_id }(single).preview_description { pending_id }โ markdown view for PM review.approve { pending_id }โapply { pending_id, source_hash_recomputed }โ write to Figma through the plugin.undo { write_id }โ single-step rollback.
๐๏ธ Architecture
Claude Code / Codex CLI / Cursor
โ MCP (stdio / http)
โผ
autopus-mcp-stdio (this package) โ policy / authoring boundary
โ WebSocket
โผ
Figma Plugin (autopus_*.ts, MIT-vendored) โ consent boundary
โ
โผ
Figma fileThe MCP server is the policy / authoring boundary. The Figma plugin is the consent boundary โ writes happen only after explicit plugin approval (approve โ apply). Tunnel URLs and secrets are redacted at the MCP wire (INV-W2, INV-TUNNEL-REDACT).
๐ค Companion tools
- Official Figma MCP โ design creation (
use_figma,generate_figma_design,generate_figma_library,generate_diagram). Install separately for designer workflows. @autopus/validate-manifestโ JSON Schema validator for the description manifest format (workspace package, shipped as a transitive dependency).
๐ ๏ธ Development
npm install
npm run build # compiles TypeScript + prepends shebang to bin entries
npm test # vitest suite
npm run lint # tsc --noEmit๐ Security
- All outbound MCP
textpayloads pass throughredact()before transport (INV-W2). - Figma tokens are read from the environment, never logged.
- Project brief paths are confined to
.autopus/runs/(INV-BRIEF-PATH). - Tunnel URLs are redacted in
get_daemon_status(INV-TUNNEL-REDACT). - Figma read tools emit HTTP GET only (
INV-FIGMA-READ).
๐ Report vulnerabilities via GitHub Security Advisories on this repository.
๐ License
MIT โ see LICENSE. Includes MIT-licensed code from sonnylazuardi/cursor-talk-to-figma-mcp under vendor/.