Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MCP Figma Server Integration

License MCP

Professional integration of the cursor-talk-to-figma-mcp MCP server, enabling Cursor AI to communicate with Figma for reading designs and modifying them programmatically.

πŸš€ Features

  • 40+ MCP Functions - Comprehensive Figma interaction capabilities
  • Document Reading - Analyze and extract design information
  • Element Creation - Create rectangles, frames, and text programmatically
  • Design Modification - Update text, styles, and layouts
  • Component Management - Work with components and instances
  • Batch Operations - Efficient bulk operations
  • Auto-Layout Support - Configure auto-layout properties
  • Annotation Support - Create and manage annotations
  • Prototype Visualization - Convert prototype reactions to connectors
  • Export Capabilities - Export nodes as images

🧭 How It Works (Precise Flow)

  1. WebSocket server (port 3055): ./scripts/server/start-websocket.* launches figma-mcp-server/src/socket.ts. Keep this terminal open.
  2. Figma plugin channel: Run the plugin in Figma, copy the channel name, and call join_channel from Cursor to bind your session.
  3. MCP stdio server: figma-mcp-server/src/talk_to_figma_mcp/server.ts runs under Bun and proxies MCP tools to the WebSocket bridge.
  4. Message path: MCP tool β†’ stdio server β†’ WebSocket β†’ Figma plugin β†’ Figma, then responses return the same path.
  5. Logging: All Figma ops log to stderr with [Figma] [Category] [Action] … to avoid MCP stdio pollution.

πŸ“‹ Table of Contents

🎯 Quick Start

1. Install Dependencies

Windows:

.\scripts\setup\setup.ps1

Linux/Mac:

./scripts/setup/setup.sh

2. Start WebSocket Server

Windows:

.\scripts\server\start-websocket.ps1

Linux/Mac:

./scripts/server/start-websocket.sh

⚠️ Keep this terminal open!

3. Restart Cursor

Close and reopen Cursor to load the MCP server configuration.

4. Connect to Figma

  1. Open Figma and run the plugin: Plugins > Cursor Talk To Figma MCP Plugin
  2. Note the channel name from the plugin panel
  3. In Cursor, join the channel using join_channel

See Quick Start Guide for detailed instructions.

πŸ“¦ Installation

Prerequisites

  • Bun Runtime - Install Bun
  • Figma Desktop or Figma Web - Access to Figma
  • Cursor IDE - With MCP support

Installation Steps

See Installation Guide for complete installation instructions.

πŸ“š Documentation

Comprehensive documentation is organized in the docs/ directory:

Getting Started

Guides

Reference

Development

See Documentation Index for complete navigation.

βš™οΈ Configuration

MCP Server Configuration

Official Setup (Recommended):

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

Local Development:

{
  "mcpServers": {
    "TalkToFigma": {
      "command": "bun",
      "args": ["figma-mcp-server/src/talk_to_figma_mcp/server.ts"],
      "cwd": "${workspaceFolder}"
    }
  }
}

Location: .cursor/mcp.json

Environment Variables

  • Copy .env.example to .env to override defaults for the WebSocket server.
  • PORT (default 3055) and HOST (default localhost) are read by figma-mcp-server/src/socket.ts and the start-websocket scripts.
  • Use these when you need to bind to a different interface/port (e.g., WSL or shared dev VMs).

See Setup Guide for detailed configuration options.

βœ… Best Use: Getting Content & Creating in Figma

Extract/Inspect

  • Join channel β†’ get_document_info (overview) β†’ get_selection β†’ read_my_design.
  • For text/comments: scan_text_nodes, get_annotations, get_reactions (progress is 0–100%).
  • Use batch scans before bulk edits; keep logs in required format.

Create/Modify

  • Join channel; create containers first (create_frame, create_rectangle), then text (create_text).
  • Style (set_fill_color, set_stroke_color, set_corner_radius), auto-layout (set_layout_mode, spacing/padding).
  • Verify with get_node_info/get_nodes_info; use batch ops (set_multiple_text_contents, set_multiple_annotations) to reduce round trips.

Prototype Connectors

  • Fetch reactions (get_reactions), then apply reaction_to_connector_strategy, set default connector, and call create_connections.

πŸ’‘ Usage Examples

Reading a Design

Get information about the current Figma document

Creating Elements

Create a login screen with email and password fields

Bulk Text Replacement

Replace all text in the selected frame with new content

Converting Prototypes

Convert prototype reactions to connector lines

See Usage Examples for more examples.

πŸ“ Project Structure

