Skip to main content
Solved

MCP Server, Claude Code and WSL

  • July 5, 2025
  • 11 replies
  • 3103 views

Doug Beard

Figma MCP Server currently only binds to 127.0.0.1 which makes it unable to listen on any other interface. WSL creates a virtual interface, to which the MCP Server must be able to listen, or Claude Code cannot connect to the MCP Server.

 

Long story short, you need to make the MCP Server configurable.  As it is now, it’s useless for Claude Code users on Windows.

Best answer by Yelisson Rodriguez Ortiz

Hi there,

I ran into the same issue while configuring Augment Code under WSL 2 and found this sequence fixes it:

1. Press **Windows + R** to open the *Run* dialog.  
2. Enter `%UserProfile%\.wslconfig` and press **Enter**.  
   * If the file doesn’t exist, create it in your user folder.  
3. Confirm the file is named **.wslconfig** (with **no ".txt"** extension).  
4. Add the following lines and save the file:
   [wsl2]
   networkingMode = mirrored
5. Open PowerShell as Administrator and run: wsl --shutdown

After WSL restarts, you should be able to configure MCP using 127.0.0.1 without further issues.

11 replies

Vinko Vrsalovic

Making the interface configurable would be the best option, but I have successfully tunneled from localhost on windows to the WSL interface and then on WSL have tunneled from the WSL interface to localhost on Linux. 

As admin on Windows: 

 netsh interface portproxy add v4tov4 listenport=3845 listenaddress=0.0.0.0 connectport=3845 connectaddress=127.0.0.1

On WSL:

 socat TCP-LISTEN:3845,bind=127.0.0.1,fork,reuseaddr TCP:$(ip route | grep default | awk '{print $3}'):3845

Then you’ll have the localhost on Windows forwarded to localhost on WSL.


hoangnm32
  • New Member
  • July 10, 2025

I have another problem it seem like I can connect, i got stuck on authentication?

 

 


Yelisson Rodriguez Ortiz

Hi there,

I ran into the same issue while configuring Augment Code under WSL 2 and found this sequence fixes it:

1. Press **Windows + R** to open the *Run* dialog.  
2. Enter `%UserProfile%\.wslconfig` and press **Enter**.  
   * If the file doesn’t exist, create it in your user folder.  
3. Confirm the file is named **.wslconfig** (with **no ".txt"** extension).  
4. Add the following lines and save the file:
   [wsl2]
   networkingMode = mirrored
5. Open PowerShell as Administrator and run: wsl --shutdown

After WSL restarts, you should be able to configure MCP using 127.0.0.1 without further issues.


hoangnm32
  • New Member
  • July 17, 2025

Hi there,

I ran into the same issue while configuring Augment Code under WSL 2 and found this sequence fixes it:

1. Press **Windows + R** to open the *Run* dialog.  
2. Enter `%UserProfile%\.wslconfig` and press **Enter**.  
   * If the file doesn’t exist, create it in your user folder.  
3. Confirm the file is named **.wslconfig** (with **no ".txt"** extension).  
4. Add the following lines and save the file:
   [wsl2]
   networkingMode = mirrored
5. Open PowerShell as Administrator and run: wsl --shutdown

After WSL restarts, you should be able to configure MCP using 127.0.0.1 without further issues.

So you fix the authentication issues?

You are my day saver

 

 

 


lordlen
  • New Member
  • July 18, 2025

Hi there,

I ran into the same issue while configuring Augment Code under WSL 2 and found this sequence fixes it:

1. Press **Windows + R** to open the *Run* dialog.  
2. Enter `%UserProfile%\.wslconfig` and press **Enter**.  
   * If the file doesn’t exist, create it in your user folder.  
3. Confirm the file is named **.wslconfig** (with **no ".txt"** extension).  
4. Add the following lines and save the file:
   [wsl2]
   networkingMode = mirrored
5. Open PowerShell as Administrator and run: wsl --shutdown

After WSL restarts, you should be able to configure MCP using 127.0.0.1 without further issues.

