Figma MCP: connect Figma to Claude Code and Codex
Figma MCP lets an AI coding agent read your actual design file instead of guessing from a screenshot. This guide explains what it is, how the setup works, where it goes wrong, and how I use it to move from a Figma frame to working code.
What is Figma MCP?
MCP stands for Model Context Protocol. It is an open standard that gives an AI application a consistent way to call outside tools and read outside data. An MCP server exposes a set of tools, and an MCP client, such as Claude Code or Codex, can call them while it works on a task.
A Figma MCP server applies that idea to design files. Instead of pasting a screenshot and hoping the model reads the spacing correctly, the agent can ask for the selected frame and get structure back: layers, layout settings, text, colours, components and variables. That is the whole difference. The model stops estimating your design and starts reading it.
There is more than one way to get this connection. Figma publishes its own MCP server, and community servers exist that work through a plugin running inside Figma Desktop, often called a bridge. They differ in what they expose, whether they can only read or can also change the file, and which Figma plan they need. Check the current documentation for whichever server you pick, because this area changes quickly.
What you can actually do with it
Once the connection works, these are the jobs where it pays off:
- Build a component from a selected frame using real spacing, type and colour values.
- Compare a built page against the design and list what doesn't match.
- Pull design tokens and variables into your code so the two stay in step.
- Rename layers, tidy structure and check consistency across a large file, where the server allows editing.
- Generate repetitive variants, such as social formats, from one approved layout.
How to connect Figma to Claude Code or Codex
- 01
Install the agent
Set up Claude Code or Codex and confirm it runs in your terminal and can see a project folder.
- 02
Choose a Figma MCP server
Decide between Figma's own server and a Desktop plugin bridge, based on whether you need read access only or the ability to change files.
- 03
Create and store access safely
If the server needs a Figma personal access token, keep it in local configuration. Never paste a token into a chat with the agent.
- 04
Register the server
Claude Code adds servers with the claude mcp add command. Codex reads MCP servers from its configuration file. Use the exact connection details from your server's documentation.
- 05
Open Figma Desktop
Bridge-based servers need the Desktop app running with the plugin open on the file you want to work on.
- 06
Test with one small frame
Select a single simple frame and ask the agent to describe it. If the layout and text come back correctly, the connection is working.
Common problems and how to fix them
Most failed setups come down to a few causes. If the agent says no tools are available, the server usually isn't registered in the scope you're running from, or the session started before you added it, so restart the agent. If the tools exist but return nothing, the Desktop plugin is often closed, connected to a different file, or nothing is selected.
If results are huge and slow, you are probably asking for too much at once. Selecting an entire page can return far more data than the task needs and burn through your context. Work one frame or one component at a time. If the output ignores your codebase, the agent has the design but not your rules, so give it your component conventions and naming patterns in a project instructions file.
How I use Figma MCP on real projects
I built a custom Figma and Claude integration for my own design-to-code work because generic prompting wasn't enough. Every session spent tokens re-explaining the same system. The workflow I settled on reads a scoped selection, extracts layout, type and tokens, routes that through MCP, applies project rules, then generates a component and verifies it against the constraints.
The biggest gain isn't speed on a single task. It's that design rules, code rules, tool rules and context rules carry forward, so each new task starts informed. The full breakdown is in the Figma and Claude MCP case study, including the rule layers and how scoped context keeps token use under control.
AI still doesn't replace design judgement. It can read a frame accurately and still make a weak decision about hierarchy or spacing on a screen you didn't design. Treat the output as a fast first build that you review, not a finished page.
Which option should you use?
If you just want Figma connected and working, the Figma MCP Guidance Agent is a free setup project: open the folder, ask your agent to start, and it runs the terminal setup, helps configure the Desktop Bridge and checks the connection. It includes Windows setup scripts, local token entry and reusable agent instructions.
If you want an agent that follows a full design process, Agent Farhan is a free Figma design agent for Claude Code. It takes a rough idea through brief, art direction, wireframe, responsive design and handoff. If you'd rather have this built around your team's workflow, I also build custom MCP systems.
Common questions.
Is Figma MCP free?
The MCP protocol is free and open. Whether a particular Figma MCP server is free depends on that server and your Figma plan, so check its documentation. You also need access to an AI agent such as Claude Code or Codex, which has its own pricing.
Does Figma MCP work with Claude Code?
Yes. Claude Code is an MCP client, so it can connect to a Figma MCP server once the server is registered. Codex can connect in a similar way through its own configuration.
Can AI edit my Figma file through MCP?
It depends on the server. Some only read design data, while bridge-based servers can also create and change layers. Work on a copy of an important file until you trust your setup.
Do I need to know how to code?
Not to get connected, especially with a guided setup. To judge and maintain generated code on a real product, some development knowledge helps a lot.
Why does the generated code not match my codebase?
The agent can see your design but doesn't automatically know your conventions. Add your component patterns, naming rules and framework choices to a project instructions file.