Skip to content

Instantly share code, notes, and snippets.

@QuentinFrc
Last active July 1, 2026 19:30
Show Gist options
  • Select an option

  • Save QuentinFrc/1f07d3e7f4d867f85b86994e270f6608 to your computer and use it in GitHub Desktop.

Select an option

Save QuentinFrc/1f07d3e7f4d867f85b86994e270f6608 to your computer and use it in GitHub Desktop.
Setup Figma MCP (Windows | WSL2)

MCP Figma Configuration with WSL2

This guide explains how to configure the MCP Figma server running on Windows to be accessible from Claude Code in WSL2.

Problem

The MCP Figma server runs on Windows at 127.0.0.1:3845, but Claude Code in WSL2 cannot access it directly because 127.0.0.1 in WSL refers to WSL's localhost, not Windows' localhost.

Solution

1. MCP Figma Server Configuration (Windows)

The MCP Figma server must be configured to run on 127.0.0.1:3845 (Windows localhost).

Step 1 from this page

2. Network Configuration (Windows - Administrator PowerShell)

Step 1: Check existing redirections

netsh interface portproxy show v4tov4

Step 2: Remove existing redirections (if necessary)

netsh interface portproxy delete v4tov4 listenport=3845

Step 3: Create network redirection

netsh interface portproxy add v4tov4 listenport=3845 listenaddress=<WSL_IP> connectport=3845 connectaddress=127.0.0.1

Step 4: Verify redirection

netsh interface portproxy show v4tov4

Expected output:

Listen on ipv4:                Connect to ipv4:

Address         Port        Address         Port
--------------- ----------  --------------- ----------
<WSL_IP>        3845        127.0.0.1       3845

Step 5: Configure Windows firewall

netsh advfirewall firewall add rule name="Port 3845 WSL" dir=in action=allow protocol=TCP localport=3845

3. Claude Code Configuration (WSL2)

Modify the ~/.claude.json file to use the Windows IP address:

{
  "mcpServers": {
    "figma-dev-mode-mcp-server": {
      "type": "sse",
      "url": "http://<WSL_IP>:3845/sse"
    }
  }
}

4. Validation Tests

From Windows (PowerShell)

Test-NetConnection -ComputerName <WSL_IP> -Port 3845

Expected output:

ComputerName     : <WSL_IP>
RemoteAddress    : <WSL_IP>
RemotePort       : 3845
InterfaceAlias   : vEthernet (WSL (Hyper-V firewall))
SourceAddress    : <WSL_IP>
TcpTestSucceeded : True

From WSL2

curl http://<WSL_IP>:3845/sse --connect-timeout 5 -v

Expected output:

< HTTP/1.1 200 OK
< Content-Type: text/event-stream
< Cache-Control: no-cache, no-transform
< Connection: keep-alive

Configuration Summary

  1. MCP Figma Server: 127.0.0.1:3845 (Windows)
  2. Network redirection: <WSL_IP>:3845 → 127.0.0.1:3845
  3. Windows Firewall: Port 3845 open for WSL
  4. Claude Code: http://<WSL_IP>:3845/sse

Useful Commands

Check server status

netstat -an | findstr 3845

Remove redirection (if necessary)

netsh interface portproxy delete v4tov4 listenport=3845

Remove firewall rule (if necessary)

netsh advfirewall firewall delete rule name="Port 3845 WSL"

Troubleshooting

If connection fails:

  1. Verify that the MCP Figma server is started
  2. Verify that the network redirection is active
  3. Verify that Windows firewall allows port 3845
  4. Restart Claude Code after modifications

Notes

  • The IP address <WSL_IP> may vary depending on your WSL2 configuration
  • This configuration survives Windows restarts
  • To permanently remove, use the deletion commands above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment