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 Serverconvert 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.
| Name | Required | Description | Default |
|---|---|---|---|
| fileKey | Yes | The key of the Figma file to fetch, Can be found in a provided URL like `figma.com/(file|design)/<fileKey>/... | |
| nodeId | Yes | The ID of the node to fetch, can be found as URL parameter like `node-id=<nodeId>`, Must use if provided. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Fetches') and output format ('base64'), but lacks critical details such as authentication requirements, rate limits, error conditions, or whether the operation is idempotent. For a tool with no annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action and output. Every word serves a purpose—specifying the resource, parameters, and return format—with no redundant or vague phrasing, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 required parameters, no output schema, no annotations), the description covers the basic purpose and output but lacks depth. It doesn't address authentication, error handling, or usage context, which are important for a tool that interacts with an external API. While adequate for simple use, it falls short of being fully comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with both parameters well-documented in the input schema. The description adds minimal value by mentioning the parameters ('file key and node ID') but doesn't provide additional context beyond what the schema already covers, such as format specifics or edge cases. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Fetches a PNG image'), the resource ('of a Figma node or frame'), and the mechanism ('using the file key and node ID'). It distinguishes itself from the sibling tool 'generate_pseudo_code_from_figma_frame' by focusing on image retrieval rather than code generation, making the purpose unambiguous and well-differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives or any prerequisites. While it mentions the required parameters, it doesn't explain scenarios where fetching an image is appropriate compared to other Figma operations or the sibling tool, leaving usage context entirely implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| fileKey | Yes | The key of the Figma file to fetch, Can be found in a provided URL like `figma.com/(file|design)/<fileKey>/...` | |
| nodeId | Yes | The ID of the node to fetch, can be found as URL parameter like `node-id=<nodeId>`, Must use if provided. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates pseudo-code but does not describe output format, quality, limitations, or any side effects (e.g., rate limits, authentication needs). This leaves significant gaps for an agent to understand the tool's behavior beyond its basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose in the first sentence. The second sentence adds useful context without redundancy, though it could be slightly more structured (e.g., separating use cases). Overall, it avoids unnecessary details and is efficiently written.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (code generation from design assets) and lack of annotations and output schema, the description is incomplete. It does not address what the output looks like (e.g., format, structure), potential errors, or how to interpret the generated pseudo-code, leaving critical gaps for an agent to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters (fileKey and nodeId) adequately. The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints, resulting in a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'generates JSX and CSS pseudo-code for a Figma frame or node' with specific resources (Figma file key and node ID). It distinguishes from the sibling tool 'fetch_figma_node_image' by focusing on code generation rather than image fetching, though the distinction could be more explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context ('Useful for converting Figma designs to code') and mentions applicability to 'specific components or frames', but lacks explicit guidance on when to use this tool versus alternatives or any prerequisites. No clear exclusions or comparisons with the sibling tool are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.11- First observed
fetch_figma_node_image - First observed
generate_pseudo_code_from_figma_frame
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.
UI design from prompts, screenshots, and URLs for AI coding agents and theme tokens.
- miromiroOAuthapp.miromiro
Turn any live website into brand colors, fonts, design tokens, SVGs, Lottie and paste-ready code.
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,704 npm150MIT
- AlicenseNot gradedqualityFmaintenanceA 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.148 npm31MIT
- 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,704 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.42,339 npmMIT