If you’re a designer or developer tired of the endless back-and-forth between design files and actual code, you might be wondering: “Is there a better way to bridge this gap?” The answer is yes, and it’s called the Figma Dev Mode MCP Server.
This tool lets you generate code directly from your Figma designs, right inside your favourite code editor. No more squinting at design specs or playing the guessing game with spacing and colours. Here’s what you need to know and why it might just change how you work.
Quick heads up: This feature is in open beta, so expect some bumps along the way. But if you’re on a Dev or Full seat with Professional, Organization, or Enterprise plans, you’re good to go.
What This Actually Does for You
Think of the Dev Mode MCP Server as a translator between your Figma designs and your code editor. Instead of manually recreating what you see in Figma, you can:
Generate code from any frame: Select something in Figma, tell your AI assistant to code it, and watch it happen. Perfect for building new features or iterating on existing ones.
Pull design context automatically: Variables, components, layout data – it all flows directly into your IDE. No more hunting through design files for that exact shade of blue.
Keep your code consistent: When paired with Code Connect, it uses your actual components instead of making up new ones.
Why this matters: You spend less time translating designs and more time building features that matter.
1. Getting Started: Enable the Server
First things first – you’ll need the Figma desktop app (the web version won’t cut it for this).
Here’s the simple setup:
- Update Figma: Make sure you’re running the latest version of the desktop app.
- Open any design file: Doesn’t matter which one, you just need a file open.
- Find the menu: Click the Figma menu in the upper-left corner.
- Enable the server: Go to Preferences and toggle on “Enable Dev Mode MCP Server.”
You’ll see a confirmation message at the bottom of your screen, and the server will start running locally at http://127.0.0.1:3845/sse
.
Pro tip: Keep that address handy – you’ll need it for the next step.
Why this matters: This creates a direct connection between your Figma files and your development environment, no third-party services needed.
2. Connect Your Code Editor
Once Figma is ready, you need to tell your code editor how to talk to it. The setup varies depending on what you’re using:
For VS Code Users
- Open your settings (
⌘ ,
on Mac) - Search for “MCP” in the settings bar
- Click “Edit in settings.json”
- Add this 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 - Look for “MCP Server: Figma Dev Mode MCP” in your tools
Note: You’ll need GitHub Copilot enabled for this to work in VS Code.
For Other Editors
Cursor, Windsurf, and Claude Code all support this too – just follow similar steps to connect to that same local address.
Why this matters: Your AI assistant can now “see” your Figma designs and understand their structure, not just their appearance.
3. How to Actually Use It
There are two ways to get your designs into code:
Method 1: Selection-Based (The Easy Way)
- Select any frame or layer in your Figma file
- Head to your code editor
- Tell your AI assistant: “Help me implement my current Figma selection”
Method 2: Link-Based (For Sharing)
- Right-click any frame in Figma and copy the link
- Paste that link in your prompt to your AI assistant
- Ask it to implement the design from that URL
The AI can’t actually visit the link, but it extracts the design information it needs.
Why this matters: You can work with designs whether you’re the one who created them or someone shared them with you.
4. Getting Better Results: The Practical Stuff
The quality of your generated code depends on how well you set things up. Here’s what actually makes a difference:
Structure Your Figma Files Like You Mean It
Use components for everything repeated: Buttons, cards, form inputs – if it appears more than once, make it a component.
Connect components to your codebase: Use Code Connect to link Figma components to your actual code components. Without this, the AI is just guessing.
Name things properly: “CardContainer” tells the AI what you mean. “Group 5” doesn’t.
Use Auto Layout: This shows the AI how things should behave when the screen size changes.
Add variables for consistency: Spacing, colours, border radius, typography – define these once and use them everywhere.
Why this matters: Good structure in Figma leads to clean, maintainable code that follows your design system.
Write Prompts That Actually Help
Your prompt drives the result. Good prompts specify:
- Framework preference: “Generate iOS SwiftUI code” or “Use React with Tailwind”
- Component library: “Use Chakra UI components” or “Use our existing design system”
- File structure: “Add this to src/components/ui” or “Update the existing PricingCard component”
- Layout approach: “Use CSS Grid” or “Use our Stack layout component”
Think of it like briefing a teammate – the clearer your instructions, the better the result.
Why this matters: Specific prompts save you from getting generic code that doesn’t fit your project.
Know When to Be Specific
The system has different tools for different jobs:
- get_code: Gives you a React + Tailwind starting point
- get_variable_defs: Extracts the design tokens (colours, spacing, etc.)
If you’re getting hardcoded values instead of your design tokens, try: “Get the variable names and values used in this frame.”
Why this matters: Using the right tool gets you code that matches your design system instead of one-off values.
5. Pro Tips for Consistent Results
Set Project Rules Once
Create guidance for your AI assistant like you would for a new team member:
- Preferred layout methods
- File naming patterns
- What should never be hardcoded
- Which component library to use
Different editors handle this differently, but the principle is the same: clear, consistent rules lead to better code.
Break Big Designs Into Smaller Pieces
Don’t try to generate an entire page at once. Instead:
- Work on individual components (header, sidebar, card)
- Build up larger layouts from smaller pieces
- If things get slow or stuck, reduce your selection size
Why this matters: Smaller selections are faster, more reliable, and easier to debug when something goes wrong.
Final Thoughts
You don’t need to be a Figma expert or a coding wizard to benefit from the Dev Mode MCP Server. Whether you’re a designer who wants to see their work come to life or a developer tired of pixel-perfect guesswork, this tool helps you:
- Generate working code from visual designs
- Maintain consistency with your design system
- Speed up your workflow by removing manual translation steps
- Collaborate better between design and development
Remember: This is still in beta, so don’t expect perfection every time. But when it works well (which is most of the time), it feels like magic.
One last thing: The better you structure your Figma files and the clearer your prompts, the better your results will be. It’s worth spending time upfront to get the setup right.