Repository navigation
fix(package): restore npx @modelcontextprotocol/inspector with an inspector bin alias - #2652
Conversation
…inspector` bin alias (#2651) 2.10.0 added `mcpdo` as a second bin. With more than one distinct bin, npm's npx/exec runs only the bin named after the unscoped package name (`inspector`), which didn't exist, so the documented entry point failed with "could not determine executable to run". Add `inspector` -> the launcher, and guard it twice: an offline test:scripts check that the root manifest's npx default bin is the launcher (mirrors libnpmexec's getBinFromManifest), and a pack:verify step that runs the installed tarball via `npm exec` instead of by bin name, which is why every existing check stayed green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
There was a problem hiding this comment.
🟡 Changes recommended
package-lock.json remains inconsistent with the updated root bin metadata.
1 open finding
What changed in this PR
Restores the documented bare npx entry point by adding an inspector binary alias and regression checks.
Changes:
- Adds the launcher alias.
- Mirrors and tests npm’s default-bin selection.
- Verifies the installed tarball through
npm exec.
| File | Description |
|---|---|
package.json |
Adds the inspector alias. |
scripts/lib/npx-default-bin.mjs |
Implements npm’s bin-selection rule. |
scripts/lib/npx-default-bin.test.mjs |
Tests selection behavior and root manifest. |
scripts/pack-and-verify.mjs |
Exercises default-bin resolution on the tarball. |
clients/launcher/README.md |
Documents the alias requirement. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
…2651) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
|
Copilot round 1: 1 finding (lockfile root |
There was a problem hiding this comment.
🟢 Approval recommended
The alias, lockfile, offline guard, packaged-install verification, and documentation consistently address the regression.
0 open findings
1 resolved since last review
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
There was a problem hiding this comment.
🟢 Approval recommended
The alias, lockfile, documentation, and complementary regression checks correctly address the reported packaging failure.
0 open findings
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
|
Copilot review loop closed: round 3 (at c92978e, including the README mcpdo entry) was clean — 0 inline comments, nothing in the headline or a suppressed block. Round 2 was also clean but predated the README commit, hence round 3. |

Closes #2651
Problem
On 2.10.0,
npx @modelcontextprotocol/inspector(the documented entry point) fails withnpm error could not determine executable to run. 2.10.0 addedmcpdoas a second bin. When a package has more than one distinct bin, npm'snpx/npm exec(libnpmexec'sgetBinFromManifest) runs only the bin named after the unscoped package name,inspector. No bin had that name.Changes
package.json: adds aninspectorbin pointing at the launcher.mcp-inspectorandmcpdoare unchanged, andmcpdois still reachable withnpx -p @modelcontextprotocol/inspector mcpdo.scripts/lib/npx-default-bin.mjs+ test: copies npm's bin-choice rule and asserts the root manifest's npx default bin is the launcher. It runs offline intest:scripts, which is part ofvalidate:guardsand therefore CI. Verified to fail on the 2.10.0 manifest.pack:verify: new step 4a′ runs the installed tarball throughnpm exec --no -- @modelcontextprotocol/inspector --help. Every existing check callsnode_modules/.bin/mcp-inspectorby name, so none of them asks npm to pick a bin, and that is why 2.10.0 shipped green. I checked the step against a throwaway two-bin package. Without the alias it fails with the same error; with the alias it runs the launcher.clients/launcher/README.md: documents why the alias exists.Verification
npm run pack:verify: green, including the new step.npm run local:gate: green through every stage up tosmoke:web:firefox. That stage fails on this macOS 27 machine because Playwright's Firefox cannot launch here (smoke:web:firefox cannot launch Playwright's Firefox on macOS 27 #2625). I then ransmoke:web:firefoxin themcr.microsoft.com/playwright:v1.62.1-noblecontainer from a cleangit archiveof this commit, and it was green.local:storybook, which the&&chain skipped, was run separately: 529/529 passed.Release follow-up
latestis being moved back to 2.9.0 and 2.10.0 deprecated with a workaround message.🤖 Generated with Claude Code