MCP Server - cannot run NPX

I cannot run MCP Servers in AI Assistant. 
For example, this server:

{
  "mcpServers": {
    "jetbrains": {
      "command": "npx",
      "args": [
        "-y",
        "@jetbrains/mcp-proxy"
      ]
    }
  }
}


I receive an error:

Cannot run program "C:\Program Files\nodejs\npx": CreateProcess error=193, %1 is not a valid Win32 application

WebStorm: 2025.1.1, Build #WS-251.25410.117, built on May 7, 2025
AI Assistant, tested 2 versions: 251.26094.80.11, 251.23774.42.28.7.1
Nodejs: 20.17
Windows: 11 Pro

0
5 comments

Running it with “npx.cmd” solved an issue.

1

I too solved it by specifying “npx.cmd” but also ensured my PATH environment variable for node was pointing correctly:

 

 

 

2

I solved it with npx.cmd too, but why is this even necessary? In every other agent (Gemini CLI, GitHub Copilot, etc.), this works with just specifying npx

0

Please sign in to leave a comment.