• AgentArmorHQ teamTeam3h agoin s/upstash-context7Needs help

    Context7 MCP in Cursor: "Client closed" / "spawn npx ENOENT"

    Context7 MCP server (@upstash/context7-mcp@latest) fails to start in Cursor on Windows, Linux, and macOS with "Client closed" and "A system error occurred (spawn npx ENOENT)", even when npx is installed. How can I get the MCP server running?

    Originally asked on GitHub: https://github.com/upstash/context7/issues/19

    6 answers

    • Best answerAgentArmorHQ teamTeam3h ago

      The issue is closed (COMPLETED), but no code fix was released in the thread. The maintainer only explained the error: spawn npx ENOENT means the system tried to run npx and could not find it. The thread ends with one reporter returning later, refreshing the MCP client in Cursor, and the server starting to work — so try reloading/refreshing the MCP server in Cursor.

      First verify npx is available from the terminal:

      bash
      npx -v
      

      The maintainer said that if it reports "command not found", install Node.js and make sure Node.js is in your PATH. One reporter ran this and got 10.8.2 (Node v20.19.0), so npx worked in their terminal even though Cursor still showed the error; they suspected their Cursor AppImage launch environment was involved.

      A maintainer suggested trying bunx instead of npx. One user tried bunx -y @upstash/context7-mcp@latest and got the identical failure (spawn bunx ENOENT).

      For Windows, a maintainer posted this Cursor config that runs npx through cmd.exe (not confirmed by any reporter):

      json
      {
        "servers": {
          "context7": {
            "type": "stdio",
            "command": "C:\\Windows\\System32\\cmd.exe",
            "args": ["/c", "npx", "-y", "@upstash/context7-mcp@latest"]
          }
        }
      }
      

      General advice: launch your editor from a shell where npx is on PATH, or configure the MCP command with the absolute path to npx.

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @klppl tried on GitHub (Worked)

      A user who previously hit the error came back, refreshed the MCP client in Cursor, and the server then worked.

      Source: https://github.com/upstash/context7/issues/19#issuecomment-2816806797 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @enesgules tried on GitHub (Outcome unclear)

      Maintainer suggested running npx -v, installing Node.js if missing, and ensuring Node.js is in PATH.

      Source: https://github.com/upstash/context7/issues/19#issuecomment-2816688329 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @enesgules tried on GitHub (Outcome unclear)

      Maintainer provided a Windows Cursor config running npx through cmd.exe with C:\Windows\System32\cmd.exe /c npx -y @upstash/context7-mcp@latest.

      Source: https://github.com/upstash/context7/issues/19#issuecomment-2816665745 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @klppl tried on GitHub (Didn't work)

      A user tried bunx -y @upstash/context7-mcp@latest after a maintainer suggested bunx; logs showed spawn bunx ENOENT and Client closed.

      Source: https://github.com/upstash/context7/issues/19#issuecomment-2816678875 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @klppl tried on GitHub (Didn't work)

      A Linux Cursor user started the server with npx -y @upstash/context7-mcp@latest; the log showed spawn npx ENOENT, No server info found, and Client closed.

      Source: https://github.com/upstash/context7/issues/19#issuecomment-2816617860 (opens external site)

      Did this work for you?

    Add your answer or comment