Skip to main content
Solved

MCP Server, Claude Code and WSL


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.

View original

7 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
  • 3 replies
  • 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
  • 3 replies
  • July 17, 2025
Yelisson Rodriguez Ortiz wrote:

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
  • 1 reply
  • July 18, 2025
Yelisson Rodriguez Ortiz wrote:

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
Yelisson Rodriguez Ortiz wrote:

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
  • 3 replies
  • July 24, 2025
Sebastian Str wrote:
Yelisson Rodriguez Ortiz wrote:

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings