context7 icon indicating copy to clipboard operation
context7 copied to clipboard

Bug: MCP server context7 was unable to start successfully.

Open Mishra-Suraj opened this issue 5 months ago • 8 comments

Steps to reproduce

  1. Start Vscode insiders with Contex7 mcp server preinstalled.
  2. Enable Automatically start MCP servers when sending a chat message option in copilot side bar.
  3. Check output log

Expected behaviour

MCP server for context7 should start sucessfully.

Actual behaviour

Following error in output -

[ 2025-08-23 20:55:51.466 [info] Starting server context7

2025-08-23 20:55:51.466 [info] Connection state: Starting

2025-08-23 20:55:51.466 [info] Starting server from LocalProcess extension host

2025-08-23 20:55:53.081 [info] Connection state: Starting

2025-08-23 20:55:53.081 [info] Connection state: Error spawn node ENOENT

2025-08-23 20:55:53.158 [info] Starting server context7

2025-08-23 20:55:53.158 [info] Connection state: Starting

2025-08-23 20:55:53.158 [info] Starting server from LocalProcess extension host

2025-08-23 20:55:53.202 [info] Connection state: Starting

2025-08-23 20:55:53.202 [info] Connection state: Error spawn node ENOENT

2025-08-23 20:56:00.304 [info] Starting server context7

2025-08-23 20:56:00.305 [info] Connection state: Starting

2025-08-23 20:56:00.312 [info] Starting server from LocalProcess extension host

2025-08-23 20:56:00.402 [info] Connection state: Starting

2025-08-23 20:56:00.404 [info] Connection state: Error spawn node ENOENT ]

Which means the mcp server cannot find installed node binary(?)

I have checked if my shell can find the node binary using which node. The output - /home/sam/.nvm/versions/node/v24.6.0/bin/node

I can run npm and npx with no issues. Not sure what I am doing wrong.

Copilot version - 1.360.1752 Context7 extension verion - 1.0.1 VScode version - Version: 1.104.0-insider Commit: df6568066e88d67331cec7a12a34bdef058fb62b Date: 2025-08-22T17:09:01.208Z Electron: 37.2.3 ElectronBuildId: 12035395 Chromium: 138.0.7204.100 Node.js: 22.17.0 V8: 13.8.500258-electron.0 OS: Linux x64 6.14.0-28-generic snap

Mishra-Suraj avatar Aug 23 '25 15:08 Mishra-Suraj

Is this a Context7 specific issue or about any MCP server? It seems that VS Code can't spawn Node to run the server. Also could you try with the remote server config please?

enesgules avatar Aug 26 '25 21:08 enesgules

@enesgules The issue seems to be resolved now. Either an update to code-insiders or copilot extension fixed the issue. I am not facing it anymore. Thanks for your help.

Mishra-Suraj avatar Sep 02 '25 10:09 Mishra-Suraj

Fixed by either code-insiders update or copilot extension update. Not sure which one.

Mishra-Suraj avatar Sep 02 '25 10:09 Mishra-Suraj

The issue persists because the MCP server is looking for the Node.js binary in /usr/bin/node. However, when following the official Node.js documentation (which uses NVM), the binary is installed in a user-specific directory like /home/<user_name>/.nvm/versions/node/v24.7.0/bin/node. Installing Node.js through NodeSource resolves the problem. I'm posting this in case anyone else on Ubuntu runs into the same issue.

Mishra-Suraj avatar Sep 06 '25 16:09 Mishra-Suraj

This is related to MCP client right?

enesgules avatar Sep 06 '25 17:09 enesgules

Could this be re-opened? Installing NodeJS manually defeats the whole purpose of using NVM...

taylorn-ai avatar Nov 25 '25 04:11 taylorn-ai

Hey @taylorn-ai could you please elaborate what the issue is

enesgules avatar Nov 25 '25 10:11 enesgules

Hey @taylorn-ai could you please elaborate what the issue is

Turns out the issue is that the host machine doesn't have Node/npx installed. I am using a GitHub Codespace, I had to install Node/npx on my local machine to get this to work. I'd imagine others have this same issue using Docker etc.

taylorn-ai avatar Nov 25 '25 10:11 taylorn-ai