Skip to content
FramesField
ASSET 02 Beginner Setup (1 Command) MCP Server
VERIFIED 2026-11-26
Raw .md

Figma Dev Mode MCP Token & Frame Inspector

Where & How To Use This

Enable Dev Mode MCP in Figma Desktop Preferences, then run the 1-line command below in Claude Code (or paste the JSON into Cursor MCP settings) so your AI can inspect your selected Figma frame directly.

Configure the official Figma MCP Server inside Claude Code or Cursor so agents can read selected Figma frame trees, extract exact CSS custom properties and spacing tokens, and emit pixel-accurate Tailwind v4 or Astro components directly from verified design nodes.

Works With Glossary
Claude Code Cursor MCP
Target tool: Figma · License: MIT

1. Quick Install Command

Terminal Command
claude mcp add --transport http figma-desktop http://127.0.0.1:3845/mcp

2. Copyable MCP Server File

COPY OR DOWNLOAD RAW FILE
Figma Dev Mode MCP Token & Frame Inspector mcp.json
{
  "mcpServers": {
    "figma-desktop": {
      "type": "http",
      "url": "http://127.0.0.1:3845/mcp"
    },
    "figma-remote": {
      "type": "http",
      "url": "https://mcp.figma.com/mcp"
    }
  }
}

3. Example Input & Expected Output

Sample Prompt / Input
"Inspect the currently selected Figma frame via figma-desktop MCP. Extract exact design variables (surface, ink, hairline border, monospace size) and generate a semantic Astro component using Tailwind v4 utility tokens—do not invent box shadows or gradients not present in the node tree."
Expected Output
- Calls `get_variable_defs` and `get_code` / `get_metadata` against the selected node ID.
- Maps Figma variables directly to CSS custom properties (`--bg-surface`, `--border-hairline`).
- Emits a clean `.astro` component matching exact auto-layout padding, 1px strokes, and tabular-nums rules.

What You Need & Known Limits

Requirements

  • Figma Desktop App (latest version) with Dev Mode MCP Server enabled in Preferences -> Dev Mode, OR Figma Remote MCP OAuth access
  • Paid Figma Dev or Full seat for full variable and code inspection endpoints
  • MCP-compatible client (Claude Code CLI, Cursor 0.48+, or Windsurf)

Watch Out For

  • Desktop server binds locally to 127.0.0.1:3845 and only inspects frames in the currently open Figma desktop window
  • Deeply ungrouped frames without Auto Layout produce absolute coordinates that require manual grid refactoring

Pairing Figma MCP with a strict Token Contract

Connecting Figma via MCP eliminates screenshot-to-code guesswork—your agent reads real spacing, stroke widths, hex tokens, and font weights straight from the document graph. For best results, organize Figma styles using semantic variable names (bg/canvas, ink/primary, border/hairline) before invoking your coding agent so generated CSS variables map 1:1 to your codebase.

Frequently Asked Questions

02 Q&A
Q01 Should I use Figma Desktop MCP (127.0.0.1:3845) or Figma Remote MCP (mcp.figma.com)?
Use Desktop MCP when iterating live on the currently selected canvas node with zero URL copy-pasting. Use Remote MCP (`https://mcp.figma.com/mcp`) in headless or cloud workflows where you pass Figma node URLs directly in the prompt.
Q02 How do I prevent the agent from hallucinating extra Tailwind shadows or rounded corners?
Explicitly instruct the agent to query `get_variable_defs` first and constrain styling exclusively to returned Figma variables, cornerRadius, and strokeWeight values.