home / mcp / cursor talk to figma mcp server
Provides an MCP bridge between Cursor AI and Figma for reading designs and applying programmatic modifications.
Configuration
View docs{
"mcpServers": {
"aiya861202-figma-mcp": {
"command": "bunx",
"args": [
"cursor-talk-to-figma-mcp@latest"
]
}
}
}This MCP enables Cursor AI to communicate with Figma through a Model Context Protocol bridge. It supports reading design data, inspecting selections, creating and updating elements, annotating designs, and exporting assets, all through a standardized command set that you can drive from Cursor using MCP tools.
Start by setting up the MCP server in your Cursor environment, then run a local WebSocket channel to communicate with the Figma plugin. Once connected, you can issue commands to read document and node information, create and modify elements, manage text and annotations, apply styles, and export assets. Always join a channel before sending commands, and verify results with targeted node inquiries.
# Prerequisites: ensure Bun is installed
curl -fsSL https://bun.sh/install | bash
# Install the MCP server as part of the setup process
bun setup
# Start the WebSocket server for MCP-Figma communication
bun socket
# Run the MCP server for Cursor to talk to Figma
bunx cursor-talk-to-figma-mcp
# Install the Figma Plugin (manual steps follow in the Figma section)Configuration and startup flow: you will configure the MCP server entry in Cursor to point to the local MCP process, then run both the WebSocket service and the MCP server. The typical flow is to start the WebSocket, then launch the MCP server, and finally enable the Figma plugin to join the channel and begin issuing commands.
{
"mcpServers": {
"talk_to_figma": {
"command": "bunx",
"args": ["cursor-talk-to-figma-mcp@latest"]
}
}
}
```
```json
{
"name": "talk_to_figma",
"type": "stdio",
"command": "bunx",
"args": ["cursor-talk-to-figma-mcp@latest"]
}In Figma, go to Plugins > Development > New Plugin. Choose "Link existing plugin" and select the src/cursor_mcp_plugin/manifest.json file. The plugin will appear in your development plugins and can connect to the local WebSocket server to communicate with Cursor via MCP.
- Always join a channel before sending commands to ensure your messages are scoped to the correct session.
- Use get_document_info to establish a view of the current document before making changes.
- Check the current selection with get_selection prior to modifications.
- Prefer batch operations when updating multiple nodes to reduce round-trips.
- Handle errors gracefully; all MCP commands can throw exceptions and should be wrapped in robust error handling.
If you cannot connect from Figma, verify the WebSocket server is running (bun socket) and that you have joined the appropriate channel with join_channel from the plugin. For Windows Subsystem for Linux (WSL) users, uncomment the hostname in src/socket.ts to allow connections from Windows, then restart the WebSocket server.
Use the MCP toolset to read, create, modify, and export Figma elements. Commands include reading document info, inspecting and modifying nodes, creating shapes and text, adjusting styles, and exporting assets. Connect your Cursor MCP client to the channel and issue commands to control Figma programmatically.
Retrieve information about the current Figma document, including metadata and structure.
Return details about the current user selection in the active document.
Fetch detailed information about the currently selected design elements.
Obtain comprehensive information about a specific node by ID.
Get detailed information for multiple nodes by supplying an array of IDs.
Retrieve annotations for the current document or a specific node.
Create or update a markdown-supported annotation on a target node or document.
Batch create or update multiple annotations efficiently.
Scan the document to find nodes of specified types (useful for finding annotation targets).
Create a new rectangle with position, size, and optional name.
Create a new frame with position, size, and optional name.
Create a new text node with configurable font properties.
Scan text nodes with intelligent chunking to handle large designs.
Set the text content of a single text node.
Batch update multiple text nodes efficiently.
Change the fill color of a node with RGBA values.
Modify the stroke color and width of a node.
Adjust the corner radius of a node with optional per-corner control.
Move a node to a new position.
Resize a node to new dimensions.
Delete a node from the design.
Delete multiple nodes efficiently in a single operation.
Create a copy of an existing node with an optional offset.
Fetch information about local styles.
Retrieve information about locally defined components.
Fetch information about components shared within the team.
Create an instance of a component in the design.
Export a node as an image in PNG, JPG, SVG, or PDF formats.
Execute arbitrary JavaScript code within the Figma environment (use with caution).
Join a specific channel to communicate with Figma.