.
β”œβ”€β”€ docs/                        # All documentation
β”‚   β”œβ”€β”€ getting-started/         # Quick start guides
β”‚   β”œβ”€β”€ guides/                  # Detailed guides
β”‚   β”œβ”€β”€ reference/               # Reference documentation
β”‚   β”œβ”€β”€ development/             # Development docs
β”‚   └── archive/                 # Historical docs
β”œβ”€β”€ scripts/                     # Utility scripts
β”‚   β”œβ”€β”€ setup/                   # Installation scripts
β”‚   β”œβ”€β”€ server/                  # Server scripts
β”‚   └── utils/                   # Utility scripts
β”œβ”€β”€ figma-mcp-server/            # MCP server repository
β”œβ”€β”€ .cursor/                     # Cursor configuration
β”‚   β”œβ”€β”€ mcp.json                 # MCP server config
β”‚   └── rules/                   # Cursor rules
β”œβ”€β”€ CHANGELOG.md                 # Version history
β”œβ”€β”€ FUTURE_LOG.md                # Future plans
β”œβ”€β”€ LICENSE                      # Apache 2.0 License
└── README.md                    # This file

πŸ› οΈ Available Functions

The MCP server provides 40+ functions organized into categories:

  • Document & Selection (7 functions) - Read document and selection information
  • Creating Elements (3 functions) - Create rectangles, frames, and text
  • Modifying Elements (6 functions) - Move, resize, clone, delete nodes
  • Styling (3 functions) - Set colors, strokes, corner radius
  • Auto Layout & Spacing (5 functions) - Configure auto-layout properties
  • Annotations (3 functions) - Create and manage annotations
  • Prototyping & Connections (3 functions) - Work with prototype flows
  • Components & Styles (5 functions) - Manage components and styles
  • Scanning & Analysis (2 functions) - Scan for nodes and text
  • Export (1 function) - Export nodes as images

See Functions Reference for complete details.

πŸ”§ Scripts

All scripts are organized in the scripts/ directory:

  • Setup: scripts/setup/ - Installation scripts
  • Server: scripts/server/ - WebSocket server scripts
  • Utils: scripts/utils/ - Utility scripts

See Scripts README for details.

πŸ› Troubleshooting

Common issues and solutions:

  • "Not connected to Figma" - Check WebSocket server and plugin connection
  • "Must join a channel" - Join channel using join_channel
  • MCP server not found - Restart Cursor and verify configuration

See Troubleshooting Guide for detailed solutions.

🀝 Contributing

Contributions are welcome! Please see:

πŸ“– Best Practices

  1. Always join a channel first before sending commands
  2. Start with document overview using get_document_info
  3. Use batch operations for multiple items
  4. Verify changes with get_node_info after modifications
  5. Handle errors appropriately - all commands can throw exceptions

See Complete Tutorial for detailed best practices.

πŸ”— Resources

πŸ“ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

The MCP server (figma-mcp-server/) is based on cursor-talk-to-figma-mcp which is licensed under MIT License.

πŸ“Š Changelog

See CHANGELOG.md for version history and changes.

πŸ—ΊοΈ Roadmap

See FUTURE_LOG.md for future plans and ideas.


Need help? Check the Documentation Index or Troubleshooting Guide.

Ready to get started? See the Quick Start Guide!

🌐 How to Publish to GitHub (Public)

  1. Prep the tree
  • Verify no secrets: check .env, .cursor/mcp.json, and docs/design-systems/checkout/extracted-data/*.json; remove or redact if needed.
  • Ensure .gitignore excludes node_modules/, .bun/, dist/ (and optionally figma-mcp-server/dist/), plus extraction JSONs you don’t want to publish.
  • Keep LICENSE (Apache 2.0) and CHANGELOG.md as-is.
  1. Initialize git (from repo root)
git init
git add .
git commit -m "Initial public release"
  1. Create a new public GitHub repo
  • Create on GitHub without auto-adding README/license/gitignore.
  1. Add remote and push
git remote add origin https://github.com/<your-org-or-user>/<repo-name>.git
git branch -M main
git push -u origin main
  1. Optional polish before push
  • Install deps: (cd figma-mcp-server && bun install); commit bun.lock.
  • Quick status: ./scripts/utils/check-status.ps1 (or .sh).
  • If extraction JSONs are large/sensitive, remove or gitignore docs/design-systems/checkout/extracted-data/*.json.
  1. Post-publish
  • Tag a release (e.g., v1.0.1) aligned with CHANGELOG.md.
  • Enable branch protection on main if desired.

About

Archived. Fork of grab/cursor-talk-to-figma-mcp (6,700+ stars). Original additions: docs, scripts, tests (~30%).

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages