Convert Figma Designs to Code Using Cursor and Figma-Context-MCP
Model Context Protocol makes it incredibly easy to integrate powerful tools directly into modern IDEs like Cursor, dramatically boosting productivity. With just a few simple steps we can allow Cursor to access a Figma design and use its code generation capabilities to design mobile screen within minutes
Figma-Context-MCP paired with Cursor AI. It’s a free, open-source combo that automates the whole process. Here’s how to make it work for you, step by step, with a personal twist from my own tinkering.
What’s This Figma-Context-MCP Thing?
Imagine a bridge between Figma and Cursor. That’s Figma-Context-MCP in a nutshell. It’s built on something called the Model Context Protocol — a mouthful, sure, but it just means it grabs real UI bits (think buttons, fonts, layouts) and hands them to Cursor for code-making. You end up with:
I’ve messed with it myself, and it’s like having a junior dev who never sleeps.
Step 1: Setting up the environment
Step 2: Node.js Installation
We’ll be using npx to run the Figma MCP server, and for that, Node.js is required.
After installation, verify everything worked by running these commands in your terminal:
Step 3: Cursor IDE Installation
Step 4: Get It Running
First, you’ll need the tool itself. Here’s what I did:
git clone https://github.com/GLips/Figma-Context-MCP
cd Figma-Context-MCP
Then installed the bits it needs:
pnpm install
If you don’t have pnpm, grab it with npm install -g pnpm. Took me five minutes, tops.
To fix this, you need to install pnpm. Here’s how:
✅ Option 1: Install via npm (if you already have Node.js and npm)
npm install -g pnpm
Option 3: Install via Homebrew (on macOS)
If you use Homebrew, run:
brew install pnpm
After Installation
Verify it with:
pnpm --version
Install the MCP package locally or globally
Locally Install
In your project folder, run:
npm install --save-dev figma-developer-mcp
Global install
npm install --global figma-developer-mcp
Once installed, verify in your terminal:
npx figma-developer-mcp --version
# or, if global:
figma-developer-mcp --version
Step 4: Fire Up the MCP Server
Back in the terminal, I kicked off the server like this:
npx figma-developer-mcp --figma-api-key=<pasted-my-token-here>
A few seconds later, it spat out:
“New SSE connection established”
# That’s the green light — server’s up and humming.
Alternative Way
{
"mcpServers": {
"Framelink Figma MCP": {
"command": "npx",
"args": ["-y", "figma-developer-mcp", "--figma-api-key=YOUR-KEY", "--stdio"]
}
}
}
Step 5: Pull Designs into Cursor
Here’s where it gets fun. I opened a Figma file I’d been messing with — a simple Sign-in page mockup. Then:
For your own use case, you can use any Figma design — just copy the frame URL and provide it to the chat agent within Cursor. To get the link:
Paste this link into Cursor’s chat, and the agent will handle the rest — generating the Jetpack Compose, SwiftUI, HTML/CSS based on your selected frame.
Wrap-Up: Code Smarter, Not Harder
This setup isn’t perfect — sometimes Cursor misses a shadow or misaligns a flexbox — but it’s a hell of a lot faster than coding by hand. If you’re tired of playing pixel detective, give Figma-Context-MCP a spin. Clone the repo, plug in your token, and let it rip. Got thoughts or hacks to share? I’m all ears — drop ’em below.
Now, go build something awesome. You’ve earned it.