FI

Figma MCP Server for AI Design Integration

Enable AI-driven Figma workflows with an MCP server to let agents read and programmatically modify designs for seamless design automation.

Quick Install
npx -y @sonnylazuardi/cursor-talk-to-figma-mcp

Overview

This MCP (Model Context Protocol) server connects AI agents (for example Cursor or Claude Code) to Figma, letting agentic workflows read from and programmatically modify Figma documents. The server acts as a bridge between an AI agent that understands design intent and a Figma plugin that exposes document and selection state, enabling automation patterns such as bulk content updates, instance override propagation, prototype connection creation, and layout adjustments.

For developers building AI-driven design tooling, this project removes much of the plumbing required to inspect node structures, manipulate design properties, and synchronize changes between an agent and Figma. It uses a WebSocket relay plus an MCP server implementation so agents can call discrete “tools” (MCP endpoints) to perform targeted operations inside Figma.

Repository: https://github.com/sonnylazuardi/cursor-talk-to-figma-mcp

Features

  • Read document metadata, selection, and detailed node trees
  • Programmatic node creation (frames, rectangles, text)
  • Batch and single text updates, with chunked scanning for large documents
  • Auto-layout and spacing controls (layout mode, padding, sizing, alignment)
  • Styling operations (fills, strokes, corner radii)
  • Annotation management (create/update annotations in Markdown)
  • Prototype connector handling and connection creation (FigJam connectors)
  • Utility tools: set focus, set selections, scan by node types

Installation / Configuration

Prerequisites: Bun (runtime), Cursor (or another agent supporting MCP), and Figma (desktop or web).

  1. Install Bun:
curl -fsSL https://bun.sh/install | bash
  1. Add the MCP server to your Cursor MCP configuration (~/.cursor/mcp.json):
{
  "mcpServers": {
    "TalkToFigma": {
      "command": "bunx",
      "args": ["cursor-talk-to-figma-mcp@latest"]
    }
  }
}
  1. Start the WebSocket relay that connects the Figma plugin to the MCP server:
bun socket
  1. Install the Figma development plugin:
  • In Figma: Plugins > Development > New Plugin > Link existing plugin
  • Point to src/cursor_mcp_plugin/manifest.json in the repo, or install the published community plugin if available.

Local development: point Cursor to your local server script:

{
  "mcpServers": {
    "TalkToFigma": {
      "command": "bun",
      "args": ["/path/to/repo/src/talk_to_figma_mcp/server.ts"]
    }
  }
}

Windows + WSL notes:

  • Install Bun via PowerShell:
powershell -c "irm bun.sh/install.ps1|iex"
  • Allow socket binding across interfaces by uncommenting hostname in src/socket.ts:
// hostname: "0.0.0.0",
  • Then run:
bun socket

Available Tools

The MCP server exposes many tool endpoints. Below is a condensed reference — use the MCP tooling from your agent to invoke these.

ToolPurposeExample action
get_document_infoInspect high-level document stateList pages and current page id
get_selection / get_nodes_infoRead selected nodes or specific nodesRetrieve node types and styles
read_my_designDetailed node export of current selectionFeed node tree to LLM for summarization
set_selections / set_focusSelect and focus nodes in viewportJump to a node programmatically
get_annotations / set_annotationRead and create Markdown annotationsAttach QA notes to frames
create_rectangle / create_frame / create_textCreate basic elementsProgrammatically scaffold a layout
scan_text_nodes / set_text_content*Bulk text scanning and updatesReplace copy across many text nodes
set_layout_mode / set_padding / set_item_spacingAuto-layout adjustmentsConvert a frame to vertical auto-layout
set_fill_color / set_stroke_color / set_corner_radiusStyling changesApply brand color to buttons
set_default_connector / create_connectionsPrototype connector workflowsCreate FigJam connectors from flow mapping

Tools marked with * have batch variants (e.g., set_multiple_text_contents) for efficiency.

Use Cases

  • Bulk text content replacement: Update product copy or localization by scanning text nodes, chunking large documents, and issuing batched text updates in a single agentic command.
  • Propagate instance overrides: Copy overrides (like color, text, or property changes) from a source component instance and apply them to many target instances to avoid repetitive manual edits.
  • Generate prototypes: Use get_reactions and create_connections to extract prototype flows and programmatically build connector lines or FigJam mappings for handoff or documentation.
  • Automated layout fixes: Detect a frame that should use auto-layout, set layout mode to vertical/horizontal, adjust padding and spacing, and reflow children to match design guidelines.
  • Annotation-driven QA: Agents can scan for annotations, summarize findings, and update or add new annotations with Markdown content to guide designers.

Getting started tips

  • Start the socket and MCP before opening the Figma plugin; the plugin joins a channel to relay messages.
  • Use get_document_info and get_selection early to understand the document structure your agent will operate on.
  • When operating on many nodes, prefer the “scan” and “set_multiple_*” endpoints to avoid rate and payload issues.
  • Review the repository examples for concrete MCP calls and the Figma plugin implementation to see the request/response shape.

For full source and examples, see the project on GitHub: https://github.com/sonnylazuardi/cursor-talk-to-figma-mcp