Figma Integration Guide
What is Figma for developers?
claude plugin install figma@claude-plugins-official, then paste frame links. Budget calls per seat.
The plugin bundles the remote server and 11 skills. Load figma-use before every use_figma call. use_figma returns at most 20 KB per call, can't import images, and is free only during the beta. Call get_metadata before design context on large frames. Code Connect 2.0.2 accepts only template files: a // url= comment, figma.selectedInstance.getString/getEnum, and export default { example: figma.code`...` }. The figma.connect() parsers need @1. On the REST API, PATs expire within 90 days. Tier 1 file and image calls allow 10–20 a minute on Dev/Full seats but only 20 a month on View/Collab. The Variables API is Enterprise-only. Webhooks V2 aren't signed, so constant-time compare the passcode and return 400 on a mismatch.
Five Figma primitives
One MCP for agents, plus REST, Code Connect, and plugins for everything else.
███████╗██╗ ██████╗ ███╗ ███╗ █████╗
██╔════╝██║██╔════╝ ████╗ ████║██╔══██╗
█████╗ ██║██║ ███╗██╔████╔██║███████║
██╔══╝ ██║██║ ██║██║╚██╔╝██║██╔══██║
██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝Figma Integration Guide
Focus: Design-to-code and code-to-design workflows from Claude Code using the official Figma MCP server, plus the REST API, Webhooks V2, Code Connect, and the Plugin API.
Overview
Figma is codeAmani's design source of truth. Its official Figma MCP server gives Claude Code direct access to design files. Claude can read component specs and variables, generate code from a frame, write native Figma content back to the canvas, and keep Code Connect mappings current. The REST API covers automation that has no agent in the loop: CI token sync, asset export, and webhooks.
The MCP works in both directions, and codeAmani uses both:
Naming: Figma's docs now call it the "Figma MCP server". The older name "Dev Mode MCP server" is gone from the docs, though some blog posts still use it.
Official Documentation
Plans, seats and what they unlock (verified 2026-10-20)
Seat type matters more than plan here. It sets your MCP and REST rate limits, decides whether you can use Dev Mode and Code Connect, and decides whether you can write to the canvas.
Seat prices (USD per seat per month, from figma.com/pricing; Organization and Enterprise bill annually):
| Plan | Full | Dev | Collab | View |
|---|---|---|---|---|
| Starter | Free (limited) | — | — | Free |
| Professional | $16 | $12 | $3 | Free |
| Organization | $55 | $25 | $5 | Free |
| Enterprise | $90 | $35 | $5 | Free |
Monthly AI credits per seat: Professional Full seats get 3,000, Organization 3,500 and Enterprise 4,250. Dev and Collab seats get 500. Starter gets 150 a day, capped at 500 a month. Figma Make and Figma Sites (beta) come with Full seats.
MCP server tool-call limits (they apply to read tools):
| Seat | Starter | Professional | Organization | Enterprise |
|---|---|---|---|---|
| View, Collab | up to 20 / month | up to 20 / month | up to 20 / month | up to 20 / month |
| Dev, Full | — | 200 / day, 10 / min | 200 / day, 15 / min | 600 / day, 20 / min |
- Education plans get the Professional Dev/Full limits.
- These calls don't count toward the limits:
add_code_connect_map,create_new_file,generate_figma_designandwhoami. Actions that spend AI credits, such asgenerate_imageand Make prompts, don't count either.
What each feature needs:
| Capability | Requirement |
|---|---|
| Remote MCP (read) | Any plan or seat (rate-limited as above) |
| Desktop MCP server | Dev or Full seat on Professional, Education, Organization, Government or Enterprise, plus the desktop app |
use_figma and other canvas writes | Remote server, Professional or higher plan, edit access to the file (Full seat to write outside drafts) |
| Code Connect (CLI or UI) | Dev or Full seat on Professional, Organization or Enterprise. Professional allows one active library and one active framework. |
| Variables REST API | Enterprise only. GET needs any org member with view access. POST needs a Full seat with edit access (guests can't use it). |
| Plan access tokens | Organization or Enterprise |
Recommendation for codeAmani: give engineers who drive Claude Code a Dev seat on Professional ($12). It unlocks 200 MCP reads a day, Code Connect and Dev Mode. Only people who need canvas writes (
use_figma) through the agent need a Full seat.
MCP server setup for Claude Code
Remote server (recommended)
The remote server lives at https://mcp.figma.com/mcp. It uses OAuth ("Allow access" in the browser), so there's no token header, and it doesn't need the desktop app. It's the only server that can write to the canvas.
Option A: the Figma plugin for Claude Code. This bundles the MCP server config plus Figma's 11 agent skills:
claude plugin install figma@claude-plugins-official
# restart Claude Code → /plugin → right-arrow to "Installed" → select figma → Enter → Enter
# → browser opens → "Allow access" → /plugin again shows figma connectedIf the install command fails, your org may block plugin installs. Use option B and add the skills manually.
Option B: add the server manually. This gives you the MCP tools without the skills:
claude mcp add --transport http figma https://mcp.figma.com/mcp # this project only
claude mcp add --scope user --transport http figma https://mcp.figma.com/mcp # all projects
# new session → /mcp → figma → Authenticate → "Allow access".mcp.json equivalent (see examples/mcp-config.json):
{
"mcpServers": {
"figma": { "type": "http", "url": "https://mcp.figma.com/mcp" }
}
}Figma skills come with the plugin. Without it, download them from Figma's mcp-server-guide GitHub repo:
| Skill | Use it for |
|---|---|
figma-use | Load before every use_figma call. Writes frames, components, variables and auto layout. |
figma-generate-design | Builds full screens from your design-system components |
figma-generate-library | Builds or updates a design-system library from the codebase, in phases |
figma-create-new-file | Load before create_new_file |
figma-code-connect | Authors Code Connect template files and mappings |
figma-code-workflows | Imports a local project as a code layer, a Make file, or design layers |
figma-generate-diagram | FigJam flowcharts, sequence, ER, state and Gantt diagrams |
figma-use-figjam / figma-use-slides | Writes to FigJam boards and Slides decks |
figma-swiftui | SwiftUI to and from Figma |
figma-spec | Reads and writes Figma Specs (open beta) |
The installed plugin also ships extras such as figma-implement-motion, figma-shaders and figma-generative-plugins. Run /plugin to see what your copy has.
Desktop server (limited)
In the Figma desktop app, open a Design file, switch to Dev Mode, and click Enable desktop MCP server in the right sidebar. It listens on http://127.0.0.1:3845/mcp.
claude mcp add --transport http figma-desktop http://127.0.0.1:3845/mcpThe desktop server is selection-based and can't write to the canvas or send UI to Figma. Figma "strongly recommends" the remote server. Figma for Government supports only the desktop server.
Third-party: figma-developer-mcp ("Framelink")
figma-developer-mcp@0.13.2 is a community stdio server, not Figma's. It reads through the REST API with a personal access token (PAT), so it uses up your REST rate limits (Tier 1: 10–20/min on Dev/Full seats). Use it only where OAuth isn't possible.
claude mcp add figma-framelink -- npx -y figma-developer-mcp --figma-api-key=${FIGMA_ACCESS_TOKEN} --stdioMCP tools (current inventory)
The remote server needs a link to a frame or layer. The desktop server reads your current selection. Copy a link to the frame (right-click → Copy link to selection) and paste it into the prompt.
Read (these count toward rate limits):
| Tool | What it does | Server |
|---|---|---|
get_design_context | The workhorse. Returns code plus design context for a layer (React + Tailwind by default) | both |
get_screenshot | Screenshot of one node per call | both |
get_metadata | Lightweight XML outline (ids, names, sizes). Use it on big frames, then fetch the parts you need. | both |
get_variable_defs | Variables and styles used in the selection (your tokens) | both |
get_code_connect_map | Existing Code Connect mappings for the instances in a selection | both |
get_figjam | FigJam diagram as XML plus screenshots | both |
get_motion_context | Animation data plus CSS/Motion snippets (call after get_design_context) | both |
search_design_system | Searches libraries for components, variables and styles | remote |
get_libraries | Lists added and available libraries | remote |
download_assets | Exports nodes or original images, up to 20 per call | remote |
whoami | Your identity, plans and seats (also returns the planKey) | remote |
list_shaders, get_shader, list_file_shaders | Shader effects and fills | both |
list_generative_plugins, get_generative_plugin | Generative plugins | remote |
Write:
| Tool | What it does |
|---|---|
use_figma | Runs Plugin API JavaScript in the file to create, edit and inspect content across Design, FigJam, Slides and Specs. Beta, free during the beta, "will eventually become a usage-based paid feature." |
create_new_file | Blank Design, FigJam or Slides file in your drafts |
generate_figma_design | Sends live web UI (production, staging or localhost) to Figma as layers. Only some MCP clients support it, and it doesn't count toward rate limits. |
html_to_figma | Converts a self-contained HTML document (up to 50 MB) into layers |
upload_assets | Uploads PNG, JPG, GIF, WebP or SVG images (10 MB each, up to 60 per call) |
generate_image | Text-to-image. Spends AI credits, and the links expire after 7 days. |
generate_diagram | FigJam diagram from a description or Mermaid |
add_code_connect_map | Maps a Figma component to a code component |
send_code_to_figma | Imports a local project (.zip, .tar.gz or .tgz) as a Make file or code layer. The first upload is free, and later prompts spend credits. |
create_shader, update_shader, create_generative_plugin, update_generative_plugin | Need the matching skill plus a planKey from whoami |
Weave (weave_*, 9 tools) needs a paid standalone Weave account and spends Weave credits. The old list_shader_effects, list_shader_fills, get_shader_effect and get_shader_fill tools are deprecated in favor of list_shaders and get_shader. The prompt create_design_system_rules writes a rules file that steers code generation toward your codebase.
Figma Make context. Paste a Make file URL into the prompt, and the server exposes the Make project's files as MCP resources the agent can pull into its context. This works on any plan with view access, as long as the client supports MCP resources.
Design → code workflow
- Paste a link to the frame, for example
https://www.figma.com/design/<FILE_KEY>/Design-System?node-id=1-23. - If the frame is large, call
get_metadatafirst, thenget_design_contexton the sub-nodes you need. Big frames are slow and can time out. - Call
get_variable_defsand map the tokens to Tailwind theme keys. Never hard-code hex values. - Call
get_screenshotto check the result visually. - If a component has a Code Connect mapping,
get_design_contextreturns your real component's usage instead of generated markup. That's the main reason to keep Code Connect current.
Every read in this loop counts against your seat's limit. A typical component costs about 3–5 calls, so a Professional Dev seat can do roughly 40–60 components a day.
Slash command: /figma
.claude/commands/figma.md:
Implement the Figma design at: $ARGUMENTS
1. If the frame is large, call `get_metadata` first and work node-by-node.
2. Call `get_design_context` and `get_variable_defs` for the node in the link.
3. Reuse existing components (check Code Connect snippets in the response); map
variables to our Tailwind theme tokens — no hard-coded hex or px.
4. Call `get_screenshot` and compare your output against it.
5. Write a typed React component (named export) under `components/`, plus a story.Code → design (write to canvas)
Three remote-only tools cover this direction:
| Tool | Direction | Output |
|---|---|---|
create_new_file | scaffold | A blank Design, FigJam or Slides file |
use_figma | code or intent → canvas | Native components, variables, frames and auto layout, built through the Plugin API |
generate_figma_design | running app → canvas | Flat layers captured from the browser, for review |
Workflow:
- Load
figma-create-new-file, then callcreate_new_file(skip this if a target file already exists). - Load
figma-use. Skipping this skill causes hard-to-debug failures. For full screens, also loadfigma-generate-design. - Call
search_design_systemandget_variable_defsso the new work reuses real tokens and components. - Call
use_figmain small increments. Each call's output is capped at 20 KB. - Review the result and clean it up by hand. Figma calls the output "beta quality."
use_figma limits:
- It can't add images itself. Use
upload_assetsorgenerate_imageinstead. - It doesn't support components that contain images or video, or GIFs.
- Fonts must be uploaded to your Figma account. Fonts installed only on your machine aren't available.
- You have to publish components manually before Code Connect mappings can be completed.
Code Connect (@figma/code-connect@2.0.2)
Code Connect maps a Figma component to your real component. Dev Mode and the MCP's get_design_context then show real usage instead of generated CSS.
v2.0.0 (18 Aug 2026) was a breaking release. Framework parsers (React
.figma.tsxwithfigma.connect(...), plus HTML, SwiftUI and Compose) no longer get updates. In v2 onlyfigma connect migrateandfigma connect unpublishaccept parser files. Every other command exits and tells you to migrate. Template files (.figma.ts/.figma.js) are the only maintained format. If you must stay on parsers, pin@figma/code-connect@1. The current release is 2.0.2 (14 Oct 2026).figma connect createnow always generates a template file, and on Professional thepublishcommand confirms your one library and one framework.
Correction from the last review: the previous version of this guide showed a v2 example built on
export default figma.connect(Button, {...})with JSX. That's not the template format. Template files declare the node in a// url=comment, read props fromfigma.selectedInstance, and export{ example: figma.code`...` }.
npm install --save-dev @figma/code-connect@2.0.2figma.config.json:
{
"codeConnect": {
"include": ["**/*.figma.ts"],
"label": "React",
"language": "jsx"
}
}Add "types": ["@figma/code-connect/figma-types"] to compilerOptions in tsconfig.json to get types for the figma module.
components/Button.figma.ts (a full version is in examples/Button.figma.ts; it's type-checked and parses with the 2.0.2 CLI):
// url=https://www.figma.com/design/<FILE_KEY>/Design-System?node-id=<NODE_ID>
// source=src/components/Button.tsx
// component=Button
import figma from 'figma'
const instance = figma.selectedInstance
const label = instance.getString('Label')
const disabled = instance.getBoolean('Disabled')
const variant = instance.getEnum('Variant', { Primary: 'primary', Secondary: 'secondary' })
export default {
example: figma.code`<Button variant="${variant}"${disabled ? ' disabled' : ''}>${label}</Button>`,
imports: ['import { Button } from "@/components/Button"'],
id: 'button',
metadata: { nestable: true },
}Instance API: getString, getBoolean, getEnum, getInstanceSwap, getSlot, findInstance, findText, findConnectedInstances and executeTemplate().example. There are also language tags besides figma.code: figma.tsx, figma.html, figma.swift and figma.kotlin.
Commands:
npx figma connect parse --file components/Button.figma.ts # local validation, no network
npx figma connect preview components/Button.figma.ts # render what Dev Mode will show
npx figma connect publish # uses FIGMA_ACCESS_TOKEN (or --token)
npx figma connect migrate --outDir codeconnect/ # convert legacy .figma.tsx parser filesFor icon sets and other large groups of similar components, use batch files (*.figma.batch.json plus one template). Add the glob to include. The Code Connect UI (in Figma, with a GitHub integration) is an alternative to the CLI. Connections published from the CLI show up there, but you can only edit them from the CLI. On a Professional plan, the first publish sets the single active framework. Switching it later (Admin → Settings → Resources → Code Connect) deactivates the old mappings, and the MCP stops returning them.
REST API
The base URL is https://api.figma.com. Files, nodes and images are still under /v1, and webhooks under /v2. Authenticate with the X-Figma-Token: <PAT or plan token> header, or Authorization: Bearer <oauth token> for OAuth apps. For types, install @figma/rest-api-spec@0.45.0 (types only, generated from Figma's OpenAPI spec).
Tokens
| Token | Who / plan | Max lifetime | Notes |
|---|---|---|---|
| Personal access token (PAT) | Any user. Created under Settings → Security → Generate new token. | 90 days (no non-expiring option anymore) | Scoped at creation. It acts as you across every plan you belong to, so it isn't least-privilege. |
| Plan access token | Organization or Enterprise admins (GA 23 Jul 2026, MFA required) | 365 days, refreshable (the old secret keeps working for 24 h) | Not tied to a person. Can be allowlisted to specific files, folders or teams. Can't call file_variables:write, file_comments:write, file_code_connect:write, /v1/me or /v1/oembed. A separate "Figma CLI token" type covers Code Connect publishing. |
| OAuth 2 app | Third-party apps | refresh flow | Apps created before 23 Sep 2025 had to be re-published by 17 Nov 2025. Unpublished apps drop to draft and can't call the API. |
Scopes: use the granular ones. files:read is deprecated (it still works). projects:read and project_metadata:read are deprecated in favor of folders:read and folder_metadata:read, which came with the 10 Aug 2026 folders endpoints. Common choices:
file_content:read: file JSON, nodes and image rendersfile_metadata:readfile_variables:readandfile_variables:write(Enterprise only)library_content:readandteam_library_content:readfile_comments:readandfile_comments:writewebhooks:readandwebhooks:writefile_dev_resources:readandfile_dev_resources:write
Rate limits (in effect since 17 Nov 2025; leaky bucket)
Limits are per minute and apply per user, per plan, per app (OAuth), or per token (plan tokens). For a PAT, the limits of the plan that owns the requested file apply.
| Tier | Endpoints | View / Collab (all plans) | Dev / Full: Pro / Org / Ent |
|---|---|---|---|
| 1 | GET file, GET file nodes, GET image | up to 20 / month | 10 / 15 / 20 |
| 2 | Comments, dev resources, image fills, folders/projects lists, GET variables, versions, webhooks | up to 5 | 25 / 50 / 100 |
| 3 | Components & styles, file/folder/project metadata, users, library analytics, POST variables, activity logs | up to 10 | 50 / 100 / 150 |
A 429 response carries:
Retry-After(seconds)X-Figma-Plan-Tier(enterprise,org,pro,starterorstudent)X-Figma-Rate-Limit-Type(lowfor View/Collab seats,highfor Dev/Full)X-Figma-Upgrade-Link
Run CI token syncs as a Dev or Full seat holder. A View seat PAT gets about 20 file reads a month.
Export nodes (typed, with 429 handling)
Full runnable version: examples/export-node-images.mts.
import type { GetImagesResponse } from "@figma/rest-api-spec";
const res = await fetch(
`https://api.figma.com/v1/images/${fileKey}?ids=1:23&format=png&scale=2`,
{ headers: { "X-Figma-Token": process.env.FIGMA_ACCESS_TOKEN! } },
);
if (res.status === 429) {
const wait = Number(res.headers.get("Retry-After") ?? "60"); // seconds
// back off `wait` seconds, then retry
}
const { images, err } = (await res.json()) as GetImagesResponse;
// images["1:23"] is a short-lived signed URL; download it right awayNode ids use - in URLs (node-id=1-23) and : in API calls (1:23).
Variables REST API (Enterprise only)
The endpoints are GET /v1/files/:key/variables/local, GET /v1/files/:key/variables/published and POST /v1/files/:key/variables. Recent additions are VariableComposedColor and the COLOR_OPACITY scope (17 Sep 2026), plus extended collections and overrides. On Professional or Organization, pull tokens with the MCP's get_variable_defs or a plugin instead.
Webhooks V2
Webhooks live at POST/GET https://api.figma.com/v2/webhooks and attach to a context: a team (20 per team), a folder (5 per folder) or a file (3 per file). File-webhook totals per plan are 150 (Professional), 300 (Organization) and 600 (Enterprise).
| Event | When it fires |
|---|---|
PING | When the webhook is created |
FILE_UPDATE | Within 30 minutes of editing inactivity |
FILE_DELETE | When a file is deleted |
FILE_VERSION_UPDATE | When a named version is created |
LIBRARY_PUBLISH | On a library publish. One publish can emit several events. |
FILE_COMMENT | When someone comments |
DEV_MODE_STATUS_UPDATE | When a layer's Dev Mode status changes |
Verification: there's no HMAC signature. You set a passcode when you create the webhook, and Figma echoes it in every payload. Compare it with a constant-time check and reply 400 on a mismatch, before doing any work. GET calls redact the passcode, so store your copy in the secrets vault. Return 200 fast. Non-200 or slow responses are retried 3 times (after 5 min, 30 min and 3 h), and Figma doesn't disable endpoints that fail often.
// app/api/webhooks/figma/route.ts — full version: examples/webhook-route.ts
import { timingSafeEqual } from "node:crypto";
import type { WebhookFileUpdatePayload, WebhookPingPayload } from "@figma/rest-api-spec";
export async function POST(req: Request): Promise<Response> {
const body = (await req.json()) as WebhookPingPayload | WebhookFileUpdatePayload;
const a = Buffer.from(String(body.passcode));
const b = Buffer.from(process.env.FIGMA_WEBHOOK_PASSCODE ?? "");
if (b.length === 0 || a.length !== b.length || !timingSafeEqual(a, b)) {
return new Response("Invalid passcode", { status: 400 });
}
// enqueue work keyed on body.event_type, then:
return Response.json({ ok: true });
}Other recent REST additions:
- oEmbed API for files and published Makes (25 Mar 2026)
- AI Usage API (Enterprise, 12 Jun 2026)
- Discovery API (Enterprise with Governance+)
- Activity and Developer Logs (Enterprise)
Plugin API (brief)
Plugins run inside the editor through the global figma object, and use_figma uses the same API. Typings come from @figma/plugin-typings@1.142.0. New plugins must set "documentAccess": "dynamic-page" in manifest.json and use the async APIs, such as figma.getNodeByIdAsync and loadAsync for pages. Declare networkAccess.allowedDomains, using ["none"] if the plugin needs no network. editorType takes any of figma, figjam, dev, slides and buzz, except that you can't combine figjam with dev. Plugins can't read team-library assets that haven't been imported into the file.
Environment Variables
Real secrets only. Store them in the secrets vault and .env.local, and never in client bundles:
FIGMA_ACCESS_TOKEN=figd_... # PAT (≤90-day expiry) or plan access token — REST API + `figma connect publish`
FIGMA_WEBHOOK_PASSCODE=... # passcode you set on POST /v2/webhooksNon-secret settings:
| Name | Example | Purpose |
|---|---|---|
FIGMA_FILE_KEY | AbCdEfGhIjKl | Default design-system file for scripts |
FIGMA_TEAM_ID | 1234567890 | Team id for library and webhook context |
DO_NOT_TRACK | 1 | Opts figma connect publish out of preflight telemetry (added in 2.0.2) |
The MCP server itself needs no env var, because it uses OAuth.
GitHub Actions: design-token sync
# .github/workflows/design-tokens.yml
name: Sync Figma tokens
on:
schedule: [{ cron: "0 9 * * 1" }] # Mondays
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@<pinned-sha> # pin Actions by SHA (codeAmani SLSA policy)
- uses: actions/setup-node@<pinned-sha>
with: { node-version: "22" }
- run: npm ci
- name: Fetch tokens
env:
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }} # Dev/Full-seat PAT or plan token
FIGMA_FILE_KEY: ${{ vars.FIGMA_FILE_KEY }}
run: node scripts/sync-tokens.mjs
- name: Open PR with updated tokens
run: |
git diff --quiet src/tokens/ || echo "tokens changed: open a PR rather than pushing to main"The Variables REST API is Enterprise-only. On Professional, sync-tokens should read published styles from the file JSON (GET /v1/files/:key), or the team should export variables with a plugin. A PAT expires within 90 days, so put a rotation reminder in the calendar. Use a plan access token (up to 365 days) on Organization or Enterprise.
Common Use Cases
| Use case | Approach |
|---|---|
| Design → React component | get_design_context + get_variable_defs + get_screenshot |
| Huge frame | get_metadata first, then design context per child node |
| Component library sync | search_design_system / get_libraries |
| Design tokens | MCP get_variable_defs, or the Variables REST API (Enterprise) |
| Push a coded component into Figma | figma-use skill → use_figma |
| Capture a running page for design review | generate_figma_design |
| Code Connect | template files + npx figma connect publish, or add_code_connect_map |
| FigJam diagrams | generate_diagram or the figma-generate-diagram skill |
| CI asset export | REST GET /v1/images (Tier 1, so mind the rate limits) |
Troubleshooting
| Issue | Fix |
|---|---|
| 429 from MCP after a handful of calls | You're on a View or Collab seat (20 calls a month). Get a Dev or Full seat. |
REST 429 with X-Figma-Rate-Limit-Type: low | The PAT owner has a View or Collab seat. Use a Dev/Full owner or a plan token, and honour Retry-After. |
| 403 Forbidden | The token is missing a scope (for example file_content:read) or has no access to the file, or the PAT has expired (90-day max). |
get_design_context is slow, times out or returns huge output | Call get_metadata first, then fetch smaller nodes |
| Remote server ignores "my selection" | The remote server needs a link. Selection-based prompts only work on the desktop server. |
use_figma fails or produces junk | Load the figma-use skill first, work in smaller increments, and check that you have edit access on a Professional or higher plan |
Images missing after use_figma | Expected. Add them with upload_assets or generate_image. |
figma connect says to migrate | You're on v2 with .figma.tsx parser files. Run npx figma connect migrate, or pin @figma/code-connect@1. |
| Code Connect snippets vanished from MCP output | On Professional, someone changed the active framework or library, and the old mappings are now Deactivated |
| Variables API returns 403 | It's Enterprise-only, and POST also needs a Full seat with edit access |
| Webhook events ignored | Check the passcode. Return 200 quickly, because slow responses count as failures. |
| MCP won't connect | The endpoint is https://mcp.figma.com/mcp. Re-run /mcp → figma → Authenticate. |
codeAmani notes
- Secrets stay server-side.
FIGMA_ACCESS_TOKENandFIGMA_WEBHOOK_PASSCODElive in the secrets vault and.env.local. Call the REST API only from route handlers, server actions or CI, never from the browser. - The webhook-verification rule applies. Figma has no signature, so the constant-time
passcodecheck is the verification step. Reply400on a mismatch before any side effects. - Design source of truth. All motionstack UI work starts from a Figma frame link. Pull tokens with
get_variable_defsand map them totailwind.config.ts. Never hard-code hex. - AI routing. Claude Code with the Figma MCP is the default design ↔ code agent (Anthropic is the primary provider).
generate_imageand Make prompts spend Figma AI credits, not our Anthropic budget, so keep an eye on them on Full seats. - Seats. Engineers get Dev seats ($12, Professional). Designers who also drive
use_figmaget Full seats ($16). View seats aren't viable for agent work, at 20 calls a month. - Plan for
use_figmacosts. It's free during the beta but will become usage-based. Don't build an automated pipeline that depends on unlimited canvas writes. - Payments. Figma has no payment surface for our apps. Stripe stays the default, and M-Pesa is only for Kenya-targeted projects. Figma's own plugin Payments API is unrelated to how we bill.
- African-market UI. For Kenya-targeted projects, design at 360 px mobile widths first. Keep exported assets light (prefer SVG, and
scale=1orscale=2PNGs only when needed), because users are on 2G/3G.