Skip to main content
Glama
Figma Copilot

Figma Copilot

by xlzuvekas

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() API

  • Better error handling with Promise.allSettled() for font loading

  • Safe value returns to avoid serialization issues

  • Enhanced logging for debugging font issues

Project Structure

  • src/talk_to_figma_mcp/ - TypeScript MCP server for Figma integration

  • src/figma_copilot_plugin/ - Figma plugin for communicating with MCP clients

  • src/socket.ts - WebSocket server that facilitates communication between the MCP server and Figma plugin

Get Started

  1. Install Bun if you haven't already:

curl -fsSL https://bun.sh/install | bash
  1. Run setup to configure MCP

bun setup
  1. Start the Websocket server

bun socket
  1. MCP server

bunx figma-copilot
  1. NEW 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 socket

Figma Plugin

  1. In Figma, go to Plugins > Development > New Plugin

  2. Choose "Link existing plugin"

  3. Select the src/figma_copilot_plugin/manifest.json file

  4. The plugin should now be available in your Figma development plugins

Windows + WSL Guide

  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

bun socket

Usage

  1. Start the WebSocket server

  2. Install the MCP server in your MCP client

  3. Open Figma and run the Figma Copilot Plugin

  4. Connect the plugin to the WebSocket server by joining a channel using join_channel

  5. Use 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 document

  • get_current_context - Get comprehensive context including selection, focused slide (if in Slides mode), and optionally document info

  • get_selection - DEPRECATED: Use get_current_context instead

  • read_my_design - Get detailed node information about the current selection without parameters

  • get_nodes - Get detailed information about one or more nodes (accepts single ID or array)

  • get_node_info - DEPRECATED: Use get_nodes with single node ID instead

  • get_nodes_info - DEPRECATED: Use get_nodes with array of node IDs instead

  • get_focused_slide - DEPRECATED: Use get_current_context with includeSlideDetails option

  • get_slides_mode - DEPRECATED: Use get_current_context with includeSlideDetails option

Annotations

  • get_annotations - Get all annotations in the current document or specific node

  • set_annotation - Create or update an annotation with markdown support

  • set_multiple_annotations - Batch create/update multiple annotations efficiently

  • scan_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 animation

  • set_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 name

  • create_frame - Create a new frame with position, size, and optional name

  • create_text - Create a new text node with customizable font properties

Text Operations

Basic Text Operations

  • scan_text_nodes - DEPRECATED: Use scan_nodes_with_options with nodeTypes: ['TEXT'] instead

  • scan_nodes_with_options - Enhanced scanning with depth control, timeout handling, and partial results

  • set_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 portions

  • set_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 ranges

  • get_text_style_range - Get text styling for a specific range

  • set_text_decoration_range - Set advanced text decoration properties

  • get_text_decoration_range - Get text decoration properties for a range

  • set_range_font - Change font family and style for a text range

  • set_range_font_size - Change font size for a text range

  • set_range_fills - Set text color for a specific range

  • get_styled_text_segments - Get detailed information about text segments and their properties

  • set_component_description - Set component description using Markdown

  • get_component_description - Get component description in Markdown format

  • normalize_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 frames

  • set_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 node

  • set_corner_radius - Set the corner radius of a node with optional per-corner control

Layout & Organization

  • move_node - Move a node to a new position

  • resize_node - Resize a node with new dimensions

  • delete_node - Delete a node

  • delete_multiple_nodes - Delete multiple nodes at once efficiently

  • clone_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)

  • get_multiple_nodes_info - DEPRECATED: Use get_nodes with array of node IDs instead

  • set_multiple_nodes_property - Set the same property value on multiple nodes at once

  • execute_batch - Execute multiple different commands in sequence with a single round-trip

  • get_connection_status - Get current connection status and statistics

Components & Styles

  • get_styles - Get information about local styles

  • get_local_components - Get information about local components

  • create_component_instance - Create an instance of a component

  • get_instance_overrides - Extract override properties from a selected component instance

  • set_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 points

  • get_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 designs

  • read_design_strategy - Best practices for reading Figma designs

  • text_replacement_strategy - Systematic approach for replacing text in Figma designs

  • annotation_conversion_strategy - Strategy for converting manual annotations to Figma's native annotations

  • swap_overrides_instances - Strategy for transferring overrides between component instances in Figma

  • 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

  • batch_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

  1. Navigate to the Figma plugin directory:

    cd src/figma_copilot_plugin
  2. Edit code.js and ui.html

Best Practices

When working with the Figma MCP:

  1. Always join a channel before sending commands

  2. Get document overview using get_document_info first

  3. Check current context with get_current_context before modifications

  4. Use appropriate creation tools based on needs:

    • create_frame for containers

    • create_rectangle for basic shapes

    • create_text for text elements

  5. Verify changes using get_node_info

  6. Use component instances when possible for consistency

  7. Handle errors appropriately as all commands can throw exceptions

  8. For large designs:

    • Use scan_nodes_with_options with appropriate timeout and depth settings

    • Monitor progress through WebSocket updates

    • Implement appropriate error handling

  9. For text operations:

    • Use batch operations when possible

    • Consider structural relationships

    • Verify changes with targeted exports

  10. For converting legacy annotations:

    • Scan text nodes to identify numbered markers and descriptions

    • Use scan_nodes_by_types to find UI elements that annotations refer to

    • Match markers with their target elements using path, name, or proximity

    • Categorize annotations appropriately with get_annotations

    • Create native annotations with set_multiple_annotations in batches

    • Verify all annotations are properly linked to their targets

    • Delete legacy annotation nodes after successful conversion

  11. Visualize prototype noodles as FigJam connectors:

  • Use get_reactions to extract prototype flows,

  • set a default connector with set_default_connector,

  • and generate connector lines with create_connections for 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

License

MIT

Available Tools

75 tools
clone_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

    B3/5.0

    Scored across 75 tools

    Disambiguation2/5

    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.

    Naming Consistency4/5

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

    Tool Count1/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to access and manipulate Figma designs, including extracting design systems, creating and debugging UI components, and syncing design tokens bidirectionally.
      13,916 npm
      MIT