[BUG] Unhandled mcp initialization error prevents PATH initialization
- Dominant language
- TypeScript
- Stars
- 102
- Forks
- 25
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 22
Description
Error in main.ts when mcp can't initialize causes createWindow function to abort and PATH isn't properly initialized
aks-mcp binary is present in the external-tools location
```
ls .\headlamp\app\resources\external-tools\bin\
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 31/08/2026 14:19 72663040 aks-mcp.exe
-a--- 01/06/2026 12:07 5915 az-kubelogin.py
```
```
[APP] MCPClient: initializeClient: { isInitialized: false, initializationPromise: null }
[APP] MCPClient: initializeClient: Starting doInitialize()...
[APP] Expanded args for aks-mcp: [
[APP] '--transport',
[APP] 'stdio',
[APP] '--access-level',
[APP] 'readonly',
[APP] '--enabled-components',
[APP] 'az_cli,monitor,fleet,network,compute,detectors,advisor,inspektorgadget'
[APP] ]
[APP] MCPClient: doInitialize: Initializing MCP client with servers: [ 'aks-mcp' ]
[APP] 'aks-mcp' is not recognized as an internal or external command,
[APP] operable program or batch file.
[APP] Failed to initialize MCP client: MCPClientError: Failed to connect to stdio server "aks-mcp": McpError: MCP error -32000: Connection closed
[APP] at MultiServerMCPClient._initializeStdioConnection (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:90382:17)
[APP] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[APP] at async MultiServerMCPClient.initializeConnections (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:90306:11)
[APP] at async MultiServerMCPClient.getTools (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:90330:11)
[APP] at async MCPClient.doInitializeClient (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:91302:30)
[APP] at async MCPClient.initialize (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:91240:9)
[APP] at async createWindow (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:106610:7)
[APP] at async Promise.all (index 1)
[APP] at async App. (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:106652:5) {
[APP] serverName: 'aks-mcp'
[APP] }
[APP] (node:29116) UnhandledPromiseRejectionWarning: MCPClientError: Failed to connect to stdio server "aks-mcp": McpError: MCP error -32000: Connection closed
[APP] at MultiServerMCPClient._initializeStdioConnection (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:90382:17)
[APP] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[APP] at async MultiServerMCPClient.initializeConnections (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:90306:11)
[APP] at async MultiServerMCPClient.getTools (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:90330:11)
[APP] at async MCPClient.doInitializeClient (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:91302:30)
[APP] at async MCPClient.initialize (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:91240:9)
[APP] at async createWindow (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:106610:7)
[APP] at async Promise.all (index 1)
[APP] at async App. (C:\Users\oldubenko\aks-desktop\headlamp\app\build\main.js:106652:5)
[APP] (Use `electron --trace-warnings ...` to show where the warning was created)
```
## Steps to Reproduce
1. run `npm run plugins:setup` to make sure aks-mcp binary is present
2. run `npm run dev` in root
on windows
Contributor guide
Assessment
This issue has not been assessed yet.