Mannequin Context Protocol makes it extremely simple to combine highly effective instruments immediately into trendy IDEs like Cursor, dramatically boosting productiveness. With just some easy steps we will permit Cursor to entry a Figma design and use its code technology capabilities to design net pages inside minutes. On this hands-on tutorial, we’ll stroll you thru the method of establishing this integration and constructing a easy login web page from a Figma file utilizing Cursor.
Figma API
Firstly, we would want a Figma API for this tutorial.
- Log in to your Figma account
- Go to Settings > Safety > Generate new token
- Enter a reputation for the token and be sure to have learn permissions on File content material and Dev assets, then click on on generate token.
- Copy and hold the token for future use.
Node.js Set up
We’ll be utilizing npx to run the Figma MCP server, and for that, Node.js is required.
- Obtain the newest model of Node.js from nodejs.org
- Run the installer.
- Depart all settings as default and full the set up.
After set up, confirm all the pieces labored by operating these instructions in your terminal:
node -v # ought to return the Node.js model
npm -v # ought to return the npm model
npx -v # ought to return the npx model
Cursor IDE Set up
Lastly, obtain the Cursor IDE from cursor.com.
- It’s free to obtain and comes with a 14-day free trial.
- Cursor is constructed particularly for AI-assisted growth and can assist us hook up with the Figma MCP server and generate code effortlessly.
When you’ve put in and launched Cursor IDE, observe these steps to attach your Figma MCP server:
- Navigate to:
File > Preferences > Cursor Settings > MCP - Click on on “Add a brand new international MCP server”.
- It will open a mcp.json configuration file. Paste the next code into it:
{
"mcpServers": {
"Framelink Figma MCP": {
"command": "cmd",
"args": ["/c", "npx", "-y", "figma-developer-mcp", "--figma-api-key=YOUR-KEY", "--stdio"]
}
}
}
4. Substitute YOUR-KEY with the Figma API token you generated earlier.
5. Save the file. As soon as saved, it’s best to see “Framelink Figma MCP” listed below out there MCP servers.
Now you can shut the settings pane and begin utilizing this server by getting into related prompts in Cursor’s chat interface — it’ll hook up with your Figma file and generate code accordingly.
For this tutorial, I used the next Figma template and easily requested Cursor’s chat agent to generate each an index.html and a mode.css file. I additionally requested it to interchange one of many photographs within the Figma design with a customized picture of my selection.
As soon as the preliminary code was generated, I requested the agent to make just a few adjustments — similar to updating the footer textual content and yr, and including some animation results. Cursor dealt with these edits seamlessly, updating the code robotically.
To your personal use case, you should use any Figma design — simply copy the body URL and supply it to the chat agent inside Cursor. To get the hyperlink:
- Open your Figma design.
- Proper-click on the body or ingredient you wish to replicate.
- Choose Copy/Paste As > Copy Hyperlink to Choice
Paste this hyperlink into Cursor’s chat, and the agent will deal with the remaining — producing the HTML/CSS based mostly in your chosen body.

I’m a Civil Engineering Graduate (2022) from Jamia Millia Islamia, New Delhi, and I’ve a eager curiosity in Knowledge Science, particularly Neural Networks and their utility in numerous areas.