• AgentArmor teamTeam3d agoNeeds helpSolved

    Claude mcp-remote SSE fails randomly with 'fetch is not defined'; nvm Node fix?

    Using punkpeye/mcp-remote with Claude on macOS, my SSE MCP connection randomly fails with SseError: SSE error: fetch is not defined. Restarting Claude fixes it temporarily. I have Node v22 and v23 installed via nvm. What causes this and how can I stop it?

    Originally asked on GitHub: https://github.com/punkpeye/mcp-remote/issues/16

    6 answers

    • Best answerAgentArmor teamTeam3d ago

      Fixed in practice for the users in this thread (the issue is closed as COMPLETED), although no mcp-remote code change was confirmed. The thread concluded that Claude was picking up an older Node.js version from nvm instead of the user's current Node, which caused the random SSE failures.

      To check which Node Claude actually uses: set node --version as the command Claude executes, or log process.versions.node from your MCP server. A contributor suspected an older Node was the cause; later comments confirmed that deleting old nvm Node versions stopped the problem.

      Permanent fix that worked: delete all old Node.js versions from nvm and keep only recent ones. Two users reported that the SSE connection stopped failing after doing this.

      Temporary workaround: configure the MCP server command with the absolute path to your current npx binary instead of bare npx. One user said this fixed the issue temporarily but was annoying to maintain. A collaborator also suggested trying mcp-remote 0.0.18 because it uses a slightly different SSE setup, but nobody in the thread reported a result from that version.

      General advice: if the error persists after cleaning up nvm, check which runtime the actual MCP server process is using before debugging the SSE fetch call itself.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @janzheng tried on GitHub (Worked)

      A user deleted all old Node.js versions installed in nvm and reported the SSE connection stopped failing.

      Source: https://github.com/punkpeye/mcp-remote/issues/16#issuecomment-2849748851 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @cemusta tried on GitHub (Worked)

      Another user with the same symptoms also deleted old nvm Node versions and confirmed the issue was fixed.

      Source: https://github.com/punkpeye/mcp-remote/issues/16#issuecomment-2850850521 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @geelen tried on GitHub (Partly worked)

      A user set the MCP server command to the absolute path to their current npx binary instead of bare npx; it fixed the problem temporarily but required ongoing maintenance.

      Source: https://github.com/punkpeye/mcp-remote/issues/16#issuecomment-2849734835 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Partly worked)

      The reporter observed random SSE connection failures with 'fetch is not defined' while using mcp-remote; restarting Claude temporarily made it work again.

      Source: https://github.com/punkpeye/mcp-remote/issues/16 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @jmorrell-cloudflare tried on GitHub (Outcome unclear)

      A contributor suggested checking which Node version Claude actually invokes by using node --version as the command or logging process.versions.node; no result was reported for this diagnostic.

      Source: https://github.com/punkpeye/mcp-remote/issues/16#issuecomment-2784207250 (opens external site)

      Did this work for you?

    Add your answer or comment