Guide to the Dev Mode MCP Server
- Administration â Figma Learn
- Figma Design â Figma Learn
- Get started â Figma Learn
- FigJam â Figma Learn
- Community â Figma Learn
- Help â Figma Learn
- Work across Figma â Figma Learn
- Courses, tutorials, projects â Figma Learn
- Figma Slides â Figma Learn
- Figma Buzz â Figma Learn
- Figma Make â Figma Learn
- Figma Sites â Figma Learn
Table of Contents
đ§ The Dev Mode MCP Server is currently in open beta. Some functions and settings may not yet be available. The feature may change and you may experience bugs or performance issues during the beta period.
Before you start
Who can use this feature
The Dev Mode MCP Server is in open beta.
Available on a Dev or Full seat on the Professional, Organization, or Enterprise plans
You must use a code editor or application that supports MCP Servers (i.e. VS Code, Cursor, Windsurf, Claude Code)
You can only use the Dev Mode MCP server from the Figma desktop app. Download the Figma desktop app â
The Dev Mode MCP Server brings Figma directly into your workflow by providing important design information and context to AI agents generating code from Figma design files.
MCP Servers are part of a standardized interface for AI agents to interact with data sources using the Model Context Protocol.
With the server enabled, you can:
-
Generate code from selected frames
Select a Figma frame and turn it into code. Great for product teams building new flows or iterating on app features.
-
Extract design context
Pull in variables, components, and layout data directly into your IDE. This is especially useful for design systems and component-based workflows.
-
Code smarter with Code Connect
Boost output quality by reusing your actual components. Code Connect keeps your generated code consistent with your codebase.
Step 1: Enable the MCP Server
- Open the Figma desktop app and make sure youâve updated to the latest version.
- Create or open a Figma Design file.
- In the upper-left corner, open the Figma menu.
- Under Preferences, select Enable Dev Mode MCP Server.
You should see a confirmation message at the bottom of the screen letting you know the server is enabled and running.
The server runs locally at http://127.0.0.1:3845/sse
. Keep this address handy for your configuration file in the next step.
Step 2: Set up your MCP client
Once the server is running locally on the Figma desktop app, MCP clients will be able to connect to your server. Follow the instructions for your specific client to add the Dev Mode MCP server.
-
Go to Code â Settings â Settings or use the shortcut
â ,
-
In the search bar, type âMCPâ.
-
Select Edit in settings.json.
-
Add the following configuration:
"chat.mcp.discovery.enabled": true, "mcp": { "servers": { "Figma Dev Mode MCP": { "type": "sse", "url": "http://127.0.0.1:3845/sse" } } }, "chat.agent.enabled": true
-
Open the chat toolbar
â„âB
and switch to Agent mode. -
Open the selection tool menu and look for a section labeled:
MCP Server: Figma Dev Mode MCP
. If no tools are listed, restart the Figma desktop app and VS Code.
Note: You must have GitHub Copilot enabled on your account to use MCP in VS Code.
For more information, see VS Codeâs official documentation.
-
Open Cursor â Settings â Cursor Settings.
-
Go to the MCP tab.
-
Click + Add new global MCP server.
-
Enter the following configuration and save:
{ "mcpServers": { "Figma": { "url": "http://127.0.0.1:3845/sse" } } }
For more information, see Cursorâs official documentation.
- Open Windsurf â Settings â Windsurf Settings or use the shortcut
â ,
. - Navigate to Cascade settings and select Open plugin store.
- Search for Figma and install the plugin.
- Open Cascade and you should see the Figma MCP server and available tools.
Note: For Windsurf, change the url
property in the configuration file to serverUrl
to avoid errors.
- Open your terminal and run:
claude mcp add --transport sse figma-dev-mode-mcp-server http://127.0.0.1:3845/sse
- Use the following commands to check MCP settings and manage servers:
- List all configured servers
claude mcp list
- Get details for a specific server
claude mcp get my-server
- Remove a server
claude mcp remove my-server
- List all configured servers
Other code editors and tools that support SSE (Server-Sent Events) can also connect to the Dev Mode MCP server.
If you're using a different editor or tool, check its documentation to confirm it supports SSE-based communication. If it does, you can manually add the Dev Mode MCP server using this configuration:
{
"mcpServers": {
"Figma Dev Mode MCP": {
"url": "http://127.0.0.1:3845/sse"
}
}
}
Note: The Dev Mode MCP server communicates over the SSE protocol. Use your editorâs steps for setting up an SSE-compatible MCP server, and use the URL: http://localhost:3845/sse
Once configured, refresh or start the server. You should see a successful connection and the available tools. If the connection failed or you do not see any tools, double check that the server is active in the Figma desktop app.
Step 3: Prompt your MCP client
The Dev Mode MCP server introduces a set of tools that help LLMs translate designs in Figma. Once connected, you can prompt your MCP client to access a specific design node.
There are two ways to provide Figma design context to your AI client:
Selection-based
- Select a frame or layer inside Figma using the desktop app.
- Prompt your client to help you implement your current selection.
Link-based
- Copy the link to a frame or layer in Figma.
- Prompt your client to help you implement the design at the selected URL.
Note: Your client wonât be able to navigate to the selected URL, but it will extract the node-id that is required for the MCP server to identify which object to return information about.
As you use the Dev Mode MCP server, you may see a popup inside Figma asking you for feedback. To give us feedback, please use this form.
MCP best practices
The quality of the generated code depends on several factors. Some controlled by you, and some by the tools youâre using. Here are some suggestions for clean, consistent output.
Structure your Figma file for better code
Provide the best context for your design intent, so the MCP and your AI assistant can generate code thatâs clear, consistent, and aligned with your system.
-
Use components for anything reused (buttons, cards, inputs, etc.)
-
Link components to your codebase via Code Connect. This is the best way to get consistent component reuse in code. Without it, the model is guessing.
-
Use variables for spacing, color, radius, and typography.
-
Name layers semantically (e.g.
CardContainer
, notGroup 5
) -
Use Auto layout to communicate responsive intent.
Tip: Resize the frame in Figma to check that it behaves as expected before generating code.
-
Use annotations and dev resources to convey design intent thatâs hard to capture from visuals alone, like how something should behave, align, or respond.
Write effective prompts to guide the AI
MCP gives your AI assistant structured Figma data, but your prompt drives the result. Good prompts can:
- Align the result with your framework or styling system
- Follow file structure and naming conventions
- Add code to specific paths (e.g.
src/components/ui
) - Add or modify code in existing files instead of creating new ones
- Follow specific layout systems (e.g. grid, flexbox, absolute)
Examples:
- âGenerate iOS SwiftUI code from this frameâ
- âUse Chakra UI for this layoutâ
- âUse
src/components/ui
componentsâ - âAdd this to
src/components/marketing/PricingCard.tsx
" - âUse our
Stack
layout componentâ
Think of prompts like a brief to a teammate. Clear intent leads to better results.
Trigger specific tools when needed
The MCP supports different tools, and each one provides your AI assistant with a different kind of structured context. Sometimes, the assistant doesnât automatically pick the right one, especially as more tools become available. If results are off, try being explicit in your prompt.
- get_code provides a structured React + Tailwind representation of your Figma selection. This is a starting point that your AI assistant can translate into any framework or code style, depending on your prompt.
- get_variable_defs extracts the variables and styles used in your selection (color, spacing, typography, etc). This helps the model reference your tokens directly in the generated code.
For example, if youâre getting raw code instead of tokens, try something like:
- âGet the variable names and values used in this frame.â
Add custom rules
Set project-level guidance to keep output consistentâjust like onboarding notes for a new developer. These are things like:
- Preferred layout primitives
- File organization
- Naming patterns
- What not to hardcode
You can provide this in whatever format your MCP client uses for instruction files.
Examples:
---
description: Figma Dev Mode MCP rules
globs:
alwaysApply: true
---
 - The Figma Dev Mode MCP Server provides an assets endpoint which can serve image and SVG assets
 - IMPORTANT: If the Figma Dev Mode MCP Server returns a localhost source for an image or an SVG, use that image or SVG source directly
 - IMPORTANT: DO NOT import/add new icon packages, all the assets should be in the Figma payload
 - IMPORTANT: do NOT use or create placeholders if a localhost source is provided
