Skip to content

fix: use cmd for windows MCP connections #5631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 12, 2025
Merged

fix: use cmd for windows MCP connections #5631

merged 5 commits into from
May 12, 2025

Conversation

Patrick-Erichsen
Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen commented May 12, 2025

Description

Resolves #4913 #4874 #4791

When connecting to an MCP server via StdioClientTransport on Windows, we need to execute commands such as npx and uvx through the cmd.exe interpreter.

Testing instructions

  • Use an MCP server on Windows and confirm you're able to connect, eg
mcpServers:
  - uses: anthropic/memory-mcp

Summary by mrge

Fixed MCP server connections on Windows by running batch commands like npx and uvx through cmd.exe to ensure proper execution.

@Patrick-Erichsen Patrick-Erichsen requested a review from a team as a code owner May 12, 2025 16:40
@Patrick-Erichsen Patrick-Erichsen requested review from sestinj and removed request for a team May 12, 2025 16:40
Copy link

netlify bot commented May 12, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 30cd65a
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/682231339d92fe0008447935

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 12, 2025
@RomneyDa
Copy link
Collaborator

Could add
pnpx
dlx
nx
bunx
docker

docker one not sure if needed might be worth an extra peek. Half of our featured MCP servers are docker command

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful

@@ -232,14 +280,14 @@ class MCPConnection {
]);
} catch (error) {
// Otherwise it's a connection error
let errorMessage = `Failed to connect to MCP server ${this.options.name}`;
let errorMessage = `Failed to connect to "${this.options.name}"\n`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick - new line should be at beginning of additions, not here

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 12, 2025
@RomneyDa RomneyDa merged commit 1202c0a into main May 12, 2025
34 checks passed
@RomneyDa RomneyDa deleted the pe/windows-mcp-fix branch May 12, 2025 18:07
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Failed to connect to MCP server Jetbrains MCP Proxycommand "npx" not found
2 participants