Sponsored by Deepsite.site

Figma To Code Mcp Server

Created By
toddle-edu5 months 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"
    }
  ]
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Serper MCP ServerA Serper MCP Server
DeepChatYour AI Partner on Desktop
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Tavily Mcp
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server