Skip to content

Commit 353d7ad

Browse files
author
Charlie Tonneslan
committed
fix: always set windowsHide on Windows for stdio transport
Set windowsHide to true for all Windows apps, not just Electron. Non-Electron apps (e.g., VS Code extensions, CLI tools) also show an empty cmd.exe console window when spawning MCP servers via stdio. Remove the now-unused isElectron() helper. Fixes #1638
1 parent ccb78f2 commit 353d7ad

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

packages/client/src/client/stdio.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class StdioClientTransport implements Transport {
126126
},
127127
stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],
128128
shell: false,
129-
windowsHide: process.platform === 'win32' && isElectron(),
129+
windowsHide: process.platform === 'win32',
130130
cwd: this._serverParams.cwd
131131
});
132132

@@ -258,7 +258,3 @@ export class StdioClientTransport implements Transport {
258258
});
259259
}
260260
}
261-
262-
function isElectron() {
263-
return 'type' in process;
264-
}

0 commit comments

Comments
 (0)