# MCP Servers
## Figma Dev Mode MCP Rules
 - The Figma Dev Mode MCP Server provides an assets endpoint which can serve image and SVG assets
 - IMPORTANT: If the Figma Dev Mode MCP Server returns a localhost source for an image or an SVG, use that image or SVG source directly
 - IMPORTANT: DO NOT import/add new icon packages, all the assets should be in the Figma payload
 - IMPORTANT: do NOT use or create placeholders if a localhost source is provided
- IMPORTANT: Always use components from `/path_to_your_design_system` when possible
- Prioritize Figma fidelity to match designs exactly
- Avoid hardcoded values, use design tokens from Figma where available
- Follow WCAG requirements for accessibility
- Add component documentation
- Place UI components in `/path_to_your_design_system`; avoid inline styles unless truly necessary
Adding these once can dramatically reduce the need for repetitive prompting and ensures that teammates or agents consistently follow the same expectations.
Be sure to check your IDE or MCP clientâs documentation for how to structure rules, and experiment to find what works best for your team. Clear, consistent guidance often leads to better, more reusable code with less back-and-forth.
Break down large selections
Break screens into smaller parts (like components or logical chunks) for faster, more reliable results.
Large selections can slow the tools down, cause errors, or result in incomplete responses, especially when there's too much context for the model to process. Instead:
- Generate code for smaller sections or individual components (e.g. Card, Header, Sidebar)
- If it feels slow or stuck, reduce your selection size
This helps keep the context manageable and results more predictable, both for you and for the model.
If something in the output doesnât look quite right, it usually helps to revisit the basics: how the Figma file is structured, how the prompt is written, and what context is being sent. Following the best practices above can make a big difference, and often leads to more consistent, reusable code.