MCP Inspector 0.17.0 --cli fails with ERR_MODULE_NOT_FOUND for cli/package.json
Why does
npx @modelcontextprotocol/inspector@0.17.0 --clifail on macOS with Node v22.20.0, and how do I fix it? The command crashes right after the npm install prompt withERR_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
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@latestornpx @modelcontextprotocol/inspector@0.17.1. The thread does not state the root cause beyond the stack trace: Node's ESM loader reportedERR_MODULE_NOT_FOUNDbecause it could not find/Users/.../node_modules/@modelcontextprotocol/inspector/cli/package.jsonwhen importingcli/build/index.js.Upgrade and rerun your original command, for example:
bashnpx @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:
bashnpx @modelcontextprotocol/inspector@0.16.8 --cli https://pitchskin.com/api/mcp --method tools/listNo 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
Authorizationheader 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?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 withERR_MODULE_NOT_FOUNDforcli/package.json.Source: https://github.com/modelcontextprotocol/inspector/issues/834 (opens external site)
Did this work for you?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/listas a temporary workaround. The comment does not explicitly report success.Did this work for you?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@latestornpx @modelcontextprotocol/inspector@0.17.1. No retest result was posted in the thread.Did this work for you?
Related questions
- MCP Inspector 0.10.2 sends null for unset optional params (error -32602)?
- Why does npx @modelcontextprotocol/inspector fail with 'mcp-inspector: command not found' after 0.10.0?
- How do I increase MCP Inspector's 10-second request timeout?
- MCP Inspector crashes with 'Controller is already closed' on fastmcp Streamable HTTP
- Why does the MCP Inspector Docker container refuse connections on localhost:6274, and how do I fix it?