Skip to content
Back to search

cursor-talk-to-figma-mcp

TalkToFigma: MCP integration between AI Agent (Cursor, Claude Code, Codex) and Figma, allowing Agentic AI to communicate with Figma for reading designs and modifying them programmatically.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/grab--cursor-talk-to-figma-mcp/badge.svg)](/listings/grab--cursor-talk-to-figma-mcp)

HTML

<a href="/listings/grab--cursor-talk-to-figma-mcp"><img src="/api/listings/grab--cursor-talk-to-figma-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

MCP Server: Integration with Cursor

Add the server to your Cursor MCP configuration in `~/.cursor/mcp.json`:

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

WebSocket Server

Start the WebSocket server:

bun socket

Figma Plugin

1. In Figma, go to Plugins > Development > New Plugin 2. Choose "Link existing plugin" 3. Select the `src/cursor_mcp_plugin/manifest.json` file 4. The plugin should now be available in your Figma development plugins

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 267 lines · 1 finding marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Talk to Figma MCP
  2. This project implements a Model Context Protocol (MCP) integration between AI agent (Cursor, Claude Code) and Figma, allowing AI agent to communicate with Figma for reading designs and modifying them programmatically.
  3. https://github.com/user-attachments/assets/129a14d2-ed73-470f-9a4c-2240b2a4885c
  4. ## Project Structure
  5. - `src/talk_to_figma_mcp/` - TypeScript MCP server for Figma integration
  6. - `src/cursor_mcp_plugin/` - Figma plugin for communicating with Cursor
  7. - `src/socket.ts` - WebSocket server that facilitates communication between the MCP server and Figma plugin
  8. ## How to use
  9. 1. Install Bun if you haven't already:
  10. ```bash
  11. curl -fsSL https://bun.sh/install | bash
  12. ```
  13. 2. Run setup, this will also install MCP in your Cursor's active project
  14. ```bash
  15. bun setup
  16. ```
  17. 3. Start the Websocket server
  18. ```bash
  19. bun socket
  20. ```
  21. 4. **NEW** Install Figma plugin from [Figma community page](https://www.figma.com/community/plugin/1485687494525374295/cursor-talk-to-figma-mcp-plugin) or [install locally](#figma-plugin)
  22. ## Quick Video Tutorial
  23. [Video Link](https://www.linkedin.com/posts/sonnylazuardi_just-wanted-to-share-my-latest-experiment-activity-7307821553654657024-yrh8)
  24. ## Design Automation Example
  25. **Bulk text content replacement**
  26. Thanks to [@dusskapark](https://github.com/dusskapark) for contributing the bulk text replacement feature. Here is the [demo video](https://www.youtube.com/watch?v=j05gGT3xfCs).
  27. **Instance Override Propagation**
  28. Another contribution from [@dusskapark](https://github.com/dusskapark)
  29. Propagate component instance overrides from a source instance to multiple target instances with a single command. This feature dramatically reduces repetitive design work when working with component instances that need similar customizations. Check out our [demo video](https://youtu.be/uvuT8LByroI).
  30. ## Manual Setup and Installation
  31. ### MCP Server: Integration with Cursor
  32. Add the server to your Cursor MCP configuration in `~/.cursor/mcp.json`:
  33. ```json
  34. {
  35. "mcpServers": {
  36. "TalkToFigma": {
  37. "command": "bunx",
  38. "args": ["cursor-talk-to-figma-mcp@latest"]
  39. }
  40. }
  41. }
  42. ```
  43. ### WebSocket Server
  44. Start the WebSocket server:
  45. ```bash
  46. bun socket
  47. ```
  48. ### Figma Plugin
  49. 1. In Figma, go to Plugins > Development > New Plugin
  50. 2. Choose "Link existing plugin"
  51. 3. Select the `src/cursor_mcp_plugin/manifest.json` file
  52. 4. The plugin should now be available in your Figma development plugins
  53. ## Windows + WSL Guide
  54. 1. Install bun via powershell
  55. ```bash
  56. powershell -c "irm bun.sh/install.ps1|iex"
  57. ```
  58. 2. Uncomment the hostname `0.0.0.0` in `src/socket.ts`
  59. ```typescript
  60. // uncomment this to allow connections in windows wsl
  61. hostname: "0.0.0.0",
  62. ```
  63. 3. Start the websocket
  64. ```bash
  65. bun socket
  66. ```
  67. ## Usage
  68. 1. Start the WebSocket server
  69. 2. Install the MCP server in Cursor
  70. 3. Open Figma and run the Cursor MCP Plugin
  71. 4. Connect the plugin to the WebSocket server by joining a channel using `join_channel`
  72. 5. Use Cursor to communicate with Figma using the MCP tools
  73. ## Local Development Setup
  74. To develop, update your mcp config to direct to your local directory.
  75. ```json
  76. {
  77. "mcpServers": {
  78. "TalkToFigma": {
  79. "command": "bun",
  80. "args": ["/path-to-repo/src/talk_to_figma_mcp/server.ts"]
  81. }
  82. }
  83. }
  84. ```
  85. ## MCP Tools
  86. The MCP server provides the following tools for interacting with Figma:
  87. ### Document & Selection
  88. - `get_document_info` - Get information about the current Figma document
  89. - `get_selection` - Get information about the current selection
  90. - `read_my_design` - Get detailed node information about the current selection without parameters
  91. - `get_node_info` - Get detailed information about a specific node
  92. - `get_nodes_info` - Get detailed information about multiple nodes by providing an array of node IDs
  93. - `set_focus` - Set focus on a specific node by selecting it and scrolling viewport to it
  94. - `set_selections` - Set selection to multiple nodes and scroll viewport to show them
  95. ### Annotations
  96. - `get_annotations` - Get all annotations in the current document or specific node
  97. - `set_annotation` - Create or update an annotation with markdown support
  98. - `set_multiple_annotations` - Batch create/update multiple annotations efficiently
  99. - `scan_nodes_by_types` - Scan for nodes with specific types (useful for finding annotation targets)
  100. ### Prototyping & Connections
  101. - `get_reactions` - Get all prototype reactions from nodes with visual highlight animation
  102. - `set_default_connector` - Set a copied FigJam connector as the default connector style for creating connections (must be set before creating connections)
  103. - `create_connections` - Create FigJam connector lines between nodes, based on prototype flows or custom mapping
  104. ### Creating Elements
  105. - `create_rectangle` - Create a new rectangle with position, size, and optional name
  106. - `create_frame` - Create a new frame with position, size, and optional name
  107. - `create_section` - Create a section to group related content on the canvas
  108. - `create_text` - Create a new text node with customizable font properties
  109. ### Modifying text content
  110. - `scan_text_nodes` - Scan text nodes with intelligent chunking for large designs
  111. - `set_text_content` - Set the text content of a single text node
  112. - `set_multiple_text_contents` - Batch update multiple text nodes efficiently
  113. ### Auto Layout & Spacing
  114. - `set_layout_mode` - Set the layout mode and wrap behavior of a frame (NONE, HORIZONTAL, VERTICAL)
  115. - `set_padding` - Set padding values for an auto-layout frame (top, right, bottom, left)
  116. - `set_axis_align` - Set primary and counter axis alignment for auto-layout frames
  117. - `set_layout_sizing` - Set horizontal and vertical sizing modes for auto-layout frames (FIXED, HUG, FILL)
  118. - `set_item_spacing` - Set distance between children in an auto-layout frame
  119. ### Styling
  120. - `set_fill_color` - Set the fill color of a node (RGBA)
  121. - `set_stroke_color` - Set the stroke color and weight of a node
  122. - `set_corner_radius` - Set the corner radius of a node with optional per-corner control
  123. - `set_image_fill` - Fill a node with an image from a local file path, URL, or base64 data (FILL, FIT, CROP, or TILE)
  124. ### Layout & Organization
  125. - `move_node` - Move a node to a new position
  126. - `resize_node` - Resize a node with new dimensions
  127. - `delete_node` - Delete a node
  128. - `delete_multiple_nodes` - Delete multiple nodes at once efficiently
  129. - `clone_node` - Create a copy of an existing node with optional position offset
  130. - `rename_node` - Rename a node
  131. - `set_parent` - Move a node into a new parent (section, frame or group), preserving its absolute position by default
  132. ### Components & Styles
  133. - `get_styles` - Get information about local styles
  134. - `get_local_components` - Get information about local components
  135. - `create_component_instance` - Create an instance of a component
  136. - `get_instance_overrides` - Extract override properties from a selected component instance
  137. - `set_instance_overrides` - Apply extracted overrides to target instances
  138. ### Export & Advanced
  139. - `export_node_as_image` - Export a node as an image (PNG, JPG, SVG, or PDF) - limited support on image currently returning base64 as text
  140. ### Connection Management
  141. - `join_channel` - Join a specific channel to communicate with Figma
  142. ### MCP Prompts
  143. The MCP server includes several helper prompts to guide you through complex design tasks:
  144. - `design_strategy` - Best practices for working with Figma designs
  145. - `read_design_strategy` - Best practices for reading Figma designs
  146. - `text_replacement_strategy` - Systematic approach for replacing text in Figma designs
  147. - `annotation_conversion_strategy` - Strategy for converting manual annotations to Figma's native annotations
  148. - `swap_overrides_instances` - Strategy for transferring overrides between component instances in Figma
  149. - `reaction_to_connector_strategy` - Strategy for converting Figma prototype reactions to connector lines using the output of 'get_reactions', and guiding the use 'create_connections' in sequence
  150. ## Development
  151. ### Building the Figma Plugin
  152. 1. Navigate to the Figma plugin directory:
  153. ```
  154. cd src/cursor_mcp_plugin
  155. ```
  156. 2. Edit code.js and ui.html
  157. ## Best Practices
  158. When working with the Figma MCP:
  159. 1. Always join a channel before sending commands
  160. 2. Get document overview using `get_document_info` first
  161. 3. Check current selection with `get_selection` before modifications
  162. 4. Use appropriate creation tools based on needs:
  163. - `create_frame` for containers
  164. - `create_rectangle` for basic shapes
  165. - `create_text` for text elements
  166. 5. Verify changes using `get_node_info`
  167. 6. Use component instances when possible for consistency
  168. 7. Handle errors appropriately as all commands can throw exceptions
  169. 8. For large designs:
  170. - Use chunking parameters in `scan_text_nodes`
  171. - Monitor progress through WebSocket updates
  172. - Implement appropriate error handling
  173. 9. For text operations:
  174. - Use batch operations when possible
  175. - Consider structural relationships
  176. - Verify changes with targeted exports
  177. 10. For converting legacy annotations:
  178. - Scan text nodes to identify numbered markers and descriptions
  179. - Use `scan_nodes_by_types` to find UI elements that annotations refer to
  180. - Match markers with their target elements using path, name, or proximity
  181. - Categorize annotations appropriately with `get_annotations`
  182. - Create native annotations with `set_multiple_annotations` in batches
  183. - Verify all annotations are properly linked to their targets
  184. - Delete legacy annotation nodes after successful conversion
  185. 11. Visualize prototype noodles as FigJam connectors:
  186. - Use `get_reactions` to extract prototype flows,
  187. - set a default connector with `set_default_connector`,
  188. - and generate connector lines with `create_connections` for clear visual flow mapping.
  189. ## License
  190. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.