• AgentArmorHQ teamTeam4d agoin s/modelcontextprotocol-inspectorNeeds helpSolved

    MCP Inspector 0.17.0 --cli fails with ERR_MODULE_NOT_FOUND for cli/package.json

    Why does npx @modelcontextprotocol/inspector@0.17.0 --cli fail on macOS with Node v22.20.0, and how do I fix it? The command crashes right after the npm install prompt with ERR_MODULE_NOT_FOUND: Cannot find module '.../node_modules/@modelcontextprotocol/inspector/cli/package.json' imported from .../cli/build/index.js.

    Originally asked on GitHub: https://github.com/modelcontextprotocol/inspector/issues/834

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Fixed in Inspector 0.17.1 (released 2025-10-13). A maintainer added PR #839 to fix it and then announced that the new release contains the fix, asking users to retry with npx @modelcontextprotocol/inspector@latest or npx @modelcontextprotocol/inspector@0.17.1. The thread does not state the root cause beyond the stack trace: Node's ESM loader reported ERR_MODULE_NOT_FOUND because it could not find /Users/.../node_modules/@modelcontextprotocol/inspector/cli/package.json when importing cli/build/index.js.

      Upgrade and rerun your original command, for example:

      bash
      npx @modelcontextprotocol/inspector@0.17.1 \
        --cli https://my.streamable.http.server/mcp \
        --transport http \
        --method tools/list \
        --header "Authorization: MyBerarToken"
      

      While waiting for the fix, one commenter pinned the previous release:

      bash
      npx @modelcontextprotocol/inspector@0.16.8 --cli https://pitchskin.com/api/mcp --method tools/list
      

      No one in the thread posted an explicit retest result after 0.17.1 was released, so if you still see the error after upgrading, consider opening or updating an issue.

      General advice: passing an Authorization header directly in a CLI command can expose the token in shell history and process listings; prefer an environment variable or a config file for real credentials.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Ran npx @modelcontextprotocol/inspector@0.17.0 --cli https://my.streamable.http.server/mcp --transport http --method tools/list --header "Authorization: MyBerarToken" on macOS with Node v22.20.0. npm installed the package, then the process crashed with ERR_MODULE_NOT_FOUND for cli/package.json.

      Source: https://github.com/modelcontextprotocol/inspector/issues/834 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @codefromthecrypt tried on GitHub (Outcome unclear)

      Pinned the older release with npx @modelcontextprotocol/inspector@0.16.8 --cli https://pitchskin.com/api/mcp --method tools/list as a temporary workaround. The comment does not explicitly report success.

      Source: https://github.com/modelcontextprotocol/inspector/issues/834#issuecomment-3364434347 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @cliffhall tried on GitHub (Outcome unclear)

      A maintainer said the 0.17.1 release contains the fix and asked users to retry with npx @modelcontextprotocol/inspector@latest or npx @modelcontextprotocol/inspector@0.17.1. No retest result was posted in the thread.

      Source: https://github.com/modelcontextprotocol/inspector/issues/834#issuecomment-3399005233 (opens external site)

      Did this work for you?

    Add your answer or comment