JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 52
  • Score
    100M100P100Q90972F
  • License MIT

MCP server for the Autopus Figma description workflow โ€” read frames, generate descriptions, manage briefs, write back via plugin bridge.

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 Description โ€” let your AI agent read your design and write the descriptions

๐Ÿ™ @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.

License: MIT npm Node MCP

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 figma MCP 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-7f3a and 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

โœจ 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):

  1. Figma plugin โ€” install Autopus Description from the Figma Community (Figma โ†’ Plugins โ†’ search), or import dist/plugin/manifest.json in dev-mode before it is approved.
  2. Local helper (one-click) โ€” download autopus-description.mcpb from the latest release, then Claude Desktop โ†’ Settings โ†’ Extensions โ†’ Install Extension. No Node / npm / JSON โ€” Node ships with Claude Desktop.
  3. 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, or google-analytics.com appears under the manifest's allowedDomains, you imported the bundled upstream vendor/ manifest by mistake โ€” remove it and import dist/plugin/manifest.json.

๐Ÿ“– Full walkthrough: docs/guides/designer-figma-mcp-guide.md

๐Ÿ“ฆ Install (developers)

npm install -g @autopus/figma-mcp

This 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-stdio

Or 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_TOKEN is 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 โ†’ undo
  1. init_project_brief { project_slug: "myproj" } โ€” generates .autopus/runs/myproj/project-brief.json template.
  2. Fill the brief in conversation with stakeholders (PM / designer / dev / QA) โ€” not inside Figma.
  3. validate_project_brief { brief_path } โ€” confirm required fields are present.
  4. figma_list_frames { file_id } then figma_get_frame_meta โ€” inspect target frames.
  5. submit_batch_lane { file_id, node_ids } (multi-frame) or generate_description { file_id, node_id } (single).
  6. preview_description { pending_id } โ€” markdown view for PM review.
  7. approve { pending_id } โ†’ apply { pending_id, source_hash_recomputed } โ€” write to Figma through the plugin.
  8. 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 file

The 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 text payloads pass through redact() 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/.