Figma MCP Server
Generates CSS pseudo-code from Figma designs, including styling properties that represent the visual elements in the design.
Connects to Figma API to convert designs into pseudo-code structures and fetch design images. Enables extraction of semantic HTML content and design system components, providing LLMs with structured representation of Figma designs.
Creates React-like JSX component structures from Figma designs, representing the component hierarchy and properties in a format that resembles React components.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Figma MCP Server convert this Figma design to pseudo-code: https://www.figma.com/design/ABC123XYZ/My-Design?node-id=1200%3A23"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Figma MCP Server
Setup in MCP clients
"Figma MCP Server": {
"command": "npx",
"args": ["-y", "figma-codegen-mcp", "--figma_api_key=<YOUR-FIGMA-PERSONAL-ACCESS-TOKEN>"]
}For local development
Prerequisites
Node.js (v22)
npm
Install & Build
git clone <repository-url>
cd figma-mcp-server
npm install
npm run buildDevelopment Setup
For development with hot reloading:
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env and add your FIGMA_API_TOKEN
# Start development server with hot reloading
npm run dev
# Or build for production
npm run build
# Start production server
npm startUsage
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 likefigma.com/(file|design)/<fileKey>/...nodeId(string, required): The ID of the specific node to capture. Found as URL parameter likenode-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 likefigma.com/(file|design)/<fileKey>/...nodeId(string, required): The ID of the frame/component to convert. Found as URL parameter likenode-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
Figma Links Example:
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 thenode-idparameter, URL decoded)
Integration with MCP Clients
These tools are designed to work with MCP-compatible clients. Simply provide a Figma design URL, and the client can automatically extract the fileKey and nodeId to call the appropriate tools for fetching images and/or generating code.
Kudos:
Inspired by Figma-Context-MCP
Available Tools
2 toolsfetch_figma_node_imageB
Fetches a PNG image of a Figma node or frame using the file key and node ID. Returns the image as base64.
Inputs: fileKey (required), nodeId (required).
generate_pseudo_code_from_figma_frameB
It will generates JSX and CSS pseudo-code for a Figma frame or node, given its file key and node ID. Useful for converting Figma designs to code. Can also be used to generate code for specific components or frames in Figma.
Inputs: fileKey (required), nodeId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one fetches an image of a Figma node, while the other generates pseudo-code from a Figma frame. There is no overlap or ambiguity in their functions, making it easy for an agent to select the correct tool based on the task.
The tool names follow a consistent verb_noun pattern (fetch_figma_node_image, generate_pseudo_code_from_figma_frame), but there is a minor deviation in verb tense ('fetches' vs 'generates') and slight length variation. Overall, the naming is predictable and readable, with only small inconsistencies.
With only two tools, the server feels thin and under-scoped for a Figma integration. While the tools cover image fetching and code generation, a Figma MCP server would typically benefit from more operations, such as listing files, accessing design properties, or managing comments, making this set incomplete for the domain.
The tool surface is significantly incomplete for a Figma server. It lacks basic CRUD operations like listing files or nodes, updating designs, or accessing metadata. The two tools provided are useful but do not cover core workflows, leaving obvious gaps that could cause agent failures in common Figma-related tasks.
Related MCP Connectors
The Figma MCP server brings Figma design context directly into your AI workflow.
Serves your design system and coding standards to coding agents, so they stop guessing.
Deterministic Figma to Elementor, Gutenberg, Oxygen, Etch and HTML layouts for AI assistants.
UI design from prompts, screenshots, and URLs for AI coding agents and theme tokens.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables seamless interaction with Figma via the Model Context Protocol, allowing LLM applications to access, manipulate, and track Figma files, components, and variables.21,037 npm149MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates Figma design files with AI coding tools like Cursor, Windsurf, and Cline, allowing AI tools to access and understand Figma design data for generating more accurate code.244 npm30MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that connects AI tools and LLMs to Figma designs, enabling them to extract design data, analyze design systems, and generate development documentation.1,037 npm2MIT
- AlicenseNot gradedqualityDmaintenanceGives AI-powered coding tools like Cursor, Windsurf, and Cline access to Figma design files, enabling more accurate code generation directly from Figma designs.155,133 npmMIT