The Cursor Talk to Figma MCP server provides integration between Cursor AI and Figma, enabling you to read and programmatically modify Figma designs directly from Cursor. This powerful connection makes it possible to interact with Figma designs through structured commands.
First, install Bun if you haven't already:
curl -fsSL https://bun.sh/install | bash
Run the setup script to install the MCP in your Cursor's active project:
bun setup
Start the WebSocket server:
bun start
If you prefer manual installation, follow these steps:
Add the server to your Cursor MCP configuration in ~/.cursor/mcp.json
:
{
"mcpServers": {
"TalkToFigma": {
"command": "bun",
"args": [
"/path/to/cursor-talk-to-figma-mcp/src/talk_to_figma_mcp/server.ts"
]
}
}
}
Start the WebSocket server manually:
bun run src/socket.ts
src/cursor_mcp_plugin/manifest.json
filejoin_channel
Before using any other tools, establish a connection:
join_channel - Connect to a specific channel to communicate with Figma
Get information about the Figma document:
get_document_info - Retrieve information about the current document
get_selection - Get details about currently selected elements
get_node_info - Get detailed information about a specific node
Create new design elements:
create_rectangle - Create a rectangle with position, size, and optional name
create_frame - Create a frame with position, size, and optional name
create_text - Create a text node with customizable font properties
Apply styles to elements:
set_fill_color - Apply a fill color to a node (RGBA)
set_stroke_color - Set stroke color and weight
set_corner_radius - Adjust corner radius (supports per-corner settings)
Modify existing elements:
move_node - Reposition a node
resize_node - Change a node's dimensions
delete_node - Remove a node
Work with Figma components:
get_styles - Retrieve information about local styles
get_local_components - List available local components
get_team_components - List team library components
create_component_instance - Create an instance of a component
Advanced operations:
export_node_as_image - Export a node as PNG, JPG, SVG, or PDF
execute_figma_code - Run arbitrary JavaScript code in Figma (use with caution)
For optimal results when working with the Figma MCP:
get_document_info
get_selection
before making modificationscreate_frame
for containerscreate_rectangle
for basic shapescreate_text
for text elementsget_node_info
after modificationsThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.