Figma MCP (Cursor Talk to Figma)
A Model Context Protocol (MCP) integration that bridges Cursor AI and Figma, enabling AI-powered design automation, bulk edits, and intelligent design manipulation directly from your code editor.Overview
Figma MCP implements the Model Context Protocol to allow Cursor AI to communicate with Figma for reading designs and modifying them programmatically. It uses a WebSocket server to facilitate real-time communication between the MCP server and a Figma plugin.MCP Server
TypeScript-based server implementing Model Context Protocol
Figma Plugin
Browser-based plugin for executing commands in Figma
WebSocket Bridge
Real-time bidirectional communication layer
Cursor Integration
Native integration with Cursor AI editor
Architecture
Three-Part System
MCP Server
Implements the Model Context Protocol and exposes tools to Cursor AI. Runs as a TypeScript process.
WebSocket Server
Bridges communication between the MCP server and Figma plugin. Runs on
localhost:3000.Project Structure
Features
Design Reading
- Get Node Properties
- Export Assets
- Traverse Hierarchy
Read any property from Figma nodes:
- Dimensions (width, height, x, y)
- Styling (fills, strokes, effects)
- Text content and formatting
- Layer structure and hierarchy
Design Modification
Bulk Text Replacement
Replace text content across multiple text layers simultaneously
Style Updates
Modify fills, strokes, effects, and other style properties
Layout Adjustments
Change positions, sizes, and spacing programmatically
Instance Overrides
Propagate component instance changes to multiple targets
Automation Examples
Bulk Text Content Replacement
Bulk Text Content Replacement
Replace text in multiple text layers at once:Cursor Prompt:What happens:
- MCP server sends command to Figma plugin
- Plugin finds all text layers
- Replaces matching content
- Reports back number of changes
Instance Override Propagation
Instance Override Propagation
Copy overrides from one component instance to many:Cursor Prompt:Use case:
You’ve customized one button instance and want to apply those same customizations to 50 other buttons.Demo Video
Batch Style Updates
Batch Style Updates
Update styles across multiple layers:Cursor Prompt:
Installation
Prerequisites
Quick Setup
Install Figma Plugin
Option A: Figma Community (Recommended)Install from Figma CommunityOption B: Local Development
- In Figma: Plugins → Development → New Plugin
- Choose “Link existing plugin”
- Select
src/cursor_mcp_plugin/manifest.json
Manual MCP Configuration
Add to~/.cursor/mcp.json:
Usage
Basic Workflow
Example Prompts
Technical Details
MCP Protocol Implementation
The server exposes tools through the Model Context Protocol:WebSocket Communication
Figma Plugin Side
Windows + WSL Setup
Use Cases
Localization
Bulk replace text for different languages across all screens
A/B Testing
Create design variations by programmatically changing elements
Data Population
Fill designs with real data from APIs or databases
Design Tokens
Apply design token changes across entire design systems
Batch Updates
Update pricing, dates, or other content across multiple artboards
Component Sync
Propagate changes to component instances automatically
Troubleshooting
WebSocket connection failed
WebSocket connection failed
- Ensure
bun socketis running - Check that port 3000 is not in use:
- Try restarting the WebSocket server
MCP not appearing in Cursor
MCP not appearing in Cursor
- Verify
~/.cursor/mcp.jsonis configured correctly - Restart Cursor after config changes
- Check Cursor’s MCP logs for errors
Figma plugin not connecting
Figma plugin not connecting
- Ensure WebSocket server is running first
- Check browser console for errors
- Verify the plugin is running (should show in Figma UI)
- Try closing and reopening the plugin
Commands not executing
Commands not executing
- Ensure layers are selected in Figma
- Check WebSocket server logs for errors
- Verify command syntax in MCP server logs
Contributing
Contributions welcome! Notable contributions:- @dusskapark: Bulk text replacement feature
- @dusskapark: Instance override propagation
View on GitHub
Star the repo and contribute your own features
Resources
Video Tutorial
Watch the quick video tutorial
Figma Community
Install the plugin from Figma Community
MCP Documentation
Learn more about Model Context Protocol