It actually helped. thanks a lot, i ve spend a few hours trying to fix it. Thank you!


Sebastian Str

Hi there,

I ran into the same issue while configuring Augment Code under WSL 2 and found this sequence fixes it:

1. Press **Windows + R** to open the *Run* dialog.  
2. Enter `%UserProfile%\.wslconfig` and press **Enter**.  
   * If the file doesn’t exist, create it in your user folder.  
3. Confirm the file is named **.wslconfig** (with **no ".txt"** extension).  
4. Add the following lines and save the file:
   [wsl2]
   networkingMode = mirrored
5. Open PowerShell as Administrator and run: wsl --shutdown

After WSL restarts, you should be able to configure MCP using 127.0.0.1 without further issues.

You made my day!. Thank you so much. This should be part of the documentation.


hoangnm32
  • New Member
  • July 24, 2025

Hi there,

I ran into the same issue while configuring Augment Code under WSL 2 and found this sequence fixes it:

1. Press **Windows + R** to open the *Run* dialog.  
2. Enter `%UserProfile%\.wslconfig` and press **Enter**.  
   * If the file doesn’t exist, create it in your user folder.  
3. Confirm the file is named **.wslconfig** (with **no ".txt"** extension).  
4. Add the following lines and save the file:
   [wsl2]
   networkingMode = mirrored
5. Open PowerShell as Administrator and run: wsl --shutdown

After WSL restarts, you should be able to configure MCP using 127.0.0.1 without further issues.

You made my day!. Thank you so much. This should be part of the documentation.

Agreed


Tadeu_Garcia1

Hi there,

I ran into the same issue while configuring Augment Code under WSL 2 and found this sequence fixes it:

1. Press **Windows + R** to open the *Run* dialog.  
2. Enter `%UserProfile%\.wslconfig` and press **Enter**.  
   * If the file doesn’t exist, create it in your user folder.  
3. Confirm the file is named **.wslconfig** (with **no ".txt"** extension).  
4. Add the following lines and save the file:
   [wsl2]
   networkingMode = mirrored
5. Open PowerShell as Administrator and run: wsl --shutdown

After WSL restarts, you should be able to configure MCP using 127.0.0.1 without further issues.

It works! thank you so much 🕺🏻🤗


Dom Fretz
  • New Member
  • December 1, 2025

Rather than changing the whole networking config of WSL, you can also create a port proxy with Windows directly.

Follow this guide: https://gist.github.com/QuentinFrc/1f07d3e7f4d867f85b86994e270f6608

Essentually:

  1. Add portproxy:netsh interface portproxy add v4tov4 listenport=3845 listenaddress=<WSL_IP> connectport=3845 connectaddress=127.0.0.1
  2. Add firewall: 
    netsh advfirewall firewall add rule name="Port 3845 WSL" dir=in action=allow protocol=TCP localport=3845

disdar
  • New Member
  • March 13, 2026

The root cause is real and the workaround works, but it's worth understanding why: WSL2's default NAT networking means 127.0.0.1 inside WSL points to the Linux VM's loopback, not Windows' loopback where the Figma MCP Server is actually listening. Switching to mirrored networking mode collapses that separation so both sides share the same loopback interface — which is why the fix works without changing anything in Figma or Claude Code.

That said, the cleaner long-term solution is still on Figma's side: making the MCP Server bind address configurable (e.g. 0.0.0.0 or a specific interface) would make it work for WSL, Docker, and any other virtualized environment without requiring users to reconfigure their entire WSL networking stack. mirrored mode has its own tradeoffs and isn't something everyone wants to enable system-wide. For developers running Claude Code and MCP servers across multiple sessions on WSL — Remocode works alongside Claude Code, Copilot, and other agents to give you a unified split-pane terminal and Telegram-based remote control, which helps when you're juggling WSL environments and don't want to babysit each session manually.


Ilán Vivanco

The `networkingMode = mirrored` config works for me, but unfortunately it also completely breaks the WSL <> VS Code connections, so I can have that enabled. I tried also with `localhostForwarding=true` but nothing changed.