- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6
          Introduce the inspector command
          #157
        
          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
  
    Introduce the inspector command
  
  #157
              Conversation
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.
Thanks @michalismeng for picking this up, looks good! I added some suggestions, it would be great if you could take a look please.
Just re-tag me afterwards and we can get this approved and merged. 🥳
| } | ||
|  | ||
| if err != nil { | ||
| return fmt.Errorf("failed to run the inspector: %w", err) | 
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.
| return fmt.Errorf("failed to run the inspector: %w", err) | |
| return fmt.Errorf("error running the inspector: %w", err) | 
Introduce the 'inspector' command, which starts the MCP inspector tool via an npx process for interaction with 'try me out' style MCP servers. Also, add a note to the docs.
* Check canceled context with errors.Is * Pin @modelcontextprotocol/inspector to latest * Use fmt.Fprintf with cmd.OutOrStdOut * Other formatting / linting stuff
8779e96    to
    da55b12      
    Compare
  
    | @peteski22 I've pushed a fixup addressing your comments and also rebased over the latest  | 
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, thanks for the work and being so responsive to the comments. 🥳
What's changed
Introduce the 'inspector' command, which starts the MCP inspector tool. Internally it launches the inspector with
npx @modelcontextprotocol/inspectorand passes any addition arguments the user gives.Closes #51
(See the issue for some more details)
Notes
The issue mentions the following in the desired solution:
Currently,
mcpd inspectorprints to the terminal whatever the underlyingnpxprocess prints, so there will be dev-style details of the error:and in the UI we get a message from the inspector itself, for example:
Not sure if this is enough, glad to discuss if more is needed here.