continue icon indicating copy to clipboard operation
continue copied to clipboard

Failed to connect to MCP server Jetbrains MCP Proxycommand "npx" not found

Open dhaalves opened this issue 9 months ago • 12 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 1.0.8
- IDE version: Intellij IDEA 2024.3.5 (Ultimate Edition)
- Model: MCP
- config:
  
name: Local Assistant
version: 1.0.0
schema: v1
models:
  - name: gemini-2.5-pro-exp-03-25
    provider: gemini
    model: gemini-2.5-pro-exp-03-25
    apiKey: AIzaSyDw-F4bF2sy5XPa1pLugxloyjQS8UTZ-lg
  - name: gemini-2.0-flash-thinking-exp-01-21
    provider: gemini
    model: gemini-2.0-flash-thinking-exp-01-21
    apiKey: AIzaSyDw-F4bF2sy5XPa1pLugxloyjQS8UTZ-lg
  - name: gemini-2.0-flash-exp
    provider: gemini
    model: gemini-2.0-flash-exp
    apiKey: AIzaSyDw-F4bF2sy5XPa1pLugxloyjQS8UTZ-lg
  - name: deepseek-chat
    provider: deepseek
    model: deepseek-chat
    apiKey: sk-39841499ee454b879e46c5f003eaa3a3
  - name: deepseek-reasoner
    provider: deepseek
    model: deepseek-reasoner
    apiKey: sk-39841499ee454b879e46c5f003eaa3a3
  - name: claude-3-7-sonnet-latest
    provider: anthropic
    model: claude-3-7-sonnet-latest
    apiKey: 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
context:
  - provider: code
  - provider: docs
  - provider: diff
  - provider: terminal
  - provider: problems
  - provider: folder
  - provider: codebase
docs:
  - name: Jakarta EE 10 Spec
    startUrl: https://jakarta.ee/specifications/platform/10/jakarta-platform-spec-10.0
mcpServers:
  - name: JetBrains MCP Proxy
    command: npx
    args: ["-y", "@jetbrains/mcp-proxy"]
  - name: Memory
    command: docker
    args: ["run", "-i", "-v", "claude-memory:/app/dist", "--rm", "mcp/memory"]
  - name: Fetch
    command: docker
    args: ["run", "-i", "--rm", "mcp/fetch"]
  - name: Gitlab
    command: docker
    args: ["run", "-e", "GITLAB_PERSONAL_ACCESS_TOKEN", "-e", "GITLAB_API_URL", "mcp/gitlab"]
    env:
      GITLAB_PERSONAL_ACCESS_TOKEN: ${{ inputs.GITLAB_PERSONAL_ACCESS_TOKEN }}
      GITLAB_API_URL: ${{ inputs.GITLAB_API_URL }}
  
  OR link to assistant in Continue hub:

Description

I am getting Failed to connect to MCP server Jetbrains MCP Proxycommand "npx" not found, even though I have npx cli installed and working on terminal. PS: MCP config with docker command works correctly:

Image

To reproduce

No response

Log output


dhaalves avatar Mar 31 '25 13:03 dhaalves

why dont you mask the api keys you have posted or disable them? I cant reproduce your issue but here are some troubleshoots i used to resolve mine when i came across mcp connection issues. Consider the following steps

  • make sure you have the requirements installed, based on programming language
  • what kind of mcp you want to use i.e. remote/local
    • local, set the transport to stdio
    • remote, set transport to sse

acquahackman avatar Apr 01 '25 07:04 acquahackman

Do you have link or turoial in markdown with MCP and Continue ?

Symfomany avatar Apr 01 '25 09:04 Symfomany

@acquahackman the keys were revoked, before inputing here. As I said, I have no trouble setting up MCP with docker, but for some reason, the ones that need npx, cant work, even though I have all node tools on my path.

dhaalves avatar Apr 01 '25 11:04 dhaalves

I have similar issues and have seen quite a few other people having similar issues whether on JetBrains or VS code. At least on windows not sure about Mac. Even though npx works and is installed locally, the extension can’t recognize it or access npx. I also wonder if it’s because I have installed node using nvm and if that is the reason.

ghelanijimmy avatar Apr 03 '25 10:04 ghelanijimmy

I have similar issues and have seen quite a few other people having similar issues whether on JetBrains or VS code. At least on windows not sure about Mac. Even though npx works and is installed locally, the extension can’t recognize it or access npx. I also wonder if it’s because I have installed node using nvm and if that is the reason.

I've got the same issue (windows + VsCode + nvm) and found this: https://github.com/continuedev/continue/issues/4874#issuecomment-2769295812 Problem is that I'm using the YAML config file from the continue website, so don't know which args to add.

questmapping avatar Apr 04 '25 22:04 questmapping

i get the same Problem,use the yaml config,the same config content is ok in vscode,but not work in jetbrains (pycharm goland etc)

Image Image

—————— for jetbrians ide,I write the npx command address ,there is no npx cli not found error,it is occur connection close error like this:

Image

murphyXu avatar Apr 08 '25 07:04 murphyXu

This error is occurring on Mac as well..

changeonPark avatar Apr 09 '25 00:04 changeonPark

Running into the same issue with docker cli.

Image

muliyul avatar Apr 09 '25 11:04 muliyul

I also encountered the same issue. Is there a plan to fix it?

5bug avatar Apr 16 '25 03:04 5bug

same on ubuntu, also with absolute path /usr/local/bin/npx -> MCP error -1: Connection closed

robbatt avatar Apr 19 '25 09:04 robbatt

this configuration should run smoothly on your windows machine.

mcpServers:
  - name: Server Memory
    command: "cmd"
    args:
      - /c
      - npx
      - -y
      - "@modelcontextprotocol/server-memory"

ozshen avatar Apr 22 '25 04:04 ozshen

Had the same issue, although npm was installed and I could run npx in the terminal outside of VSCode. I figured that continue had an update available. So I updated continue and after it restarted, all MCP servers were green and running again.

mathiasschilling avatar Apr 28 '25 06:04 mathiasschilling

I encountered the same issue, and updating to the pre-release version solved it. Hope this helps you.

KNChiu avatar Apr 29 '25 08:04 KNChiu

I updated to 1.0.15 pre-released version. But the issue is still there.

Image

Lasitha-Jayawardana avatar May 02 '25 17:05 Lasitha-Jayawardana

For me it showing "error getting tools: not connected" after specifying full path to executables (

Prikalel avatar May 02 '25 21:05 Prikalel

On my laptop, the Process Monitor shows that the plugin only looks for npx.com and npx.exe (the PATHEXT settings are ignored). Whereas, \AppData\Roaming\npm has only npx.cmd.If you use the Batch To Exe converter utility and wrap the npx.cmd file in an npx.exe file, then the error will disappear.

Serge2019 avatar May 03 '25 09:05 Serge2019

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"

Patrick-Erichsen avatar May 05 '25 22:05 Patrick-Erichsen

This doesn't appear to be an npx only issue, facing the same thing for uv and uvx

Smfakhoury avatar May 06 '25 23:05 Smfakhoury