-
Notifications
You must be signed in to change notification settings - Fork 766
Fix command-line argument passing to pre-fill UI #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When running the inspector with command-line arguments (e.g., `npx @modelcontextprotocol/inspector node build/index.js arg1 arg2`), the command and arguments were not being properly passed through to the UI for pre-filling. Changes: - cli.ts now passes command and args to start.js - start.js uses --command for the command and --args for arguments - Server parses the new --command parameter - /config endpoint returns correct values for UI pre-filling This ensures the UI correctly displays the command and arguments passed on the command line instead of showing old localStorage values. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
133abe5
to
c7b90a1
Compare
🎭 Playwright E2E Test Results✅ 12 passed Details12 tests across 1 suite 📊 View Detailed HTML Report (download artifacts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, everything works. But you need to run prettier-fix
to pass CI.
Ran it but there were no changes - I don't see anything failing in CI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
Sorry Felix. It complained on my machine. Not sure why. Back switched back to main and then back to your branch and did a pull (which said it was up to date), then it ran with no problem. |
I did the same work locally earlier this week. 😂 I have Playwright tests too, which I'll send after I rebase. |
Motivation and Context
When running the inspector with command-line arguments (e.g.,
npx @modelcontextprotocol/inspector node build/index.js arg1 arg2
),the command and arguments were not being properly passed through to
the UI for pre-filling.
This means the instructions in the readme on
inspector
on how to run via CLI don't actually work.Changes:
This ensures the UI correctly displays the command and arguments
passed on the command line instead of showing old localStorage values.
How Has This Been Tested?
Before (current
main
):Doesn't fill command and args from the CLI args, instead uses whatever was there before.
After (this PR):
Correctly fills command and args from the CLI args passed in.
Breaking Changes
N/A
Types of changes
Checklist
Additional context