Prerequisites
Before you begin, ensure you have:- Windows 10 version 2004 or higher, or Windows 11
- WSL 2 installed and configured
- A Linux distribution installed (Ubuntu recommended)
- Figma Desktop running on Windows (not in WSL)
WSL Installation
If you haven’t installed WSL yet:Enable WSL
Restart your computer
Set up your Linux user
Installing Bun on Windows
For the WebSocket server to be accessible from Windows (where Figma runs), install Bun on Windows:Open PowerShell
Install Bun
Verify installation
Project Setup
Clone the repository in Windows
Install dependencies
Run the setup script
Critical: Configure WebSocket Server for WSL
The most important step for Windows + WSL setup is configuring the WebSocket server to listen on all network interfaces:Open the socket configuration file
src/socket.ts in your preferred editor.Uncomment the hostname configuration
hostname line:Save the file
src/socket.ts.Starting the WebSocket Server
Start the server
Verify accessibility
ws://localhost:3055 from both Windows and WSL.MCP Server Configuration
For Cursor on Windows
If using Cursor on Windows:Locate or create MCP config
Add the configuration
Restart Cursor
For Cursor/Claude Code in WSL
If running your AI agent inside WSL:Install Bun in WSL
Run setup in WSL
Configure MCP
.mcp.json in your WSL home directory or project root:Figma Plugin Setup
Install the Figma plugin
Connect to WebSocket
hostname: "0.0.0.0".Join a channel
Network Architecture
Understanding the network flow in Windows + WSL:- Figma runs on Windows host
- WebSocket server runs on Windows with
0.0.0.0binding - MCP server can run on either Windows or WSL
- AI agent (Cursor/Claude) can run on either Windows or WSL
Troubleshooting
Connection refused errors
Hostname not set to 0.0.0.0
Hostname not set to 0.0.0.0
src/socket.ts.Firewall blocking connection
Firewall blocking connection
bun socket, Windows may prompt you to allow network access. Click “Allow”.If you missed the prompt:- Open Windows Defender Firewall
- Click “Allow an app or feature through Windows Defender Firewall”
- Find “bun” and ensure both Private and Public networks are checked
Wrong network interface
Wrong network interface
localhost or 127.0.0.1 in the Figma plugin, not WSL-specific IP addresses.Performance issues
Slow file access
Slow file access
/mnt/c/, WSL can be slow. Consider:- Cloning the repo in WSL’s native filesystem (
~/projects/) - Running the WebSocket server on Windows instead
Network latency
Network latency
- Run the WebSocket server on Windows
- Keep the project files on the Windows filesystem
WSL version issues
Using WSL 1 instead of WSL 2
Using WSL 1 instead of WSL 2
Best Practices for Windows + WSL
Run server on Windows
Use Windows filesystem
C:\) rather than WSL filesystem for better performance.Install Bun on both
Always set hostname
hostname: "0.0.0.0" in the WebSocket server configuration.Recommended Setup
For optimal performance on Windows + WSL:- Project location: Windows filesystem (
C:\Users\YourName\projects\talk-to-figma-mcp) - Bun installation: Windows (for running the server)
- WebSocket server: Run on Windows with
hostname: "0.0.0.0" - MCP server: Can run on either Windows or WSL
- AI agent: Use Cursor on Windows for best performance