Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ protected McpClientTransport createMcpTransport() {
ServerParameters stdioParams = ServerParameters.builder("npx")
.args("-y", "@modelcontextprotocol/server-everything", "dir")
.build();
return new StdioClientTransport(stdioParams);
ServerParameters windowsStdioParams = ServerParameters.builder("cmd.exe")
.args("/c", "npx.cmd", "-y", "@modelcontextprotocol/server-everything", "dir")
.build();
boolean isWindows = System.getProperty("os.name").toLowerCase().contains("win");
return new StdioClientTransport(isWindows ? windowsStdioParams : stdioParams);
}

protected Duration getInitializationTimeout() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ protected McpClientTransport createMcpTransport() {
ServerParameters stdioParams = ServerParameters.builder("npx")
.args("-y", "@modelcontextprotocol/server-everything", "dir")
.build();

return new StdioClientTransport(stdioParams);
ServerParameters windowsStdioParams = ServerParameters.builder("cmd.exe")
.args("/c", "npx.cmd", "-y", "@modelcontextprotocol/server-everything", "dir")
.build();
boolean isWindows = System.getProperty("os.name").toLowerCase().contains("win");
return new StdioClientTransport(isWindows ? windowsStdioParams : stdioParams);
}

@Test
Expand Down