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:Installing Bun on Windows
For the WebSocket server to be accessible from Windows (where Figma runs), install Bun on Windows:Project Setup
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:Uncomment the hostname configuration
Find this section in the file (around line 43-44):Uncomment the This allows the server to accept connections from Windows (where Figma runs).
hostname line:Starting the WebSocket Server
MCP Server Configuration
For Cursor on Windows
If using Cursor on Windows:For Cursor/Claude Code in WSL
If running your AI agent inside WSL:Figma Plugin Setup
Install the Figma plugin
Follow the standard Figma Plugin Setup guide to install the plugin in Figma Desktop on Windows.
Connect to WebSocket
In the plugin UI, use:This works because the server is running on Windows with
hostname: "0.0.0.0".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
This is the most common issue. Verify that you’ve uncommented:in
src/socket.ts.Firewall blocking connection
Firewall blocking connection
Windows Firewall might block the connection. When you first run
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
Ensure you’re using
localhost or 127.0.0.1 in the Figma plugin, not WSL-specific IP addresses.Performance issues
Slow file access
Slow file access
When working with files in
/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
WSL 2 uses a virtualized network. If you experience 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
Check your WSL version:Convert to WSL 2 if needed:
Best Practices for Windows + WSL
Run server on Windows
For best performance, run the WebSocket server on Windows where Figma is running.
Use Windows filesystem
Store project files on Windows filesystem (
C:\) rather than WSL filesystem for better performance.Install Bun on both
Install Bun on both Windows and WSL for maximum flexibility.
Always set hostname
Remember to set
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
Next Steps
Cursor Setup
Complete Cursor IDE configuration
Figma Plugin
Install and configure the Figma plugin