On Windows, the IDE now forwards two loopback ports into each WSL2 distro that hosts an open project:
- the MCP SSE server port;
- the built-in HTTP server port.
An MCP client inside the distro, for example Claude Code, reaches the IDE on 127.0.0.1 in the distro. The
IDE keeps its own servers on Windows 127.0.0.1. It adds no Windows-side listener, so a firewall rule is not
necessary.
The flag
The registry key ide.mcp.wsl.forward.enabled controls the feature. It is on by default. Set the key to
false to switch the feature off. A change of the key needs an IDE restart.
The feature is a no-op on every OS except Windows, and it skips a WSL1 distro.
What a user must know
- The forwarder starts only while at least one open project lives on the distro. It stops when the last such project closes. An installed distro that has no open project stays untouched, and the IDE does not start it.
- All running WSL2 distros share one network namespace. A port that the forwarder binds in one distro is reachable from every other running distro. Use the feature only with distros that you trust.
- A VPN client or a third-party firewall that takes over the Hyper-V routing can break the WSL network. The forwarder then fails to reach the distro.
Known limitations
- Mirrored networking mode does not yet switch the feature off. The forwarder binds a port that nothing uses.
- If the preferred port is busy, the forwarder binds an ephemeral port. No discovery artifact holds that port number yet, so a client must be configured by hand.
- A path in an MCP tool call is not translated between the Windows form and the distro form.
Comments
0 comments
Please sign in to leave a comment.