Skip to main content
Glama
Figma MCP

Figma MCP

by alucardeht

@alucardeht/figma-mcp

License: MIT

MCP server for Figma API with intelligent context management and token optimization.

v3.0.0 — Compact tree output format with 95% token savings.


Installation

Claude Code

claude mcp add figma -e FIGMA_ACCESS_TOKEN=your-token-here -- npx -y github:alucardeht/figma-mcp

Get your Figma Token

  1. Open Figma Settings

  2. Navigate to Personal access tokens

  3. Click Create a new token

  4. Copy the token immediately (it won't be shown again)


Related MCP server: Figma MCP Server

Requirements

Figma Plan

The Figma REST API works with any plan, but rate limits differ significantly:

Plan

File Access

Rate Limit

Starter (Free)

6 requests/month

Impractical for real use

Professional

Unlimited

120 req/min

Organization

Unlimited

480 req/min

Important: Free accounts are limited to 6 API calls per month for file content. This makes the MCP server impractical without a paid plan.

Dev Mode is not required — this MCP uses the REST API, not Dev Mode features.


Features

Compact Tree Output (NEW in v3.0)

  • 95% token reduction: 205k chars → 10k chars for typical landing pages

  • ASCII tree format: Clear hierarchical structure with ├─, └─, │

  • Essential info preserved: Positions, dimensions, colors, layouts, overflow indicators

Example output:

Landing page [1440x2462 bg:#f2f2f2]
├─ header [1440x469]
│  ├─ nav [1440x81 row gap:99]
│  │  ├─ logo [155x30 INSTANCE]
│  │  └─ navHeaderLinks [456x49 row gap:8]
│  └─ zipCode [1188x147 bg:#fff radius:20]
├─ aboutContainer [1169x122 row]
│  ├─ aboutBox [391x122 radius:25]
│  └─ aboutBox [408x122 radius:25]
└─ footer [1440x90 row gap:309]

Smart Navigation

  • Name-based access: Use human-readable names, no IDs required

  • Partial matching: "Landing" matches "Landing page"

  • Session state: Maintains context across requests

Invisible Element Filtering

By default, elements with visible: false in Figma are excluded from all MCP outputs:

  • Frame structure (get_frame_info) - Only visible elements in the tree

  • Asset extraction (extract_assets) - Only visible icons and images

  • Style collection (extract_styles) - Only styles from visible elements

  • Page analysis (analyze_page_structure) - Only visible sections and components

This ensures the MCP output matches what you actually see in Figma's design view, not hidden elements used for design iteration, disabled variants, or placeholder components.

Why this matters: Designers often hide elements (placeholders, alternative versions, work in progress). Without filtering, the AI model would see and potentially implement these invisible elements, causing divergence from the intended design.

Asset Management

  • Organized extraction: Assets saved to icons/ and images/ folders

  • Design tokens: Extract colors, typography, effects

  • Configurable screenshots: Scale 1-4x with dimension limits


Available Tools

Navigation

Tool

Description

list_pages(file_key)

List all pages in a file

list_frames(file_key, page_name)

List frames on a page

get_frame_info(file_key, page_name, frame_name, depth?)

Get frame structure in compact format

get_frame_info(file_key, node_id?, depth?)

Get frame via node_id (faster direct access)

search_components(file_key, query)

Find components by name

Extraction

Tool

Description

get_screenshot(file_key, page_name, frame_name)

Export frame as PNG

get_screenshot(file_key, node_id?)

Export frame via node_id (faster direct access)

extract_styles(file_key, page_name, frame_name)

Extract design tokens

extract_assets(file_key, page_name, frame_name)

Export SVGs and images

get_file_styles(file_key)

List published styles

Validation

Tool

Description

validate_implementation(file_key, url, figma_node_id, ...)

Pixel-perfect comparison between Figma and browser, results organized by visual sections with match scores, bounds, colors, and CSS tree

check_layout_bounds(file_key, page_name, frame_name)

Detect content overflow

compare_element_position(file_key, page_name, frame_name, element_name, browser_x, browser_y)

Compare position: Figma vs browser

compare_element_dimensions(file_key, page_name, frame_name, element_name, browser_width, browser_height)

Compare dimensions: Figma vs browser

compare_visual(file_key, page_name, frame_name, screenshot_path)

Pixel-perfect diff with pixelmatch

verify_elements_present(file_key, page_name, frame_name, element_names)

Check elements exist in DOM

verify_assets_loaded(file_key, page_name, frame_name)

Verify images are loaded

validate_responsive_breakpoint(file_key, page_name, frame_name, viewport_width)

Validate specific viewport

test_all_breakpoints(file_key, page_name, frame_name)

Test mobile, tablet, desktop

Session

Tool

Description

repeat_last()

Replay previous response from cache

get_session_state()

View current session state

reset_session()

Clear all cached data


Direct Access via Node ID

Both get_frame_info and get_screenshot accept node_id as an alternative to page_name + frame_name for faster, direct access.

How to get node_id:

  1. Open frame in Figma editor

  2. Copy the ID from the URL: https://www.figma.com/design/FILE_KEY/...?node-id=NODE_ID

  3. Node ID format example: 40000056-28165

Usage:

get_frame_info(file_key="h75vgHNcwxfHkRBbI53RRu", node_id="40000056-28165", depth=4)
get_screenshot(file_key="h75vgHNcwxfHkRBbI53RRu", node_id="40000056-28165")

Benefits:

  • Skips page/frame name lookup (1 fewer API call)

  • More direct and reliable

  • Useful for specific design reviews


Compact Format Reference

The get_frame_info tool returns a compact tree format optimized for LLM context:

element-name [[x,y wxh] attributes]
├─ child [[x,y wxh] attributes]
│  └─ grandchild [wxh attributes]
└─ sibling [wxh attributes]

Attributes shown:

  • bg:#hex — Background color

  • row / col — Layout direction

  • gap:N — Spacing between children

  • radius:N — Border radius

  • shadow — Has drop shadow

  • INSTANCE / VECTOR / TEXT — Node type

  • ↓overflow:Npx — Content overflows bounds


Example Workflow

1. list_pages("h75vgHNcwxfHkRBbI53RRu")
   → ["Home", "Components", "-> Validado"]

2. list_frames(file_key, "Validado")
   → ["Landing page", "Login", "Dashboard"]

3. get_frame_info(file_key, "Validado", "Landing page", depth=4)
   → Compact tree with full structure (165 lines, ~2.5k tokens)

4. extract_assets(file_key, "Validado", "Landing page")
   → icons/icon-1.svg, icons/icon-2.svg, images/hero.png

Rate Limits

Plan

Requests/min

Free

120

Professional

240

Organization

480

Use pagination with continue=true to stay within limits.


License

MIT


Issues? Open an issue

Available Tools

15 tools
analyze_page_structureA

Analyze page structure BEFORE any implementation.

MUST BE CALLED FIRST for any large page/frame.

HOW IT WORKS:

  • Identifies sections by background color changes

  • Detects transition elements spanning multiple sections

  • Groups icons by section

  • Estimates token usage

  • Recommends agent count for parallel work

RETURNS:

  • sections: List with id, name, bgColor, bounds, complexity

  • transition_elements: Elements spanning multiple sections

  • icons_by_section: Icons organized by section

  • total_estimated_tokens: Token estimate for full frame

  • recommended_division: 'single' or 'multiple'

  • recommended_agent_count: How many agents to use

TYPICAL WORKFLOW:

  1. analyze_page_structure → understand structure

  2. If recommended_division='multiple': use get_section_screenshot

  3. Each agent uses get_agent_context for its section

Inputs: file_key (required), page_name (required), frame_name (required).

extract_assetsA

Extract all assets from a frame with progress tracking.

HOW IT WORKS:

  • Detects "composite groups" (image + decorative shapes) and exports them as single PNG

  • For composite groups, the ENTIRE group is exported as one image, preserving layout

  • Automatically categorizes into icons/, images/, and images/composites/

  • Uses smart naming based on component hierarchy

  • Shows progress: "Processing batch 1/5 - found 8 icons, 3 images, 2 composites"

  • Final summary with all file paths

  • Look for "isCompositeAsset: true" in the frame tree to identify composite groups

TYPICAL WORKFLOW:

  1. get_frame_info → see what assets exist and identify composite groups

  2. extract_assets → download all

  3. Check summary for file paths

Inputs: file_key (required), page_name (required), frame_name (required), output_dir.

extract_stylesA

Extract all design tokens from a frame.

HOW IT WORKS:

  • Collects colors, fonts, spacing, border radius, shadows

  • Returns organized JSON ready for CSS/theme generation

  • No chunking needed (compact output)

TYPICAL WORKFLOW:

  1. get_frame_info → understand structure

  2. extract_styles → design tokens

  3. Use tokens to build theme/CSS

Inputs: file_key (required), page_name (required), frame_name (required).

get_agent_contextA

Prepare agent context for parallel implementation of a section.

HOW IT WORKS:

  • Call after analyze_page_structure to identify sections

  • Returns complete context for a single agent to implement one section

  • Handles responsibilities: what to implement vs coordinate

  • Includes icons, styles, and transition element info

  • Generates agent-specific instructions with coordination rules

RETURNS:

  • section: Details (id, name, background color, bounds)

  • responsibilities: what agent implements, coordinates, or skips

  • assets: icons and images in this section

  • styles: colors, fonts, spacing specific to section

  • agent_info: index, total agents, is_first, is_last

  • instructions: detailed markdown instructions for this agent

TYPICAL WORKFLOW:

  1. analyze_page_structure → identify sections

  2. For each section: get_section_screenshot → visual reference

  3. get_agent_context(sectionId, agentIndex) → agent-specific context

  4. Each agent implements using provided context

Inputs: file_key (required), page_name (required), frame_name (required), section_id (required), +2 more.

get_file_stylesA

Get all published styles defined in the file.

HOW IT WORKS:

  • Returns design system tokens: colors, text styles, effects

  • These are the official styles defined in Figma

  • Compact output, no chunking needed

TYPICAL WORKFLOW:

  1. get_file_styles → global design tokens

  2. extract_styles(frame) → frame-specific tokens

  3. Combine for complete design system

Inputs: file_key (required).

get_frame_infoA

Get detailed info about a specific frame.

IMPORTANT: This should be your FIRST call for any implementation task. Always call get_frame_info BEFORE taking screenshots to understand the structure.

HOW IT WORKS:

  • Returns all components, text, colors, and styles

  • Large frames (>1000 elements) trigger warning with strategy

  • Use depth parameter to control detail level

  • Automatically chunks if response too large

The tree includes special markers:

  • isCompositeAsset: true = Export this GROUP as a single image (contains image + shapes)

  • isSmallElement: true = Small UI element that may be easily missed

TYPICAL WORKFLOW:

  1. list_frames → find frame name

  2. get_frame_info(frame_name) → structure

  3. extract_styles → design tokens

  4. extract_assets → icons/images

Inputs: file_key (required), page_name (required), frame_name (required), depth, +1 more.

get_full_page_contextA

Get complete page context in ONE call with all sections, assets, screenshots, and styles.

WHAT YOU GET IN ONE CALL:

  • Complete page structure with all sections identified

  • Screenshots for each section (base64 encoded)

  • All assets organized by section with unique names

  • Design tokens per section

  • Asset map for quick lookup

  • Agent instructions ready for parallel implementation

  • Transition elements that span multiple sections

PERFECT FOR:

  • Getting full context before implementation

  • Preparing data for parallel multi-agent work

  • Quick assessment of page complexity

  • One-call solution for complete page understanding

RETURNS:

  • overview: Frame metadata and recommendations

  • sections: Array with all section details including screenshots

  • assetMap: Quick lookup table for assets by unique name

  • agentInstructions: Pre-written instructions for each agent

  • transitionElements: Elements spanning multiple sections

TYPICAL WORKFLOW:

  1. get_full_page_context → get everything at once

  2. Distribute sections to multiple agents using agentInstructions

  3. Each agent implements their section with all necessary context

Inputs: file_key (required), page_name (required), frame_name (required), scale.

get_screenshotA

Capture screenshot of a frame.

WARNING: Do NOT use screenshots as the first step! Always call get_frame_info first to understand the structure. Screenshots are for visual reference AFTER you understand the tree.

HOW IT WORKS:

  • For large frames, automatically segments into tiles

  • Returns base64 image(s)

  • Scale 1-4 controls resolution

TYPICAL WORKFLOW:

  1. list_frames → find frame

  2. get_frame_info → structure details

  3. get_screenshot → visual reference

Inputs: file_key (required), page_name (required), frame_name (required), scale, +1 more.

get_section_screenshotA

Capture screenshot of a specific section within a frame.

HOW IT WORKS:

  • First call analyze_page_structure to identify sections

  • Makes other sections transparent (shows only target section)

  • Optionally includes transition elements context

  • Returns cropped image focused on section

  • Useful for parallel analysis of large frames

TYPICAL WORKFLOW:

  1. analyze_page_structure → identify sections

  2. get_section_screenshot(sectionId) → capture isolated section

  3. get_frame_info with section context → implementation details

Inputs: file_key (required), page_name (required), frame_name (required), section_id (required), +2 more.

get_session_stateB

Get current session state for debugging.

RETURNS:

  • Current file being explored

  • Pages and frames already sent

  • Pending continuation operations

  • Last update timestamp

Inputs: no named parameters.

list_framesA

List frames/screens in a specific page.

HOW IT WORKS:

  • Search by page name (partial match supported)

  • Large pages (>50 frames) are automatically chunked

  • Returns compact list with frame names, sizes, and IDs

  • Session remembers what was sent

TYPICAL WORKFLOW:

  1. list_pages → find page name

  2. list_frames(page_name) → see frames

  3. get_frame_info(frame_name) → detail one frame

  4. extract_assets(frame_name) → get assets

Inputs: file_key (required), page_name (required), continue.

list_pagesA

List all pages in a Figma file.

HOW IT WORKS:

  • Returns compact JSON with page names, IDs, and frame counts

  • Large files (>50 pages) are automatically chunked

  • Use 'continue: true' to get next batch

TYPICAL WORKFLOW:

  1. list_pages → see all pages

  2. list_frames(page_name) → see frames in a page

  3. get_frame_info(frame_name) → detail one frame

Inputs: file_key (required), continue.

repeat_lastA

Repeat the last response without making new API calls.

HOW IT WORKS:

  • Returns exact same response from session state

  • No Figma API call needed

  • Useful for context recovery

WHEN TO USE:

  • Lost context and need to see previous data

  • Want to reference last response again

Inputs: no named parameters.

reset_sessionA

Clear all session state for fresh start.

USE WHEN:

  • Switching to different Figma file

  • Want to re-explore from scratch

  • Session state seems corrupted

Inputs: no named parameters.

search_componentsA

Search for components by name across the file.

HOW IT WORKS:

  • Searches entire file or specific page

  • Returns top 20 results with total count

  • If >20 results, suggests refinement options

  • Use 'continue: true' to get more results

TYPICAL WORKFLOW:

  1. search_components(query) → find matches

  2. If too many: refine with page_name or type filter

  3. get_frame_info on specific result

Inputs: file_key (required), query (required), page_name, type, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools have distinct purposes, such as analyze_page_structure for section analysis, extract_assets for asset extraction, and get_agent_context for parallel work preparation. However, there is some overlap between get_frame_info and get_full_page_context, as both provide structural details, which could cause confusion about when to use each.

    Naming Consistency5/5

    Tool names consistently follow a verb_noun pattern, such as analyze_page_structure, extract_assets, get_frame_info, and list_pages. All names use snake_case, making them predictable and easy to read across the set.

    Tool Count5/5

    With 15 tools, the server is well-scoped for automating Figma design-to-code workflows, covering tasks from exploration to implementation. Each tool serves a clear role, such as asset extraction, style retrieval, and parallel processing support, without unnecessary redundancy.

    Completeness5/5

    The tool set provides comprehensive coverage for Figma automation, including listing pages/frames, analyzing structure, extracting assets and styles, capturing screenshots, supporting parallel agent work, and handling session state. No obvious gaps exist; it supports full workflows from discovery to implementation.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables interaction with Figma designs through the Figma API, allowing users to export images in multiple formats, extract style data and CSS, analyze design elements, and retrieve SVG code from Figma files. Supports batch operations and comprehensive design element analysis including images, vectors, and components.
      7
      23 npm
      11
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to extract design systems, analyze components, and maintain design-code consistency from Figma files, providing intelligent component analysis and accessibility compliance.
      40 npm
      27
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      Enables AI agents to read, inspect, and export Figma designs programmatically. Provides tools for listing components, styles, and exporting assets in various formats.
      5
      1
      -