Figma Copilot
Enables programmatic interaction with Figma designs, providing tools for reading document structure, manipulating nodes, updating text with formatting preservation, managing auto-layout properties, creating connections and prototypes, handling annotations, and performing batch operations for design automation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Figma Copilot replace all placeholder text in the selected frames with our new brand copy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Figma Copilot
A Model Context Protocol (MCP) server that enables AI assistants to interact with Figma designs programmatically. Compatible with any MCP client including Cursor, Claude Desktop, and other MCP-enabled applications. Features advanced text handling, batch operations, and comprehensive design automation capabilities.
Credits
This project is based on cursor-talk-to-figma-mcp by Sonny Lazuardi.
Related MCP server: MCP Figma
Disclaimer
This is an independent project and is not affiliated with, officially maintained, authorized, endorsed, or sponsored by Figma, Inc. All product and company names are trademarks™ or registered® trademarks of their respective holders.
Key Enhancements
v0.3.2 (Latest)
Text Formatting Preservation - Text updates no longer lose formatting (bold, italic, colors, fonts). See Enhanced Text Operations Guide.
Batch Operations - 50-90% performance improvement for bulk operations. See Batch Operations Guide.
Enhanced Error Handling - Specific, actionable error messages with suggestions
Timeout Solutions - New scanning options with depth control and partial results
Smart Text Operations - Find/replace with formatting preservation
Previous Enhancements
Fixed "Cannot unwrap symbol" error when working with mixed fonts. See Font Handling Documentation.
Improved font loading with
getRangeAllFontNames()APIBetter error handling with
Promise.allSettled()for font loadingSafe value returns to avoid serialization issues
Enhanced logging for debugging font issues
Project Structure
src/talk_to_figma_mcp/- TypeScript MCP server for Figma integrationsrc/figma_copilot_plugin/- Figma plugin for communicating with MCP clientssrc/socket.ts- WebSocket server that facilitates communication between the MCP server and Figma plugin
Get Started
Install Bun if you haven't already:
curl -fsSL https://bun.sh/install | bashRun setup to configure MCP
bun setupStart the Websocket server
bun socketMCP server
bunx figma-copilotNEW Install Figma plugin from Figma community page or install locally
Quick Start Guide
Video tutorials coming soon!
Design Automation Example
Bulk text content replacement
Thanks to @dusskapark for contributing the bulk text replacement feature.
Instance Override Propagation Another contribution from @dusskapark 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.
Performance Improvements (v0.3.2)
Based on real production usage with bulk infographic creation:
Operation | Before v0.3.2 | After v0.3.2 | Improvement |
Clone 20 nodes | 50 seconds | 5 seconds | 90% faster |
Update 112 text nodes | 15 minutes | 30 seconds | 96% faster |
Scan large document | Timeout after 30s | 3 seconds | No timeouts |
Text + formatting update | 2 separate calls | 1 combined call | 50% fewer API calls |
Manual Setup and Installation
MCP Server: Integration with MCP Clients
Add the server to your MCP client configuration. For example, in Cursor's ~/.cursor/mcp.json or Claude Desktop's configuration:
{
"mcpServers": {
"figma-copilot": {
"command": "bunx",
"args": ["figma-copilot@latest"]
}
}
}WebSocket Server
Start the WebSocket server:
bun socketFigma Plugin
In Figma, go to Plugins > Development > New Plugin
Choose "Link existing plugin"
Select the
src/figma_copilot_plugin/manifest.jsonfileThe plugin should now be available in your Figma development plugins
Windows + WSL Guide
Install bun via powershell
powershell -c "irm bun.sh/install.ps1|iex"Uncomment the hostname
0.0.0.0insrc/socket.ts
// uncomment this to allow connections in windows wsl
hostname: "0.0.0.0",Start the websocket
bun socketUsage
Start the WebSocket server
Install the MCP server in your MCP client
Open Figma and run the Figma Copilot Plugin
Connect the plugin to the WebSocket server by joining a channel using
join_channelUse your MCP client to communicate with Figma using the MCP tools
MCP Tools
The MCP server provides the following tools for interacting with Figma:
Document & Selection
get_document_info- Get information about the current Figma documentget_current_context- Get comprehensive context including selection, focused slide (if in Slides mode), and optionally document info- DEPRECATED: Useget_selectionget_current_contextinsteadread_my_design- Get detailed node information about the current selection without parametersget_nodes- Get detailed information about one or more nodes (accepts single ID or array)- DEPRECATED: Useget_node_infoget_nodeswith single node ID instead- DEPRECATED: Useget_nodes_infoget_nodeswith array of node IDs instead- DEPRECATED: Useget_focused_slideget_current_contextwith includeSlideDetails option- DEPRECATED: Useget_slides_modeget_current_contextwith includeSlideDetails option
Annotations
get_annotations- Get all annotations in the current document or specific nodeset_annotation- Create or update an annotation with markdown supportset_multiple_annotations- Batch create/update multiple annotations efficientlyscan_nodes_by_types- Scan for nodes with specific types (useful for finding annotation targets)
Prototyping & Connections
get_reactions- Get all prototype reactions from nodes with visual highlight animationset_default_connector- Set a copied FigJam connector as the default connector style for creating connections (must be set before creating connections)create_connections- Create FigJam connector lines between nodes, based on prototype flows or custom mapping
Creating Elements
create_rectangle- Create a new rectangle with position, size, and optional namecreate_frame- Create a new frame with position, size, and optional namecreate_text- Create a new text node with customizable font properties
Text Operations
Basic Text Operations
- DEPRECATED: Usescan_text_nodesscan_nodes_with_optionswithnodeTypes: ['TEXT']insteadscan_nodes_with_options- Enhanced scanning with depth control, timeout handling, and partial resultsset_text_content- Set the text content of a single text node (Note: loses formatting)set_multiple_text_contents- Batch update multiple text nodes efficiently (Note: loses formatting)
Text with Formatting Preservation (v0.3.2)
See Enhanced Text Operations Guide for an overview.
update_text_preserve_formatting- Update text while preserving all character formatting (bold, italic, colors, fonts)smart_text_replace- Find and replace text while preserving formatting of unchanged portionsset_multiple_text_contents_with_styles- Batch update text with formatting in a single operation
Text Styling
See Text Styling Guide for detailed usage.
set_text_style_range- Apply text styling (bold, italic, underline, strikethrough) to specific character rangesget_text_style_range- Get text styling for a specific rangeset_text_decoration_range- Set advanced text decoration propertiesget_text_decoration_range- Get text decoration properties for a rangeset_range_font- Change font family and style for a text rangeset_range_font_size- Change font size for a text rangeset_range_fills- Set text color for a specific rangeget_styled_text_segments- Get detailed information about text segments and their propertiesset_component_description- Set component description using Markdownget_component_description- Get component description in Markdown formatnormalize_markdown- Normalize Markdown text to Figma's supported subset
Auto Layout & Spacing
set_layout_mode- Set the layout mode and wrap behavior of a frame (NONE, HORIZONTAL, VERTICAL)set_padding- Set padding values for an auto-layout frame (top, right, bottom, left)set_axis_align- Set primary and counter axis alignment for auto-layout framesset_layout_sizing- Set horizontal and vertical sizing modes for auto-layout frames (FIXED, HUG, FILL)set_item_spacing- Set distance between children in an auto-layout frame
Styling
set_fill_color- Set the fill color of a node (RGBA)set_stroke_color- Set the stroke color and weight of a nodeset_corner_radius- Set the corner radius of a node with optional per-corner control
Layout & Organization
move_node- Move a node to a new positionresize_node- Resize a node with new dimensionsdelete_node- Delete a nodedelete_multiple_nodes- Delete multiple nodes at once efficientlyclone_node- Create a copy of an existing node with optional position offset
Batch Operations (v0.3.2)
See Batch Operations Guide for best practices.
clone_multiple_nodes- Clone a node to multiple positions in one operation (50-90% faster than individual clones)- DEPRECATED: Useget_multiple_nodes_infoget_nodeswith array of node IDs insteadset_multiple_nodes_property- Set the same property value on multiple nodes at onceexecute_batch- Execute multiple different commands in sequence with a single round-tripget_connection_status- Get current connection status and statistics
Components & Styles
get_styles- Get information about local stylesget_local_components- Get information about local componentscreate_component_instance- Create an instance of a componentget_instance_overrides- Extract override properties from a selected component instanceset_instance_overrides- Apply extracted overrides to target instances
Composite Tools
extract_slide_content- Extract all content from a Figma slide including text, tables, and optionally images (supports raw or structured output)get_presentation_summary- Generate an overview of a Figma presentation including slide count, slide titles, and optionally an outline summarizing key pointsget_table_data- Extract data from a Figma table node in various formats (array, object, or CSV) with customizable header handling
Export & Advanced
export_node_as_image- Export a node as an image (PNG, JPG, SVG, or PDF) - limited support on image currently returning base64 as text
Connection Management
join_channel- Join a specific channel to communicate with Figma
MCP Prompts
The MCP server includes several helper prompts to guide you through complex design tasks:
design_strategy- Best practices for working with Figma designsread_design_strategy- Best practices for reading Figma designstext_replacement_strategy- Systematic approach for replacing text in Figma designsannotation_conversion_strategy- Strategy for converting manual annotations to Figma's native annotationsswap_overrides_instances- Strategy for transferring overrides between component instances in Figmareaction_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 sequencebatch_operations_guide- Best practices for efficient bulk operations in Figma (v0.3.2)error_recovery_guide- How to handle common errors and timeouts in Figma operations (v0.3.2)text_formatting_guide- Best practices for updating text while preserving formatting (v0.3.2)
Development
Building the Figma Plugin
Navigate to the Figma plugin directory:
cd src/figma_copilot_pluginEdit code.js and ui.html
Best Practices
When working with the Figma MCP:
Always join a channel before sending commands
Get document overview using
get_document_infofirstCheck current context with
get_current_contextbefore modificationsUse appropriate creation tools based on needs:
create_framefor containerscreate_rectanglefor basic shapescreate_textfor text elements
Verify changes using
get_node_infoUse component instances when possible for consistency
Handle errors appropriately as all commands can throw exceptions
For large designs:
Use
scan_nodes_with_optionswith appropriate timeout and depth settingsMonitor progress through WebSocket updates
Implement appropriate error handling
For text operations:
Use batch operations when possible
Consider structural relationships
Verify changes with targeted exports
For converting legacy annotations:
Scan text nodes to identify numbered markers and descriptions
Use
scan_nodes_by_typesto find UI elements that annotations refer toMatch markers with their target elements using path, name, or proximity
Categorize annotations appropriately with
get_annotationsCreate native annotations with
set_multiple_annotationsin batchesVerify all annotations are properly linked to their targets
Delete legacy annotation nodes after successful conversion
Visualize prototype noodles as FigJam connectors:
Use
get_reactionsto extract prototype flows,set a default connector with
set_default_connector,and generate connector lines with
create_connectionsfor clear visual flow mapping.
Troubleshooting
Font Issues
If you encounter "Cannot unwrap symbol" errors when updating text, this is likely due to mixed fonts in text nodes. See Font Handling Documentation for details on how the plugin handles mixed fonts and available strategies.
Timeout Issues
For large documents that cause timeouts, use scan_nodes_with_options with depth limiting and partial results. See Batch Operations Guide for optimization strategies.
Documentation
Batch Operations Guide - Learn how to use batch operations for massive performance gains
Enhanced Text Operations Guide - Preserve formatting while updating text
Text Styling Guide - Apply and manage text styles
Font Handling Documentation - Handle mixed fonts and font loading strategies
Changelog v0.3.2 - Latest release notes
License
MIT
Available Tools
75 toolsclone_multiple_nodesA
Clone a node to multiple positions in one operation. Significantly faster than multiple individual clone operations.
Inputs: positions (required), sourceNodeId (required), parentId.
clone_nodeB
Clone an existing node in Figma
Inputs: nodeId (required), x, y.
create_component_instanceC
Create an instance of a component in Figma
Inputs: x (required), y (required), componentKey (required).
create_connectionsA
Create connections between nodes using the default connector style
Inputs: connections (required).
create_frameC
Create a new frame in Figma
Inputs: x (required), y (required), width (required), height (required), +16 more.
create_gifC
Create a GIF (available in Figma Slides and FigJam)
Inputs: url (required), x, y, name, +3 more.
create_rectangleB
Create a new rectangle in Figma
Inputs: x (required), y (required), width (required), height (required), +2 more.
create_shape_with_textB
Create a shape with text (available in Figma Slides and FigJam)
Inputs: x, y, name, text, +10 more.
create_slideC
Create a new slide in Figma Slides
Inputs: name, parentId, fillColor, strokeColor, +1 more.
create_slide_rowC
Create a new slide row in Figma Slides
Inputs: name, parentId.
create_tableC
Create a table (available in Figma Design and Slides)
Inputs: x, y, name, rows, +4 more.
create_textB
Create a new text element in Figma
Inputs: x (required), y (required), text (required), name, +4 more.
delete_multiple_nodesA
Delete multiple nodes from Figma at once
Inputs: nodeIds (required).
delete_nodeC
Delete a node from Figma
Inputs: nodeId (required).
execute_batchC
Execute multiple commands in sequence with a single round-trip. Ideal for complex operations that require multiple steps.
Inputs: commands (required), stopOnError.
export_node_as_imageB
Export a node as an image from Figma
Inputs: nodeId (required), scale, format.
extract_slide_contentB
Extract all content from a Figma slide including text, tables, and optionally images
Inputs: slideId (required), textOnly, outputFormat, includeImages.
get_annotationsA
Get all annotations in the current document or specific node
Inputs: nodeId, includeCategories.
get_component_descriptionA
Get the description of a component in Markdown format
Inputs: nodeId (required).
get_connection_statusA
Get the current connection status and statistics for the Figma plugin connection
Inputs: no named parameters.
get_current_contextA
Get comprehensive context about the current state including selection, focused slide (if in Slides mode), and optionally document info
Inputs: includeDocument, includeSlideDetails, includeSelectionDetails.
get_document_infoB
Get detailed information about the current Figma document
Inputs: no named parameters.
get_focused_slideA
[DEPRECATED] Get the currently focused slide in Figma Slides. Use 'get_current_context' instead.
Inputs: no named parameters.
get_instance_overridesA
Get all override properties from a selected component instance. These overrides can be applied to other instances, which will swap them to match the source component.
Inputs: nodeId.
get_local_componentsA
Get all local components from the Figma document
Inputs: no named parameters.
get_multiple_nodes_infoA
[DEPRECATED] Get information for multiple nodes in a single request. Use 'get_nodes' instead.
Inputs: nodeIds (required).
get_node_infoA
[DEPRECATED] Get detailed information about a specific node in Figma. Use 'get_nodes' instead.
Inputs: nodeId (required).
get_nodesB
Get detailed information about one or more nodes in Figma. Accepts either a single node ID or array of IDs.
Inputs: nodeIds (required), maxDepth, includeChildren.
get_nodes_infoA
[DEPRECATED] Get detailed information about multiple nodes in Figma. Use 'get_nodes' instead.
Inputs: nodeIds (required).
get_presentation_summaryA
Generate an overview of a Figma presentation including slide count, slide titles, and optionally an outline summarizing key points
Inputs: includeOutline, maxTextPreview, includeEmptySlides.
get_reactionsA
Get Figma Prototyping Reactions from multiple nodes. CRITICAL: The output MUST be processed using the 'reaction_to_connector_strategy' prompt IMMEDIATELY to generate parameters for connector lines via the 'create_connections' tool.
Inputs: nodeIds (required).
get_selectionA
[DEPRECATED] Get information about the current selection in Figma. Use 'get_current_context' instead.
Inputs: no named parameters.
get_slide_gridB
Get the current slide grid arrangement in Figma Slides
Inputs: no named parameters.
get_slides_modeA
[DEPRECATED] Get the current viewport mode in Figma Slides. Use 'get_current_context' instead.
Inputs: no named parameters.
get_slide_transitionB
Get the transition settings for a slide in Figma Slides
Inputs: slideId (required).
get_styled_text_segmentsC
Get detailed text segments with all their styling properties
Inputs: fields (required), nodeId (required), end, start.
get_stylesA
Get all styles from the current Figma document
Inputs: no named parameters.
get_table_dataB
Extract data from a Figma table node in various formats (array, object, or CSV)
Inputs: tableId (required), headerRow, outputFormat, includeHeaders, +1 more.
get_text_decoration_rangeB
Get the text decoration properties for a specific text range
Inputs: end (required), start (required), nodeId (required).
get_text_style_rangeB
Get the text styling (bold, italic, underline, strikethrough) for a specific range of text
Inputs: end (required), start (required), nodeId (required).
join_channelB
Join a specific channel to communicate with Figma
Inputs: channel.
move_nodeA
Move a node to a new position in Figma
Inputs: x (required), y (required), nodeId (required).
normalize_markdownB
Normalize Markdown text to match Figma's supported subset
Inputs: markdown (required).
read_my_designA
Get detailed information about the current selection in Figma, including all node details
Inputs: no named parameters.
resize_nodeC
Resize a node in Figma
Inputs: width (required), height (required), nodeId (required).
scan_nodes_by_typesA
Scan for child nodes with specific types in the selected Figma node
Inputs: types (required), nodeId (required).
scan_nodes_with_optionsA
Scan for nodes with advanced options including depth limit, timeout control, and partial results. Use this when scan_text_nodes times out.
Inputs: nodeId (required), options.
scan_text_nodesA
[DEPRECATED] Scan all text nodes in the selected Figma node - Use scan_nodes_with_options instead
Inputs: nodeId (required).
set_annotationC
Create or update an annotation
Inputs: nodeId (required), labelMarkdown (required), categoryId, properties, +1 more.
set_axis_alignA
Set primary and counter axis alignment for an auto-layout frame in Figma
Inputs: nodeId (required), counterAxisAlignItems, primaryAxisAlignItems.
set_component_descriptionB
Set the description of a component with Markdown formatting support
Inputs: nodeId (required), descriptionMarkdown (required).
set_corner_radiusA
Set the corner radius of a node in Figma
Inputs: nodeId (required), radius (required), corners.
set_default_connectorB
Set a copied connector node as the default connector
Inputs: connectorId.
set_fill_colorC
Set the fill color of a node in Figma can be TextNode or FrameNode
Inputs: b (required), g (required), r (required), nodeId (required), +1 more.
set_instance_overridesA
Apply previously copied overrides to selected component instances. Target instances will be swapped to the source component and all copied override properties will be applied.
Inputs: targetNodeIds (required), sourceInstanceId (required).
set_item_spacingA
Set distance between children in an auto-layout frame
Inputs: nodeId (required), itemSpacing (required).
set_layout_modeB
Set the layout mode and wrap behavior of a frame in Figma
Inputs: nodeId (required), layoutMode (required), layoutWrap.
set_layout_sizingB
Set horizontal and vertical sizing modes for an auto-layout frame in Figma
Inputs: nodeId (required), layoutSizingVertical, layoutSizingHorizontal.
set_multiple_annotationsC
Set multiple annotations parallelly in a node
Inputs: nodeId (required), annotations (required).
set_multiple_nodes_propertyA
Set the same property value on multiple nodes at once. Useful for bulk updates like visibility, opacity, or position.
Inputs: value (required), nodeIds (required), property (required).
set_multiple_text_contentsC
Set multiple text contents parallelly in a node
Inputs: text (required), nodeId (required).
set_multiple_text_contents_with_stylesA
Update multiple text nodes with content and optional styling in a single operation. More efficient than separate text and style updates.
Inputs: nodeId (required), updates (required).
set_paddingA
Set padding values for an auto-layout frame in Figma
Inputs: nodeId (required), paddingTop, paddingLeft, paddingRight, +1 more.
set_range_fillsC
Set the text color for a specific text range
Inputs: end (required), color (required), start (required), nodeId (required).
set_range_fontB
Set the font family and style for a specific text range
Inputs: end (required), start (required), nodeId (required), fontFamily (required), +1 more.
set_range_font_sizeC
Set the font size for a specific text range
Inputs: end (required), start (required), nodeId (required), fontSize (required).
set_slide_gridC
Rearrange slides into a grid layout in Figma Slides
Inputs: slides (required).
set_slides_modeB
Set the viewport mode in Figma Slides
Inputs: mode (required).
set_slide_transitionB
Set the transition for a slide in Figma Slides
Inputs: slideId (required), transition (required).
set_stroke_colorB
Set the stroke color of a node in Figma
Inputs: b (required), g (required), r (required), nodeId (required), +2 more.
set_text_contentA
Set the text content of an existing text node in Figma
Inputs: text (required), nodeId (required).
set_text_decoration_rangeB
Set advanced text decoration properties (style, color, thickness, offset) for a text range
Inputs: end (required), start (required), nodeId (required), color, +4 more.
set_text_style_rangeB
Apply text styling (bold, italic, underline, strikethrough) to a specific range of text in a text node
Inputs: end (required), start (required), nodeId (required), bold, +3 more.
smart_text_replaceA
Replace specific text in a node while preserving the formatting of unchanged portions. Only replaced text gets default formatting.
Inputs: nodeId (required), replacements (required).
update_text_preserve_formattingA
Update text content while preserving existing character formatting. Choose a strategy for handling formatting when text length changes.
Inputs: nodeId (required), newText (required), preserveFormattingStrategy.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 75 tools
Many tools overlap in purpose, especially the deprecated aliases (get_selection, get_node_info, get_nodes_info, scan_text_nodes) that duplicate current equivalents. Text-editing options are also numerous and subtly different (set_text_content, update_text_preserving_formatting, smart_text_replace), which makes misselection likely.
Most tools follow a clear verb_noun snake_case pattern (get_, create_, set_, update_, delete_), but there are minor inconsistencies like read_my_design vs get_document_info and deprecated variants with different names (get_nodes_info vs get_multiple_nodes_info).
75 tools is far beyond what an agent can effectively consider, and many are deprecated duplicates or near-overlapping variants. Even for a broad Figma surface, the set should be consolidated to reduce cognitive load and redundant alternatives.
The surface covers design nodes, text styling, layout, components, slides, annotations, and connections, so most core workflows are represented. However, some gaps exist, such as renaming or deleting components/styles and managing frames/pages more broadly, though these are workable around.
Maintenance
Related MCP Connectors
The Figma MCP server brings Figma design context directly into your AI workflow.
Generate, inspect, and manage Flowstep UI designs directly from your AI assistant.
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
Give your AI agents a design superpower. Generate, edit, and publish publication-grade decks, reports, landing pages, resumes, and marketing visuals directly within your agent workflow. Delivering frontier-level design quality at 3× the speed and 53× lower cost -from conversational prompt to live link or vector PDF in minutes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants like Cursor to interact with Figma designs programmatically. Supports reading design information, modifying elements, creating components, managing text content, and automating design workflows through natural language commands.1,224 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and modify Figma designs programmatically, supporting design analysis, element creation, text replacement, annotations, auto-layout configuration, and prototype visualization through natural language commands.1,908 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access and manipulate Figma designs, including extracting design systems, creating and debugging UI components, and syncing design tokens bidirectionally.13,916 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, analyze, and modify Figma designs, including bulk style updates, accessibility audits, comment triage, and code generation from designs.807 npmMIT