Skip to content

Instantly share code, notes, and snippets.

@dusskapark
Last active June 3, 2025 04:06
Show Gist options
  • Save dusskapark/c50b2942ee08944d310940f618c20c7f to your computer and use it in GitHub Desktop.
Save dusskapark/c50b2942ee08944d310940f618c20c7f to your computer and use it in GitHub Desktop.
Cursor Talk to Figma MCP Setup Guide for AI Agents.

Cursor Talk to Figma MCP Setup Guide for AI Agents

🎯 Objective

Install and configure Cursor-Figma MCP integration with fail-safe checkpoints at each step.

πŸ“‹ Prerequisites Check

Execute these commands and verify all pass before proceeding:

# Check 1: Cursor IDE installed
which cursor && echo "βœ… Cursor found" || echo "❌ ERROR: Install Cursor IDE first"

# Check 2: Git available  
git --version && echo "βœ… Git found" || echo "❌ ERROR: Git not available"

# Check 3: macOS verification
sw_vers -productVersion && echo "βœ… macOS confirmed" || echo "❌ ERROR: macOS required"

CHECKPOINT: All three checks must show βœ… before proceeding.


πŸš€ Installation Steps

Step 1: Install Bun Runtime

# Install Bun
curl -fsSL https://bun.sh/install | bash

# Reload shell environment
source ~/.zshrc 2>/dev/null || source ~/.bashrc 2>/dev/null || true

# Verify installation
bun --version && echo "βœ… Bun installed successfully" || echo "❌ ERROR: Bun installation failed"

CHECKPOINT: Must see Bun version number. If failed, stop here and troubleshoot.

Step 2: Clone and Setup Project

# Navigate to Sites directory (create if doesn't exist)
mkdir -p ~/Sites && cd ~/Sites

# Clone repository
git clone https://github.com/sonnylazuardi/cursor-talk-to-figma-mcp.git

# Enter project directory
cd cursor-talk-to-figma-mcp

# Verify project structure
ls package.json src && echo "βœ… Project structure valid" || echo "❌ ERROR: Invalid project structure"

CHECKPOINT: Must see βœ… Project structure valid. Current directory must be cursor-talk-to-figma-mcp.

Step 3: Build and Configure

# Install dependencies
bun install && echo "βœ… Dependencies installed" || echo "❌ ERROR: Dependency installation failed"

# Build project
bun run build && echo "βœ… Build successful" || echo "❌ ERROR: Build failed"

# Verify build output
test -f dist/server.js && echo "βœ… Server built" || echo "❌ ERROR: Server build missing"

# Setup MCP configuration
bun setup && echo "βœ… MCP setup complete" || echo "❌ ERROR: MCP setup failed"

# Verify MCP config
test -f .cursor/mcp.json && echo "βœ… MCP config created" || echo "❌ ERROR: MCP config missing"

CHECKPOINT: All four steps must show βœ…. The file .cursor/mcp.json must exist in current directory.

Step 4: Launch Cursor with MCP

🚨 CRITICAL: Cursor must be launched from the project directory to load MCP configuration.

# Verify current directory is correct
pwd | grep "cursor-talk-to-figma-mcp" && echo "βœ… Correct directory" || echo "❌ ERROR: Wrong directory"

# Launch Cursor from project directory
cursor .

# Wait for initialization
sleep 15

CHECKPOINT: Cursor should open with the project loaded. Verify in Cursor:

  1. Open Settings (Cmd+,)
  2. Search "MCP"
  3. Confirm "TalkToFigma" shows as "Connected"

Step 5: Start WebSocket Server

πŸ”„ NEW TERMINAL REQUIRED: Open a completely new terminal window and run:

# Navigate to project directory
cd ~/Sites/cursor-talk-to-figma-mcp

# Start WebSocket server (keep this running)
bun socket

CHECKPOINT: Server should start and show "WebSocket server running on port 3001" or similar message. Keep this terminal open and running.


🎯 Final Setup (Quick Guide)

Step 6: Install Figma Plugin

Choose ONE method and install:

Step 7: Test Everything Works

In Cursor (where MCP is connected):

  1. Test MCP: join_channel β†’ Should see "Successfully joined channel"
  2. Test Figma: get_document_info β†’ Should see JSON data from Figma

βœ… If both commands work, setup is complete!


⚠️ Troubleshooting

Issue: MCP Not Connected

# Check directory
pwd | grep "cursor-talk-to-figma-mcp" || echo "Navigate to project directory first"

# Restart Cursor from project directory  
cd ~/Sites/cursor-talk-to-figma-mcp && cursor .

Issue: WebSocket Connection Failed

# Check if server is running
lsof -i :3001 || echo "Start WebSocket server: bun socket"

# Restart server
cd ~/Sites/cursor-talk-to-figma-mcp && bun socket

Issue: Figma Plugin Not Working

  • Ensure plugin is activated in Figma
  • Check WebSocket server is running
  • Restart Figma if needed

βœ… Success Verification

Installation is complete when ALL of the following are true:

  1. pwd shows you're in cursor-talk-to-figma-mcp directory
  2. test -f .cursor/mcp.json returns success
  3. Cursor Settings shows "TalkToFigma" as "Connected"
  4. join_channel command works in Cursor
  5. get_document_info returns Figma data
  6. WebSocket server shows active connections

If any verification fails, repeat the corresponding step above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment