This project implements a Model Context Protocol (MCP) integration between Cursor AI and Figma, allowing Cursor to communicate with Figma for reading designs and modifying them programmatically.
- Windows 10 or later
- Bun installed on Windows
- Figma Desktop App
- Cursor Editor
src/talk_to_figma_mcp/
- TypeScript MCP server for Figma integrationsrc/cursor_mcp_plugin/
- Figma plugin for communicating with Cursorsrc/socket.ts
- WebSocket server that facilitates communication between the MCP server and Figma plugin
-
Install Bun on Windows
powershell -Command "iwr bun.sh/install.ps1 -useb | iex"
After installation, restart your terminal.
-
Clone the repository
git clone https://github.com/MehhdiMarzban/cursor-talk-to-figma-mcp.git cd cursor-talk-to-figma-mcp
-
Install dependencies
bun install
-
Setup MCP Configuration Create
.cursor/mcp.json
in your project root:mkdir .cursor
Create
mcp.json
with the following content:{ "mcpServers": { "TalkToFigma": { "command": "bun", "args": [ "C:/Users/mehdi/Desktop/cursor-talk-to-figma-mcp/src/talk_to_figma_mcp/server.ts" ] } } }
-
Start the WebSocket Server
bun start
- Open Figma Desktop App
- Go to Plugins > Development > New Plugin
- Choose "Link existing plugin"
- Select the
src/cursor_mcp_plugin/manifest.json
file from this project - The plugin will now be available in your Figma development plugins
- Start the WebSocket server using
bun start
- Open your Figma document
- Run the "Cursor MCP Plugin" from your Figma development plugins
- In Cursor, use the following commands to interact with Figma:
mcp_TalkToFigma_join_channel // Connect to Figma mcp_TalkToFigma_get_document_info // Get document information
get_document_info
- Get information about the current Figma documentget_selection
- Get information about the current selectionget_node_info
- Get detailed information about a specific node
create_rectangle
- Create a new rectanglecreate_frame
- Create a new framecreate_text
- Create a new text element
set_fill_color
- Set the fill color of a nodeset_stroke_color
- Set the stroke color of a nodeset_corner_radius
- Set the corner radius of a node
move_node
- Move a node to a new positionresize_node
- Resize a nodedelete_node
- Delete a node
get_styles
- Get all styles from the documentget_local_components
- Get all local componentscreate_component_instance
- Create an instance of a component
export_node_as_image
- Export a node as an image
-
Port 3055 Already in Use
# Find process using port 3055 netstat -ano | findstr :3055 # Kill the process (replace PID with the actual process ID) taskkill /PID PID /F
-
Bun Command Not Found
- Restart your terminal after installing Bun
- Make sure Bun is added to your system PATH
MIT
This project is based on cursor-talk-to-figma-mcp by Sonny Lazuardi, which is licensed under the MIT License.