Skip to content

Uncaught Exception 'spawn npx ENOENT' when initializing npx MCP servers #336

@mattiacurri

Description

@mattiacurri

Expected Behavior

It should install the MCP servers and then continue to function normally.

Actual Behavior

After installing an mcp server, like:

command-code mcp add context7 -- npx -y @upstash/context7-mcp

at every restart of command-code we have a critical uncaught expection

Image

Command Code Version

0.25.7

Operating System

Windows

Terminal/IDE

No response

Shell

Powershell

Additional context

I hypothesize that this issue arises because Windows' cmd command launches a terminal instance instead of directly processing the command.

Using cmd mcp add context7 -- npx -y @upstash/context7-mcp on WSL does not lead to this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions