fix startup of webclient through cli #604
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In
cli/src/cli.ts
client/bin/start.js
rather thanclient/bin/client.js
client/bin/start.js
will read the env and do the right thingMotivation and Context
If started from the default entry point of the npm package
cli/build/cli.js
, the proxy token isn't being created and passed to the client on the query string.So in our local development environment, when we ran
npm run start
ornpm run dev
we were getting an appropriate startup. However when starting from the command line withnpx -y @modelcontextprotocol/inspector@latest
we were invokingcli/src/cli.ts
which in turn invokedclient/bin/client.js
if you weren't asking for the cli version of the inspector.How Has This Been Tested?
By invoking with the npm package entry point
cli/src/cli.ts
.Without any extra environment vars
With extra environment vars
Breaking Changes
Types of changes
Checklist
Additional context
The issue arose with refactoring done in #529 and #555