Talk to Figma MCP server

Enables bidirectional communication with Figma designs through a plugin and WebSocket server, allowing creation and manipulation of design elements directly from conversations.
Back to servers
Setup instructions
Provider
Sonny Lazuardi
Release date
Mar 21, 2025
Language
TypeScript
Stats
5.2K stars

This Model Context Protocol server enables seamless communication between Cursor AI and Figma, allowing you to programmatically read and modify Figma designs directly from Cursor. The integration creates a powerful workflow for automating design tasks and extracting design information.

Installation

Prerequisites

You'll need to install Bun as a prerequisite:

curl -fsSL https://bun.sh/install | bash

Quick Setup

The fastest way to get started is with the automated setup:

bun setup

This command installs the MCP in your Cursor's active project.

Manual Setup

To manually set up the MCP server:

  1. Add the server to your Cursor MCP configuration in ~/.cursor/mcp.json:
{
  "mcpServers": {
    "TalkToFigma": {
      "command": "bunx",
      "args": ["cursor-talk-to-figma-mcp@latest"]
    }
  }
}

Starting the WebSocket Server

The WebSocket server facilitates communication between Cursor and Figma:

bun socket

Figma Plugin Setup

  1. Install the plugin from the Figma community page

Or install it locally:

  1. In Figma, go to Plugins > Development > New Plugin
  2. Choose "Link existing plugin"
  3. Select the src/cursor_mcp_plugin/manifest.json file

Windows + WSL Setup

For Windows users with WSL:

  1. Install Bun via PowerShell:
powershell -c "irm bun.sh/install.ps1|iex"
  1. Uncomment the hostname 0.0.0.0 in src/socket.ts:
// uncomment this to allow connections in windows wsl
hostname: "0.0.0.0",
  1. Start the WebSocket server:
bun socket

Usage

Getting Started

  1. Start the WebSocket server
  2. Open Figma and run the Cursor MCP Plugin
  3. Connect the plugin to the WebSocket server by using the join_channel command
  4. Begin using Cursor to interact with Figma via the MCP tools

Available Tools

Document & Selection

// Get information about the current document
get_document_info()

// Get information about the current selection
get_selection()

// Get detailed node information about the current selection
read_my_design()

// Get detailed information about a specific node
get_node_info({ nodeId: "123:456" })

// Set focus on a specific node
set_focus({ nodeId: "123:456" })

Creating Elements

// Create a new rectangle
create_rectangle({
  x: 100,
  y: 100,
  width: 200,
  height: 150,
  name: "My Rectangle"
})

// Create a new text element
create_text({
  x: 100,
  y: 100,
  characters: "Hello, Figma!",
  fontSize: 24
})

Modifying Text Content

// Update text content
set_text_content({
  nodeId: "123:456",
  characters: "Updated text"
})

// Batch update multiple text nodes
set_multiple_text_contents({
  updates: [
    { nodeId: "123:456", characters: "First update" },
    { nodeId: "789:012", characters: "Second update" }
  ]
})

Styling

// Set fill color
set_fill_color({
  nodeId: "123:456",
  r: 255,
  g: 0,
  b: 0,
  a: 1
})

// Set corner radius
set_corner_radius({
  nodeId: "123:456",
  radius: 8
})

Annotations

// Get all annotations
get_annotations()

// Create a new annotation
set_annotation({
  nodeId: "123:456",
  message: "This is an annotation with **markdown** support"
})

Prototyping & Connections

// Get all prototype reactions
get_reactions()

// Create connections between nodes
create_connections({
  connections: [
    { sourceId: "123:456", targetId: "789:012" }
  ]
})

Example Workflows

Bulk Text Replacement

You can use the MCP to perform bulk text replacements in your design:

  1. Scan for text nodes:
scan_text_nodes()
  1. Update multiple text nodes at once:
set_multiple_text_contents({
  updates: [
    { nodeId: "123:456", characters: "Updated heading" },
    { nodeId: "789:012", characters: "Updated paragraph" }
  ]
})

Instance Override Propagation

Propagate component instance overrides from one instance to others:

  1. Extract overrides from a source instance:
get_instance_overrides({ nodeId: "123:456" })
  1. Apply those overrides to target instances:
set_instance_overrides({
  overrides: extractedOverrides,
  targetIds: ["789:012", "345:678"]
})

Best Practices

  • Always join a channel before sending commands
  • Get document overview using get_document_info first
  • Check current selection with get_selection before making modifications
  • Use appropriate creation tools based on your needs
  • Verify changes using get_node_info after modifications
  • For large designs, use chunking parameters in scan_text_nodes
  • Use batch operations when possible for better performance
  • When converting prototype reactions to connectors:
    • Use get_reactions to extract flows
    • Set a default connector with set_default_connector
    • Generate connector lines with create_connections

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "TalkToFigma" '{"command":"bunx","args":["cursor-talk-to-figma-mcp@latest"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There 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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "TalkToFigma": {
            "command": "bunx",
            "args": [
                "cursor-talk-to-figma-mcp@latest"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "TalkToFigma": {
            "command": "bunx",
            "args": [
                "cursor-talk-to-figma-mcp@latest"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later