Skip to content

Conversation

cliffhall
Copy link
Member

@cliffhall cliffhall commented Jul 10, 2025

In cli/src/cli.ts

  • start the web client via client/bin/start.js rather than client/bin/client.js
  • remove the environment related stuff from that launch because client/bin/start.js will read the env and do the right thing

Motivation 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 or npm run dev we were getting an appropriate startup. However when starting from the command line with npx -y @modelcontextprotocol/inspector@latest we were invoking cli/src/cli.ts which in turn invoked client/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

Screenshot 2025-07-10 at 3 50 02 PM Screenshot 2025-07-10 at 3 50 29 PM

With extra environment vars

Screenshot 2025-07-10 at 3 51 29 PM Screenshot 2025-07-10 at 3 52 57 PM

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

The issue arose with refactoring done in #529 and #555

@felixweinberger
Copy link
Contributor

Tested with a local check out via node cli/build/cli.js

CleanShot 2025-07-10 at 19 26 02@2x CleanShot 2025-07-10 at 19 26 06@2x

I think the PORT: CLIENT_PORT is unnecessary though

Copy link
Contributor

@felixweinberger felixweinberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing point about PORT: CLIENT_PORT to a nit

Copy link
Contributor

@felixweinberger felixweinberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@cliffhall cliffhall merged commit 42a1bac into modelcontextprotocol:main Jul 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants