Skip to content

Commit a6cc0d4

Browse files
committed
Fix README WSL guidance to prevent ENOENT errors
- Replace ambiguous WSL note with clear guidance for two scenarios: * Windows host VS Code: Use "command": "wsl" * Remote-WSL (VS Code inside WSL): Use direct binary or bash wrapper - Add troubleshooting section for ENOENT errors - Prevent confusion that leads to spawn failures in Remote-WSL Fixes #190
1 parent 06ff670 commit a6cc0d4

File tree

1 file changed

+41
-9
lines changed

1 file changed

+41
-9
lines changed

README.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -309,20 +309,52 @@ Once started, the MCP server will appear in the **Copilot Chat: Configure Tools*
309309

310310
Try a prompt like *"List all my AKS clusters"*, which will start using tools from the AKS-MCP server.
311311

312-
Note:
313-
For VS Code that is runing inside of WSL environment, starting AKS MCP server could fail with error "Connection state: Error spawn /home/path/.vs-kubernetes/tools/aks-mcp/v0.0.3/aks-mcp ENOENT", it means VS code cannot find this file. The resolution is modifying the mcp.json file as following to make it running with wsl.
312+
#### WSL Configuration
313+
314+
The MCP configuration differs depending on whether VS Code is running on Windows or inside WSL:
315+
316+
**🪟 Windows Host (VS Code on Windows)**: Use `"command": "wsl"` to invoke the WSL binary from Windows:
314317

315318
```json
316-
"AKS MCP": {
317-
"command": "wsl",
318-
"args": [
319-
"<aks-mcp path>",
320-
"--transport",
321-
"stdio"
322-
]
319+
{
320+
"servers": {
321+
"aks-mcp": {
322+
"type": "stdio",
323+
"command": "wsl",
324+
"args": [
325+
"--",
326+
"/home/you/.vs-kubernetes/tools/aks-mcp/aks-mcp",
327+
"--transport",
328+
"stdio"
329+
]
330+
}
331+
}
323332
}
324333
```
325334

335+
**🐧 Remote-WSL (VS Code running inside WSL)**: Call the binary directly or use a shell wrapper:
336+
337+
```json
338+
{
339+
"servers": {
340+
"aks-mcp": {
341+
"type": "stdio",
342+
"command": "bash",
343+
"args": [
344+
"-c",
345+
"/home/you/.vs-kubernetes/tools/aks-mcp/aks-mcp --transport stdio"
346+
]
347+
}
348+
}
349+
}
350+
```
351+
352+
**🔧 Troubleshooting ENOENT Errors**
353+
354+
If you see "spawn ENOENT" errors, verify your VS Code environment:
355+
- **Windows host**: Check if the WSL binary path is correct and accessible via `wsl -- ls /path/to/aks-mcp`
356+
- **Remote-WSL**: Do NOT use `"command": "wsl"` - use direct paths or bash wrapper as shown above
357+
326358

327359
> **💡 Benefits**: The AKS extension handles binary downloads, updates, and configuration automatically, ensuring you always have the latest version with optimal settings.
328360

0 commit comments

Comments
 (0)