# Figma Make, Figma MCP & Design-to-Code

> Turn Figma frames, design tokens, and component libraries into production React/Tailwind code using Figma Make, the official Figma MCP server, Code Connect, and coding agents.

- **Topic:** [Product & Design Teams](https://twelve-pages.com/topics/product-and-design)
- **Web Edition:** https://twelve-pages.com/guides/product-and-design/figma-make-and-mcp-design-to-code
- **Printable 12-Page PDF:** https://twelve-pages.com/guides/product-and-design/figma-make-and-mcp-design-to-code/Figma_Make_and_MCP_Design_to_Code_Complete_How_To_Guide.pdf (820 KB)
- **Version:** v1.0 (Updated 2026-11)
- **Reading Time:** 12 minutes (12 pages)
- **Authorship:** AI-authored under human editorial direction & print QA (https://twelve-pages.com/editorial)
- **Tags:** Figma Make & Plan Mode · Official Figma MCP Server · Code Connect v2 Templates · Variables & Tailwind Tokens · Auto-Layout Hygiene · Claude Code • Cursor • Codex

## Core Takeaways

- **Structured Design Context:** Stream exact node trees, bound variables, and screenshots via get_design_context instead of lossy PNG guesses.
- **Real Repo Components:** Bind Figma components to production React imports and props with Code Connect v2 so agents stop inventing div soup.
- **Two-Way Canvas Loop:** Prototype fast in Figma Make, ship clean PRs through MCP, and push live UI updates back to Figma with remote write tools.

## 1. From Screenshot Handoff to Structured MCP Context

Pasting a Figma screenshot into an AI chat forces the model to guess spacing, hex values, and component boundaries. The modern 2026 design-to-code stack replaces visual guesswork with a deterministic protocol: Figma Variables define tokens, Code Connect maps components, and the official Figma MCP server streams structured specs straight into your coding agent.

**Core Rule: Tokens + Auto-Layout + Verify**

### The 4-Stage Design-to-Code MCP Loop

Reliable production UI does not come from a single prompt. High-velocity product teams run a closed four-stage loop where Figma supplies structure and tokens, your repo supplies real components, and the coding agent verifies its own rendered output before opening a pull request:

#### What Figma MCP Generates Well

- Flexbox/Grid layouts mapped 1:1 from Auto-Layout frames
- Exact design-token CSS variables & Tailwind utility classes
- Real repo component imports when Code Connect v2 is published

#### What Engineers Still Own

- Data fetching, optimistic updates, caching, and error boundaries
- Complex state machines, form validation, and auth guards
- WCAG 2.2 focus traps, screen-reader landmarks, and perf budgets

#### The Core Principle: Treat Figma as a Structured Spec, Not a Compiler

The best 2026 teams do not expect one-click perfection from messy canvases. They combine **Figma Make** for rapid interactive exploration, **Figma MCP + Code Connect** for 85%-complete first passes inside their real repo, and automated visual diffs for final polish.

## 2. Choosing the Right Surface: Make vs. MCP vs. Code Connect

Figma's late-2026 ecosystem spans four distinct design-to-code surfaces. Picking the wrong one wastes AI credits or produces throwaway code. Use the matrix below to match each tool to the exact stage of your product lifecycle.

| Surface | Primary Job | Best Used When | Output Artifact | Key Limit (2026) |
| --- | --- | --- | --- | --- |
| **Figma Make** | Prompt-to-interactive prototype & mini web app inside Figma | Validating UX flows, stakeholder demos, micro-interactions, 0->1 ideas | Live interactive React/Tailwind preview in Figma | Seat-level AI credits; sandboxed from prod repo |
| **Figma MCP Server** | Streams frame geometry, tokens, screenshots & mappings to agents | Building production screens directly inside your actual codebase | Structured MCP context consumed by coding agents | Read rate limits tied to Figma seat tier |
| **Code Connect v2** | Maps Figma component sets to real repo imports, props & docs | You maintain a reusable UI library (shadcn/ui, Radix, internal DS) | Template mappings (`*.figma.ts`) or UI links | Org/Ent plan for CLI & full DS scale |
| **Dev Mode** | Human inspection, version diffing, annotations & local MCP toggle | Reviewing spacing/redlines, comparing frame diffs, pairing live | Inspect CSS/Tailwind, Ready-for-Dev status | Requires Dev or Full seat for full inspect |

### 2026 Figma Seat Tiers, AI Credits & MCP Access

| Plan & Seat | Approx. Cost | Figma Make Credits | Official MCP Server Limits | Code Connect |
| --- | --- | --- | --- | --- |
| **Starter (Free)** | $0 / mo | 150 AI credits/day (Community publish only) | Capped (~20 read calls/mo on free/View seats) | UI preview only |
| **Professional** Full / Dev Seat | $16 Full $12–$15 Dev | Monthly seat credit pool + add-on packs | Standard per-minute API/MCP tier for daily dev | Code Connect UI + basic CLI |
| **Organization** Full / Dev / Collab | $55 Full / $25 Dev / $5 Collab (annual) | Higher monthly pool + $0.03/credit PAYG | High per-minute tier; remote write tools (beta) | Full CLI + GitHub UI + DS analytics |
| **Enterprise** Full / Dev / Collab | $90 Full / $35 Dev / $5 Collab (annual) | Enterprise credit pools + custom governance | Highest rate limits + SSO/SCIM + audit controls | Multi-library CLI + CI publishing |

#### 1 Which Team Pattern Fits You?

- **Solo / Early Startup:** Prototype in **Figma Make**, then connect **Remote MCP** to Claude Code or Cursor to build against shadcn/ui.
- **Scaling Product Team:** Author **Code Connect v2** templates for your top 25 components so every MCP call emits real imports.
- **Enterprise DS Team:** Run `npx figma connect publish` in CI, enforce Variables-only tokens, and gate PRs with visual regression.

#### 2 60-Second Quick-Start Checklist

1. Confirm your engineers have a **Dev** or **Full** seat (View seats hit the monthly MCP cap fast).
2. Install the official Figma plugin/MCP in your agent (`https://mcp.figma.com/mcp`).
3. Run OAuth sign-in in browser and verify with `whoami` or `#get_design_context`.
4. Optionally toggle **Desktop MCP** in Figma Dev Mode for selection-based pairing.

#### Important 2026 Licensing Nuance: MCP Is Free, Seats Set the Ceiling

Figma charges **$0 extra** to enable the official MCP server, and remote canvas-write tools (`use_figma`, `generate_figma_design`) are free during beta. However, read-tool ceilings strictly follow your Figma seat—putting an engineer on a free View seat will stall MCP mid-sprint.

## 3. 7-Control Command Center: Figma + MCP + Coding Agent

When design-to-code works seamlessly, three panes stay in sync: the Figma Dev Mode canvas (left), the Inspect & MCP Status panel (center), and your AI Coding Agent (right). Master these seven controls to eliminate manual copy-pasting.

BillingUpgradeModal.fig — Dev Mode + Remote MCP Connected

Shift+D: Dev Mode MCP: mcp.figma.com/mcp

**FIGMA LAYER TREE**

▾ Frame: UpgradeDialog [Auto-Layout V]

▾ HeaderRow [H • gap-12]

◆ Badge/Pro [Code Connect ✓]

▾ PlanGrid [Grid 2-col • gap-16]

◆ PricingCard/Team

◆ PricingCard/Enterprise

▾ FooterActions [H • justify-end]

◆ Button/Primary [variant="accent"]

Selected Node URL

figma.com/design/x9K2.../Billing?node-id=412-88

**INSPECT & CODE CONNECT**

Bound Variables (Tokens)

bg: var(--surface-elevated)
 border: var(--border-subtle)
 gap: var(--space-4) /* 16px */
 radius: var(--radius-lg) /* 12px */

Code Connect Snippet (React)

import { Button } from "@/ui/button";
 <Button variant="accent" size="md">
 Upgrade Workspace
 </Button>

Ready for Dev: **Approved v2.4** • 0 untokenized fills

**AGENT MCP TOOL TRACE**

✓ figma.get_metadata(node="412:88")

✓ figma.get_design_context(node="412:88")

✓ figma.get_variable_defs(node="412:88")

✓ figma.get_code_connect_map()

Writing src/components/UpgradeDialog.tsx

**Self-Verification Loop**

Called `get_screenshot` -> compared against Playwright render at 1280px & 390px. Spacing delta < 2px. Ready for PR.

### Control-by-Control Breakdown

#### Dev Mode Toggle (`Shift + D`)

Switches Figma from authoring to inspection. Exposes Ready-for-Dev statuses, version diffs, and the Desktop MCP server toggle in the right sidebar.

#### Semantic Auto-Layout Layer Tree

Named containers (`HeaderRow`, `PlanGrid`) become clean semantic JSX. Generic `Frame 481` groups cause the agent to emit nested unnamed `<div>` wrappers.

#### Copy Link to Selection (`Cmd/Ctrl + L`)

Copies the exact `?node-id=412-88` URL. Paste this into Claude Code, Cursor, or Codex when using the Remote MCP server to scope extraction to one frame.

#### MCP Transport Indicator

Confirms whether your agent is hitting Hosted Remote (`mcp.figma.com/mcp`) or Local Desktop (`127.0.0.1:3845/mcp`). Avoid running both under the same alias.

#### Bound Variables & Code Connect Panel

Displays live CSS variable bindings and published Code Connect snippets. If this panel shows raw hex values, fix variables before invoking your coding agent.

#### Agent Tool Call Trace

Watch the agent call `get_metadata` first on large pages, then `get_design_context` and `get_variable_defs` on targeted sub-frames to conserve context tokens.

#### Visual Self-Check Gate (`get_screenshot` + Headless Browser)

Always instruct your agent to call `get_screenshot` and visually compare Figma's render against your local dev server via Playwright or Storybook. Catching a misaligned flex wrap or missing focus ring here takes 15 seconds instead of a 2-day design review cycle.

## 4. Prototyping at Warp Speed with Figma Make

Figma Make turns natural-language prompts and existing Figma frames into functional, clickable React + Tailwind prototypes directly inside Figma. Used correctly, it replaces weeks of static noodle-wiring; used carelessly, it burns seat credits on unshippable sandboxes.

*[Illustration: Interactive prototyping canvas with layered UI cards, glowing indigo and violet wireframes, snapping auto-layout guides, and coral AI spark nodes]*

**Figma Make Workflow:** Anchor prompts to an existing Figma frame and component library, use `Plan Mode` to lock interaction states first, then iterate visually before graduating specs via Figma MCP.

#### 1 Ground Make in Your Design System

- **Attach a reference frame first:** Never prompt from a blank canvas when you already have brand typography, radii, and surface variables.
- **Use Plan Mode before generating:** Let Make outline screens, state transitions, and mock data schemas so you approve architecture before spending generation credits.
- **Point-and-edit targeting:** Click a specific card or button in the preview and ask for scoped edits (*"Add keyboard arrow navigation to this tab list"*) instead of regenerating the full app.

#### 2 High-Leverage Prompt Patterns

- **Real edge-case states:** Ask Make to include `empty`, `loading skeleton`, `error toast`, and `overflow-text` toggles in a top debug bar.
- **Realistic domain fixtures:** Paste 5 rows of anonymized JSON data so tables, charts, and truncation behave like production.
- **Responsive breakpoints:** Explicitly specify desktop (`1280px`) and mobile drawer (`390px`) behaviors in the first prompt.

### The Make-to-Production Graduation Playbook

| Phase | Where You Work | Exact Action to Avoid Throwaway Code |
| --- | --- | --- |
| **1. Explore** | Figma Make (Plan Mode) | Test 2–3 interaction models with PMs and customers using live clickable prototypes; discard weak flows in minutes. |
| **2. Canonize** | Figma Design + Variables | Lock the winning flow into clean Auto-Layout frames bound to your team's Variables and library components. |
| **3. Ship** | Figma MCP -> Coding Agent | Do *not* copy-paste raw Make sandbox code into prod. Point Claude Code/Cursor at the canonical Figma URL + Code Connect so it writes repo-native TypeScript. |

#### Credit Discipline Tip (2026 Seat Limits)

Because Figma Make enforces monthly seat-level AI credits (and Starter limits free users to 150 credits/day), reserve Make for **interactive behavior and UX validation**. Once a screen is approved, switch to **Figma MCP** inside your IDE—your coding agent's model subscription handles code generation without burning Figma AI credits.

## 5. Mastering the Official Figma MCP Server

Figma's official MCP server exposes ~25+ structured tools (18 read + write beta tools) to AI coding clients. Understanding Remote vs. Desktop transport and structuring a 5-part Design-to-Code prompt is what separates crisp PRs from generic CSS.

### The 5-Part Design-to-Code MCP Prompt Anatomy

[1. Scoped Node URL] Implement https://figma.com/design/x9K2/App?node-id=412-88 [2. Token Mandate] Call get_variable_defs and map every color/spacing value to our Tailwind v4 @theme tokens (zero raw hex) [3. Component Reuse] Call get_code_connect_map and strictly import existing Button, Dialog, and Badge from @/components/ui [4. Stack & States] Output React 19 + TypeScript + Tailwind in src/features/billing/UpgradeDialog.tsx with loading & error states [5. Visual Verify] Call get_screenshot, render locally, and verify layout parity at 1280px and 390px before finishing.

### Remote Hosted vs. Local Desktop MCP Server

| Dimension | Remote MCP Server (Recommended) | Desktop MCP Server (Local) |
| --- | --- | --- |
| **Endpoint URL** | `https://mcp.figma.com/mcp` (Streamable HTTP) | `http://127.0.0.1:3845/mcp` (Localhost HTTP) |
| **Auth & Setup** | Browser OAuth via Figma plugin/client; no desktop app needed | Enable in Figma Desktop -> Dev Mode -> MCP server panel |
| **Selection Mode** | Paste a Figma frame/node URL in your prompt | Reads your *currently selected* frame live on canvas |
| **Write Tools** | Supports `use_figma`, `generate_figma_design`, `html_to_figma` | Read-focused (canvas write tools are Remote-only) |
| **Best For** | Teams, cloud agents, CI workflows, Linux/remote VMs | Live designer-developer pairing on macOS/Windows |

### Verified 2026 Client Configurations (Copy-Paste)

Claude Code & Codex CLI (Remote Recommended)

```
<code># Claude Code (installs MCP + official Figma skills)
claude plugin install figma@claude-plugins-official

# Or add Remote MCP directly (user scope)
claude mcp add <span class="nowrap">--scope</span> user <span class="nowrap">--transport</span> http \
  figma https://mcp.figma.com/mcp

# OpenAI Codex CLI
codex mcp add figma <span class="nowrap">--url</span> https://mcp.figma.com/mcp</code>
```

Cursor / VS Code / Antigravity (`mcp.json`)

```
<code>{
  "mcpServers": {
    "figma": {
      "type": "http",
      "url": "https://mcp.figma.com/mcp"
    },
    "figma-desktop": {
      "url": "http://127.0.0.1:3845/mcp"
    }
  }
}</code>
```

#### Core Tool Reference: When Agents Call What

`get_metadata` (cheap XML tree overview for huge files) -> `get_design_context` (layout + React/Tailwind spec) -> `get_variable_defs` (exact token definitions) -> `get_code_connect_map` (real repo imports) -> `get_screenshot` (visual ground truth) -> `create_design_system_rules` (bootstraps `CLAUDE.md` / `.cursor/rules`).

## 6. Bridging Variables & Real Components with Code Connect v2

Without token alignment and Code Connect, Figma MCP emits raw Tailwind classes and custom <button> markup. Binding Figma Variables to CSS custom properties and publishing Code Connect v2 templates forces every coding agent to speak your exact design system.

### 1. Two-Tier Figma Variables -> Tailwind v4

Structure Figma Variables into **Primitives** (`indigo-600`, `space-4`) and **Semantic Tokens** (`surface/elevated`, `text/muted`) with Light/Dark modes. Export to CSS so MCP maps names 1:1:

```
<code>/* src/styles/tokens.css (Tailwind v4 @theme) */
@import "tailwindcss";

@theme {
  <span class="nowrap">--color-surface-elevated</span>: var(--ds-surface-elevated);
  <span class="nowrap">--color-brand-primary</span>:    var(--ds-brand-primary);
  <span class="nowrap">--color-border-subtle</span>:    var(--ds-border-subtle);
  <span class="nowrap">--radius-card</span>:            0.75rem; /* 12px */
  <span class="nowrap">--spacing-card-pad</span>:       1.25rem; /* 20px */
}

:root { <span class="nowrap">--ds-surface-elevated</span>: #ffffff; <span class="nowrap">--ds-brand-primary</span>: #4f46e5; }
.dark { <span class="nowrap">--ds-surface-elevated</span>: #141526; <span class="nowrap">--ds-brand-primary</span>: #818cf8; }</code>
```

#### Zero Hardcoded Hex Rule

Run Figma's token audit before handoff. When every fill, stroke, radius, and gap is bound to a semantic Variable, `get_variable_defs` gives your agent exact token names instead of `bg-[#4F46E5]`.

### 2. Code Connect v2 (Aug 2026 Template Standard)

In August 2026, `@figma/code-connect@2.x` deprecated legacy framework-specific parsers. New repos use universal **template files** (`*.figma.ts`) or **Code Connect UI** inside Figma:

```
<code>// src/components/ui/Button.figma.ts (Code Connect v2)
import figma from "@figma/code-connect";

figma.connect(
  "https://figma.com/design/DS123/Kit?node-id=12-40",
  {
    props: {
      variant: figma.enum("Variant", {
        Primary: "primary",
        Ghost: "ghost",
        Danger: "destructive",
      }),
      size: figma.enum("Size", { SM: "sm", MD: "md", LG: "lg" }),
      label: figma.string("Label"),
    },
    example: ({ variant, size, label }) =>
      `import { Button } from "@/components/ui/button";\n` +
      `<Button variant="${variant}" size="${size}">${label}</Button>`,
  }
);</code>
```

```
<code># Interactive AI-assisted wizard & CI publish
npx figma connect            # fuzzy-matches repo components
npx figma connect preview    # inspect rendered snippets locally
npx figma connect publish    # push mappings to Dev Mode & MCP</code>
```

### Code Connect UI vs. Code Connect CLI

| Method | How It Works | Best For | AI Agent Benefit |
| --- | --- | --- | --- |
| **Code Connect UI** | Link Figma components to GitHub repo paths directly in Figma's Inspect panel | Fast onboarding, designers adding AI usage notes without touching CLI | Exposes file paths & custom AI instructions to MCP immediately |
| **Code Connect CLI v2** | Versioned `*.figma.ts` template files published via GitHub Actions on merge | Mature React/Tailwind, iOS, or Android libraries with strict prop contracts | Exact variant-to-prop rendering + zero drift on CI publish |

#### 80/20 Rollout Strategy: Map Only Your Top 20 Primitives First

You do not need 100% library coverage to see massive MCP quality gains. Connecting `Button`, `Input`, `Select`, `Card`, `Dialog`, `Badge`, `Tabs`, and `Table` eliminates ~80% of duplicated component code across product PRs.

## 7. Frame Hygiene: How to Eliminate Div-Soup Output

Garbage in, position: absolute out. Figma MCP translates your literal node geometry into layout code. A five-minute Auto-Layout and layer-naming pass before handoff cuts agent cleanup time by 70%.

*[Illustration: Split comparison showing chaotic unaligned gray rectangles transforming through a glowing indigo prism into structured nested Auto-Layout frames with spacing guides]*

**Structural Fidelity = Code Quality:** Unaligned groups force agents to emit fragile absolute pixel offsets; nested Auto-Layout frames map cleanly to `flex`, `grid`, and `gap-*`.

### The 6 Deterministic Rules for AI-Ready Figma Frames

#### 1 Auto-Layout Everywhere (Zero Loose Groups)

Convert every `Group` into an Auto-Layout `Frame` (`Shift + A`). Use Horizontal/Vertical/Grid flows and explicit `Gap` values instead of manually nudged coordinates.

#### 2 Explicit Fill / Hug / Fixed Resizing

Set fluid containers to **Fill container** (`w-full flex-1`), badges/buttons to **Hug contents** (`w-fit`), and only icons or sidebars to **Fixed** pixel widths.

#### 3 Semantic Layer Names = Clean JSX

Name key containers by role: `NavHeader`, `MetricCard`, `ActionBar`. Agents use layer names to generate React component names, ARIA labels, and test IDs.

#### 4 Flatten & Componentize Icons

Never leave multi-path vector icons ungrouped. Wrap each icon in a named component (`Icon/ArrowRight`) so MCP maps it to `lucide-react` instead of dumping 200 lines of inline SVG.

#### 5 Scope Extraction to Sub-Frames

Passing an entire 14-section marketing page in one MCP call bloats context and degrades accuracy. Break work into section-level frames (Hero, PricingTable, Footer) and assemble sequentially.

#### 6 Delete Hidden & Scratch Layers

Hidden layers (`opacity: 0` or toggled off) still appear in node metadata and confuse agents. Keep exploratory iterations on a separate `Scratch` page away from `Ready for Dev`.

#### Before vs. After Hygiene Impact

**Messy Frame:** `<div className="relative w-[412px] h-[184px]"><div className="absolute top-[23px] left-[19px] text-[#334155]">...`
 **Clean Frame:** `<Card className="flex flex-col gap-4 p-5 bg-surface-elevated border-border-subtle"><CardHeader>...`

## 8. 5 Production-Tested Design-to-Code Recipes

Bookmark these five repeatable workflows. Each recipe pairs specific Figma MCP tool calls with repo constraints so Claude Code, Cursor, Codex, or Antigravity delivers reviewable diffs on the first pass.

| Recipe | MCP Tools Triggered | Core Goal | Target Output |
| --- | --- | --- | --- |
| **1. Feature Screen Build** | `get_metadata`, `get_design_context`, `get_code_connect_map` | Implement a new multi-section view using existing UI primitives | Typed React page + Storybook story |
| **2. Token Sync PR** | `get_variable_defs` | Sync updated Figma brand colors/radii into Tailwind v4 `@theme` | `tokens.css` diff + dark mode parity |
| **3. Code-to-Canvas** | `use_figma` / `html_to_figma` (Remote) | Push a refined coded UI back into Figma as editable frames | Synced Figma design frame |
| **4. Responsive Refactor** | `get_design_context` (Desktop + Mobile URLs) | Reconcile desktop table & mobile card-list breakpoints cleanly | Single responsive component |
| **5. DS Rules Bootstrap** | `create_design_system_rules` | Generate repo-wide agent rules from your Figma component kit | `CLAUDE.md` / `.cursor/rules/figma.mdc` |

### Copy-Paste Prompts & Repo Rules

Recipe 1: Scoped Feature Build (Claude Code / Cursor)

```
<code>Build the AnalyticsHeader from:
https://figma.com/design/KEY/App?node-id=804-12

1. Call get_design_context + get_variable_defs.
2. Call get_code_connect_map and reuse components
   from @/components/ui (do not recreate primitives).
3. Use Tailwind v4 tokens from src/styles/tokens.css.
4. Add unit test + call get_screenshot to verify
   visual parity against localhost:3000.</code>
```

Recipe 2: Automated Design Token Sync

```
<code>Run get_variable_defs on node-id=1-2 (Tokens page).
Diff against src/styles/tokens.css.
Update changed Light & Dark CSS custom properties,
preserve all Tailwind @theme aliases, and list any
removed tokens still referenced in src/.</code>
```

Recipe 3: Code-to-Canvas Round-Trip (Remote MCP)

```
<code>Take the updated PricingTable in
src/components/PricingTable.tsx (with the new
Annual toggle we shipped in PR #418).
Use the remote Figma MCP write tools (use_figma /
html_to_figma) to create an editable frame in
page "Synced From Prod" using our existing
Variables and Auto-Layout conventions.</code>
```

Recipe 5: Repo Rule (`.cursor/rules/figma-ds.mdc`)

```
<code>---
description: Rules for all Figma MCP UI tasks
globs: ["src/components/**/*.tsx", "src/app/**/*.tsx"]
---
- Always call get_variable_defs before writing CSS.
- Never emit raw hex (#xxxxxx) or arbitrary px.
- Prefer @/components/ui primitives over raw HTML.
- Icons must import from lucide-react, never inline.
- Verify output with Playwright vs get_screenshot.</code>
```

#### Pro Tip: Pair Recipe 5 with Official Figma Agent Skills

Installing the official Figma plugin (`claude plugin install figma@claude-plugins-official` or `/add-plugin figma` in Cursor) bundles Figma's maintained skills for `use_figma` font loading, Auto-Layout ordering, and variable scoping—dramatically cutting write-tool errors.

## 9. Preventing Token Drift, Secret Leaks & UI Decay

AI agents can generate five screens in an afternoon—which means they can also introduce five subtly different button paddings and hardcoded hex colors if you lack automated guardrails. Put these four governance controls in place before scaling across teams.

#### 1 Auth, Scopes & Secret Hygiene

- **Prefer OAuth over static PATs:** Remote MCP (`https://mcp.figma.com/mcp`) uses browser OAuth tied to your org's SSO/SCIM—auto-revoking access when someone leaves.
- **Least-privilege CI tokens:** For headless `npx figma connect publish` in GitHub Actions, store a dedicated read/Code-Connect-scoped token in encrypted CI secrets, never in `.env` committed to git.
- **Sandbox canvas writes:** Restrict `use_figma` writes to a dedicated `AI-Synced` page or branch so agents never overwrite locked master design systems.

#### 2 Anti-Drift CI & Lint Gates

- **Ban raw hex & arbitrary Tailwind values:** Enable ESLint / Stylelint rules rejecting `bg-[#...]`, `p-[13px]`, or raw inline `style={{}}` in PRs.
- **Code Connect CI sync:** Run `npx figma connect publish --dry-run` on every design-system PR to catch broken component URLs or renamed props before merge.
- **Visual regression on every PR:** Pair Storybook + Chromatic or Playwright screenshot diffs to catch 2px regressions across Light/Dark and mobile viewports.

### Design-to-Code Pull Request Review Gate

| Check Category | Automated CI Check | Human Reviewer Verification |
| --- | --- | --- |
| **Token Integrity** | Lint blocks hardcoded hex colors & non-scale spacing | Confirm Dark Mode & high-contrast themes use semantic tokens |
| **Component Reuse** | Check imports against `@/components/ui` allowlist | Reject duplicate buttons, modals, or custom dropdown wrappers |
| **Accessibility** | `axe-core` / Playwright a11y scan in Storybook CI | Tab through keyboard focus order, Esc-to-close, ARIA live regions |
| **Visual Parity** | Playwright / Chromatic snapshot diff vs. baseline | Side-by-side spot check against Figma frame + edge-case copy |
| **State Coverage** | Unit tests for loading, empty, and API error states | Verify optimistic UI, skeleton heights, and long-text truncation |

#### Watch Out for Shadow Libraries & Seat-Limit Bottlenecks

When engineers run into Starter/View seat MCP limits (20 reads/mo), they often fall back to pasting screenshots or installing unvetted third-party MCP bridges that scrape files via personal tokens. Provision proper **Dev seats** and standardize on the official Remote MCP endpoint so security and rate-limit telemetry stay centralized.

## 10. End-to-End Ship Loop: Figma → Linear → Agent → Vercel

Figma MCP reaches peak velocity when wired into your broader engineering loop. Here is how high-performing product teams connect design exploration, issue tracking, agentic implementation, and live preview URLs with zero status-meeting friction.

### How Multi-MCP Orchestration Works in Practice

#### 1 Linear + Figma MCP

Give your agent one command: *"Implement LIN-482."* It pulls acceptance criteria from Linear MCP, extracts the embedded Figma URL, fetches tokens via Figma MCP, and scaffolds the branch automatically.

#### 2 Playwright Visual Loop

Instead of eyeballing layouts, pair Figma MCP with Playwright MCP. The agent renders the PR locally, screenshots `390px` and `1280px`, and diffs them against Figma's `get_screenshot`.

#### 3 Designer Live-PR Review

Vercel posts a Preview URL on the PR. Designers test real hover states, keyboard nav, and responsive wrap in a real browser—then sync any final polish back to Figma via `use_figma`.

#### One-Line Multi-MCP Orchestration Prompt

```
<code>Fetch Linear issue LIN-482. Read the linked Figma node via Figma MCP (get_design_context, get_variable_defs, get_code_connect_map). Implement the UI in a new branch using @/components/ui, add Playwright tests at 1280px & 390px, compare against get_screenshot, and open a draft PR with before/after screenshots.</code>
```

#### Cultural Unlock: "No-Handoff" Live Pairing

Because MCP compresses first-pass UI coding from hours to minutes, designers and engineers can pair on a single 20-minute call: tweak a spacing variable in Figma, re-run the agent, and review the live hot-reloaded component together before merging.

## 11. Troubleshooting Clinic (Top 7 Fixes) & Pre-Flight

When an MCP call returns empty context, hardcoded colors, or missing write tools, the cause is almost always one of these seven misconfigurations. Diagnose in seconds, then run the 6-point pre-flight check before every sprint.

| Symptom | Root Cause | Exact Fix |
| --- | --- | --- |
| **1. Agent outputs raw hex & `p-[17px]`** | Figma fills/gaps are unbound or agent skipped `get_variable_defs` | Bind fills & spacing to Figma Variables; add *"call get_variable_defs first"* to `CLAUDE.md` / `.cursor/rules`. |
| **2. Div soup & `position: absolute`** | Source frame uses loose Groups instead of nested Auto-Layout | Select containers in Figma, apply `Shift+A` (Auto-Layout), set Fill/Hug constraints, and re-extract. |
| **3. Code Connect ignored by MCP** | Mappings unpublished, legacy v1 parser used, or wrong node URL | Upgrade to `@figma/code-connect@2.x` template files and run `npx figma connect publish`. |
| **4. `use_figma` missing in tool list** | Connected to Desktop MCP instead of Remote MCP, or stale config | Switch endpoint to `https://mcp.figma.com/mcp`, reinstall official Figma plugin, and re-auth OAuth. |
| **5. Rate limit / 429 error mid-sprint** | Engineer is on Starter or View/Collab seat (~20 read calls/mo) | Upgrade engineer to a **Dev** or **Full** seat and verify identity via MCP `whoami`. |
| **6. Context overflow on large page** | Whole-page URL passed directly to `get_design_context` | Call `get_metadata` first, then extract one section node-ID at a time (Header, Grid, Modal). |
| **7. Inline 200-line SVGs for icons** | Icons are ungrouped vectors rather than named components | Wrap icons in named Figma components (`Icon/*`) and map to `lucide-react` in repo rules. |

### 6-Point Design-to-Code Pre-Flight Checklist

✓

**Remote MCP Authenticated:** Agent connected to `https://mcp.figma.com/mcp` on a Dev/Full seat; `whoami` succeeds.

✓

**Auto-Layout & Naming Clean:** Zero loose Groups, explicit Fill/Hug sizing, and semantic container names on the target frame.

✓

**Variables Bound 100%:** Colors, spacing, and radii use semantic Figma Variables matching Tailwind v4 `@theme` tokens.

✓

**Core Primitives Connected:** Top 20 UI components published via Code Connect v2 templates or Code Connect UI.

✓

**Repo Rules Committed:** `CLAUDE.md` or `.cursor/rules` mandates component reuse, icon library imports, and zero raw hex.

✓

**Visual & A11y Gate Wired:** Agent verifies with `get_screenshot` + Playwright at `1280px`/`390px` and runs `axe-core` before PR.

#### Final Takeaway: Invest in the Bridge, Not Just the Prompt

Teams that treat Figma Variables, Auto-Layout, and Code Connect v2 as shared engineering infrastructure turn Figma MCP into a compounding multiplier—shipping pixel-faithful, accessible React/Tailwind UI in a fraction of the time with zero design-system drift.

---

## Edition Note & Attribution

This 12-page handbook, its topic structure, and its illustrations were generated with AI under human editorial direction and print-layout QA. Verify commands, pricing tiers, and security settings against official vendor documentation before production use.

- AI & Editorial Disclosure: https://twelve-pages.com/editorial
- Terms & Licensing: https://twelve-pages.com/terms
- Privacy & Cookie Notice: https://twelve-pages.com/privacy
