Skip to content

NPX not available to start MCP server, but available in VSCode Terminal #4791

Open

Description

@andreimirt

Before submitting your bug report

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.
Image

To reproduce

No response

Log output

Activity

  1. self-assigned this
    on Mar 24, 2025
  2. added
    ide:vscode
    kind:bug
    priority:medium
    on Mar 24, 2025
  3. zjh-nuc-AIOT commented on Mar 25, 2025

    @zjh-nuc-AIOT

    me too

  4. limslmao commented on Mar 31, 2025

    @limslmao

    I've tried to adjust the command to point to the actual path, but I still cannot run with npx.

  5. FRitaRr commented on Apr 3, 2025

    @FRitaRr

    Same problem for me, plese help

  6. psimsa commented on Apr 7, 2025

    @psimsa

    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"
    
  7. AkifAycicek commented on Apr 15, 2025

    @AkifAycicek

    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"]
            }
          }
        ]
      },
  8. kije commented on May 5, 2025

    @kije

    Same problem here.

  9. Patrick-Erichsen commented on May 5, 2025

    @Patrick-Erichsen
    Contributor

    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"
  10. kije commented on May 5, 2025

    @kije

    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)

  11. added
    os:windows
    on May 7, 2025
  12. eranco74 commented on May 8, 2025

    @eranco74

    I have a similar problem on linux.
    MCP servers suing npx or docker showing this:

    Image
    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"]
            }  
          }
        ]
      },
    
  13. 10 remaining items

  14. kpchen104 commented on Jul 10, 2025

    @kpchen104

    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
    
  15. AlefAlfa commented on Jul 20, 2025

    @AlefAlfa

    Thank you @kpchen104 it worked on MacOS 🥳

  16. Basketballforce commented on Aug 3, 2025

    @Basketballforce

    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

  17. germgerm commented on Oct 4, 2025

    @germgerm

    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 )

    Image
  18. jagomf commented on Oct 16, 2025

    @jagomf

    @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.

  19. dosubot commented on Oct 16, 2025

    @dosubot

    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.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about continue Share Dosu with your team

  20. bdougie commented on Oct 17, 2025

    @bdougie
    Contributor

    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:

    1. core/util/shellPath.ts - Enhance getEnvPathFromUserShell() 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
    2. 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)
    3. 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

    1. The existing Windows batch command handling in MCPConnection already works
    2. The main work is enhancing PATH discovery for all platforms
    3. 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.

  21. Patrick-Erichsen commented on Oct 20, 2025

    @Patrick-Erichsen
    Contributor

    @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?

  22. clint911 commented on Jan 2, 2026

    @clint911

    Still having this issue in vscode on an ubuntu ssh session,none of the above fixes work.

  23. dashko commented on Jan 25, 2026

    @dashko

    I am still having the issue with the pre-release version on Debian Linux. None of the above fixes worked.

  24. pks1989 commented on Mar 2, 2026

    @pks1989

    Just reloading VS code after install next js dev tools helps me

  25. vorasudh commented on Jul 8, 2026

    @vorasudh

    How come after more than 1 year, this issue still exists? For me it started very recently after latest VS Code update. earlier it was working just fine

  26. dominik-kropp commented on Jul 24, 2026

    @dominik-kropp

    Same, the MCP server worked before but after upgrading to Node.js 24 in my devcontainer, it started throwing this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

"needs-triage"ide:vscodekind:bugno-staleos:windowspriority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions