continue
continue copied to clipboard
NPX not available to start MCP server, but available in VSCode Terminal
Before submitting your bug report
- [x] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 11
- Continue version: pre-release
- IDE version: 1.98.2
- Model: not relevant
- config:
OR link to assistant in Continue hub:
Description
The image below shows the issue the best.
npx is available in the system and in the terminal in VSCode, but the continue.dev can't see it to run npx for the brave search MPC.
To reproduce
No response
Log output
me too
I've tried to adjust the command to point to the actual path, but I still cannot run with npx.
Same problem for me, plese help
I found a workaround to this. Go to your assistant definition on the web and define the MCP server manually, ensuring you run it with cmd instead of powershell, as such:
mcpServers:
- name: Memory MCP
command: cmd.exe
args:
- /c
- npx
- -y
- "@modelcontextprotocol/server-memory"
I used this after npx cli not found error
Vscode continue config
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/postgres",
"postgresql://postgres:[email protected]:54322/postgres"]
}
}
]
},
Same problem here.
Hi all, apologies for the delay here, we'll be digging into this shortly.
In the meantime, the solution from @ozshen in this post worked:
mcpServers:
- name: Server Memory
- command: npx
+ command: "cmd"
args:
+ - /c
+ - npx
- "-y"
- "@modelcontextprotocol/server-memory"
Hi all, apologies for the delay here, we'll be digging into this shortly.
In the meantime, the solution from @ozshen in this post worked:
mcpServers:
- name: Server Memory
- command: npx
- command: "cmd" args:
- /c- npx - "-y" - "@modelcontextprotocol/server-memory"
On Mac/Linux, this unfortunately does not work (as obviously cmd.exe is not available). Also with something like sh for the command with -c as the argument does not work (for me at least)
I have a similar problem on linux. MCP servers suing npx or docker showing this:
Note that the same MCP servers work with copilot (on vscode)
This is the config:
"experimental": {
"modelContextProtocolServers": [
{
"name": "github",
"transport": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "XXX"
}
}
},
{
"name": "kubernetes",
"transport": {
"type": "stdio",
"name": "kubernetes",
"command": "npx",
"args": ["-y", "kubernetes-mcp-server@latest"]
}
}
]
},
The issue is resolved in the pre-release version
This is NOT solved for macOS! I still have the problem!
@IngLP same issue on latest release? I believe this was just an issue for JetBrains + macOS but lmk if you're having issues
Yes, same issue. Now the error is Failed to connect to "Memory" Error: MCP error -32000: Connection closed Process output: STDERR: env: node: No such file or directory
Same Here with docker
2025-06-14 17:17:35.186 [info] Starting server from Remote extension host 2025-06-14 17:17:35.197 [info] Connection state: Starting 2025-06-14 17:17:35.198 [info] Connection state: Error spawn docker ENOENT
I just started encountering this original issue on Linux after switching my primary shell from zsh to fish. My terminal, including the one inside VSCode and RustRover, can detect npx at /usr/bin/npx, but Continue is giving the "npx not found" error in both IDEs.
I have tried running it as an installed package using cmd, moving to different node, npm and npx version and had no luck. Reading above docker-ising doesn't work. Anyone found a work around? Anyone has an update? MCP seems to be more and more important but I really dont want to move from Continue
@GoffAC are you on latest release? I thought that this had been fixed with #6157 but if you're still having the issue would be curious to know the following:
- Continue version
- OS
- Shell
- IDE (VS Code or JetBrains)
hey so I am using Continue on Agent mode with all the configuration wrote above here and no luck. let's assume some configuration will work, how do i use it? just type a prompt and it should work? i am confused. ty
I find the way to fix this question in Mac, you can screenshot the question to AI, such as vscode plugins---augment, it help me check and give me answer:
It found, when use '' which node", it can't find "node", because I use "nvm".
It ask me, change "command" to :
/bin/zsh -c "source ~/.nvm/nvm.sh && npx -y @upstash/context7-mcp@latest"
or
/Users/mac/.nvm/versions/node/v23.9.0/bin/npx -y @upstash/context7-mcp@latest
Then it works!
found a "MAYBE" workaround way.
{
"servers": {
"Framelink Figma MCP": {
"command": "npx",
"args": ["-y", " figma-developer-mcp", "--figma-api-key=xxx", "--stdio"],
}
}
}
Problem When configuring the Framelink Figma MCP server, using "command": "npx" results in “npx not found.” If you specify the full path to npx, it then complains that node is not found. This makes it a dead end on some setups (e.g., when using nvm or non-global Node.js installs).
Workaround Instead of calling npx directly, use a shell script that sets up the correct Node.js environment and then runs the command. Update your server config
{
"servers": {
"Framelink Figma MCP": {
"command": "sh",
"args": ["<path-to-your>/.vscode/figmaMcp.sh"],
}
}
}
# Add nvm Node.js bin to $PATH
NODE_PATH=<your-nvm-path>/.nvm/versions/node/v20.14.0/bin
export PATH="$NODE_PATH:$PATH"
node -v
npx -y figma-developer-mcp --figma-api-key=xxxx --stdio
Thank you @kpchen104 it worked on MacOS 🥳
I had the same issue on linux using vscodium-wayland.
The issue appeared to be privilege related. I noticed I was able to set the command to bash or zsh and have it run npx via its absolute path (pulled from which npx) (other attempts to run npx directly or via other commands would resolve to command not found)
Part of the output when trying to run npx via bash/zsh appeared to be privilege related so I ran vscodium as root (which is not recommended) with vscodium --no-sandox --user-data-dir
After running as root I was able to use other commands again like npx and setup the MCP. I didn't have to play around with proxy-ing npx through bash or zsh, etc.
For additional context: I setup the MCP in the config.yaml file
running into this same issue i with rider 2025.2.2.1 plugin 1.0.46 - i am not sure from this thread if this issue is resolved or what the actual work around is ( dopey me )
@dosubot you are either missing labels for macOS and Linux or should remove specific one for Windows. @eranco74 issue is currently resolved only for Windows.
Hi @jagomf! I'm Dosu and I’m helping the continue team.
You're right—the issue is currently resolved only for Windows, while macOS and Linux are still affected. The labels should reflect this so users on all platforms are aware of the current status. Thanks for pointing out the need to update or correct the platform labels.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Hey everyone! After analyzing this issue, I've identified a clear solution that would help all the users experiencing this problem across Windows, macOS, and Linux.
The Problem
The root cause is that Continue's child processes don't inherit the full PATH environment that includes Node.js binaries - especially when using version managers like nvm, fnm, or volta. This is why npx works in your terminal but not in Continue.
The Solution Path
We need to enhance PATH discovery in 3 focused areas:
-
core/util/shellPath.ts- EnhancegetEnvPathFromUserShell()to:- Add Windows support (currently returns undefined on Windows!)
- Search common Node.js installation directories
- Support fish shell and other shells beyond bash/zsh
- Auto-detect nvm, fnm, volta, asdf installations
-
core/util/commandUtils.ts(new file) - Add utilities to:- Find commands using
which/where - Check common installation paths as fallback
- Resolve Windows batch files (.cmd/.bat)
- Find commands using
-
core/context/mcp/MCPConnection.ts- Minor update to:- Use the enhanced PATH from step 1
- Apply command resolution from step 2
Good First Contribution
- Clear scope: The changes are isolated to specific files
- Testable: Each component can be unit tested independently
- High impact: Fixes a critical issue affecting many users
- Learning opportunity: Great way to understand how Continue handles system integration
Implementation Notes
The core logic is adding path detection for common Node.js locations:
- Windows:
%APPDATA%\npm,%ProgramFiles%\nodejs, Scoop paths - macOS/Linux:
~/.nvm,~/.fnm,/opt/homebrew/bin, etc.
Getting Started
- The existing Windows batch command handling in
MCPConnectionalready works - The main work is enhancing PATH discovery for all platforms
- Tests can use vitest (already in the project) to verify the path detection
There are many users blocked by this issue, and a contribution here would be greatly appreciated by the community. This fix would unblock everyone who wants to use MCP servers but is stuck with the "npx not found" error.
@psimsa @Jennifer249 @kpchen104 - your workarounds show you understand the problem well - would any of you be interested in turning those insights into a proper fix?
cc @Patrick-Erichsen for a second review on this.
@germgerm I believe JB launches under a different scope than VS Code so the errors there are different. Any chance you're able to try it out on VSC to verify this in your case?