CherryHQ/cherry-studio

[Discussion]: MCP server fails to resolve `npx` on Windows, while `npx.cmd` works

Open

#14966 opened on May 9, 2026

View on GitHub
 (0 comments) (1 reaction) (0 assignees)TypeScript (45,688 stars) (4,338 forks)batch import
MCPdiscussionhelp wanted

Description

Issue Checklist

  • I understand that issues are meant for feedback and problem-solving, not for venting, and I will provide as much detail as possible to help resolve the issue.
  • I have checked the pinned issues and searched through the existing open issues, closed issues, and discussions and did not find a similar suggestion.
  • I confirm that I am here to ask questions and discuss issues, not to report bugs or request features.

Platform

Windows

Version

1.9.4

Your Question

On Windows 11, creating or starting an MCP server with the command set to npx may fail with an error saying that npx is not found in PATH.

However, npx is actually installed and available from both Command Prompt and PowerShell. The MCP server starts correctly if the command is changed from npx to npx.cmd.

This seems to be a Windows command resolution issue when launching MCP servers.

Context

  • OS: Windows 11
  • Node.js: 24.15.0
  • npm/npx: installed and available in PATH
  • Shell tests pass in both Command Prompt and PowerShell

cmd:

C:\Users\xiaoy>node -v
v24.15.0

C:\Users\xiaoy>npx -v
11.12.1

C:\Users\xiaoy>where npx
D:\nodejs\npx
D:\nodejs\npx.cmd

pwsh:

Get-Command npx -All

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
ExternalScript  npx.ps1                                                       D:\nodejs\npx.ps1
Application     npx.cmd                                            0.0.0.0    D:\nodejs\npx.cmd
Application     npx                                                0.0.0.0    D:\nodejs\npx

So npx is clearly installed and available in PATH.

Steps to reproduce:

  1. Open the MCP server settings.
  2. Create a new MCP server.
  3. Set the command to: npx
  4. Set the arguments, for example:
    -y
    @notionhq/notion-mcp-server
    
  5. Try to start or save/test the MCP server.
  6. The server fails to start and shows an error saying npx is not found in PATH.

Why npx.cmd is not a sufficient workaround

In my case, MCP server settings are synced between my Windows PC and my Mac. Because of this, changing the command from npx to npx.cmd is not a practical solution.

While npx.cmd works on Windows, it does not exist on macOS. If I set the command to npx.cmd, the same synced MCP configuration will fail on my Mac.

Therefore, the expected behavior should be that command: "npx" works correctly across platforms, and the application should resolve it to the appropriate executable on each operating system.

Priority

Medium (Would like a response soon)

Contributor guide