Figma To Code Mcp Server

Created By
toddle-edua year ago
Use this Figma MCP Server to convert Figma Design to pseudo-code like structure - simple yet efficient for LLMs to understand design context. Connect to Figma API and get pseudo-code for the given Design. For visual context, can also fetch images.
Overview

Figma MCP Server

MCP Server to convert Figma Design to pseudo-code like structure - simple yet efficient for LLMs to understand design context.

Features

  • Connect to Figma API and get pseudo-code for the given Design. For visual context, can also fetch images.
  • Supports generating pseudo-code for design system components & semantic HTML content.
  • Just share Figma Design URL with MCP client and it will extract the file key and node ID automatically, calls the appropriate tools to fetch the pseudo-code and/or image.

Usage

This Figma MCP Server provides two main tools for interacting with Figma designs:

Available MCP Tools

1. fetch_figma_node_image

Fetches a PNG image of a Figma node or frame and returns it as base64 data.

Description: Downloads a visual representation of any Figma design element (frame, component, layer, etc.) as a PNG image.

Parameters:

  • fileKey (string, required): The key of the Figma file. Can be found in Figma URLs like figma.com/(file|design)/<fileKey>/...
  • nodeId (string, required): The ID of the specific node to capture. Found as URL parameter like node-id=<nodeId>

Returns: Base64-encoded PNG image and MIME type.

Example Use Cases:

  • Getting visual context of design components
  • Creating documentation with actual design screenshots

2. generate_pseudo_code_from_figma_frame

Generates JSX and CSS pseudo-code for a Figma design.

Description: Analyzes Figma design elements and generates corresponding Pseudo HTML + CSS code. The generated code includes semantic HTML structure, CSS properties, and Pseudo-React JSX components based on your figma component library.

Parameters:

  • fileKey (string, required): The key of the Figma file. Can be found in Figma URLs like figma.com/(file|design)/<fileKey>/...
  • nodeId (string, required): The ID of the frame/component to convert. Found as URL parameter like node-id=<nodeId>

Returns: Formatted text containing:

  • CSS styles
  • JSX component structure
  • Semantic HTML elements
  • Clean, readable code formatting

Example Use Cases:

  • Converting Figma designs to Pseudo - React components
  • Providing a better code-like representation of figma design to LLM
  • Integrates design system ( accuracy & quality depends on Figma component library )
  • Rapid prototyping from designs
  • Helper in Design-to-code workflow automation

When sharing Figma designs, the URL contains the required parameters:

https://www.figma.com/design/ABC123XYZ/My-Design?node-id=1200%3A23&t=randomstring
                              ↑                          ↑
                          fileKey                      nodeId (URL encoded)
  • File Key: ABC123XYZ (the part after /design/ or /file/)
  • Node ID: 1200 (from the node-id parameter, URL decoded)

Server Config

{
  "mcpServers": {
    "figma MCP Server": {
      "command": "npx",
      "args": [
        "figma-codegen-mcp",
        "--figma_api_key=${input:FIGMA_API_KEY}"
      ]
    }
  },
  "inputs": [
    {
      "id": "FIGMA_API_KEY",
      "type": "promptString",
      "description": "Paste your Figma Personal access Token here"
    }
  ]
}
Project Info
Hosted
Created At
a year ago
Updated At
a year ago
Author Name
toddle-edu
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Tavily Mcp
@tavily-ai

JavaScript
a year ago
Bring your real authenticated browser session to AI coding agents. Local-first MCP server + Chrome MV3 extension. No cloud. No telemetry.
@Cubenest

peek records the user's actual logged-in browser (DOM via rrweb, console events, network metadata, optional response bodies via opt-in Deep capture) through a Chrome MV3 extension. The extension ships events through a native-messaging stdio bridge to a local MCP server (peek-mcp), which persists them to a SQLite database at ~/.peek/sessions.db. AI coding agents (Claude Code, Cursor, Cline, Windsurf) read sessions from the database via 10 MCP tools: Tool What it does list_recent_sessions List recently recorded sessions (id, origin, ts, event count). get_session_summary LLM-readable narrative summary of a session. get_session_console_errors Console errors recorded in a session. get_session_network_errors Failed/notable network requests in a session. get_user_action_before_error Last N user actions before a console error. generate_playwright_repro Generate a runnable Playwright test from a session. get_dom_snapshot Reconstruct the DOM at a given timestamp. query_dom_history Timeline of attribute/text changes for a selector. request_authorization Side-panel consent for write actions (Level 3). execute_action Dispatch a UI action (gated by permission level + destructive blocklist). Why local-first matters Every other "browser session for AI" tool ships to a vendor cloud. peek's SQLite + extension live on the user's machine — no remote endpoints, no telemetry. The privacy policy (docs/peek/PRIVACY_POLICY.md) is the source of truth. Install # 1. Add the MCP server to Claude Code claude mcp add peek -- npx -y @peekdev/mcp # 2. Install the Chrome extension from the Chrome Web Store # (link added once the CWS listing is approved)

a day ago