-
Notifications
You must be signed in to change notification settings - Fork 10.6k
fix: incorrect settings format in mcp add command #16180
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
fix: incorrect settings format in mcp add command #16180
Conversation
Summary of ChangesHello @subhobhai943, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical configuration issue within the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This PR correctly fixes a validation error when adding an MCP server with HTTP transport. The change to use httpUrl aligns the add command with the configuration schema's expectations.
However, there is a critical omission: the corresponding unit tests in packages/cli/src/commands/mcp/add.test.ts have not been updated. The tests for adding an HTTP server will now fail because they still assert the old configuration format. It is essential to update these tests to reflect the new behavior to ensure the fix is correctly verified and to maintain the integrity of the test suite.
| newServer = { | ||
| url: commandOrUrl, | ||
| type: 'http', | ||
| httpUrl: commandOrUrl, |
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.
While this change correctly fixes the validation bug, it uses the httpUrl property which is marked as deprecated in MCPServerConfig. The preferred modern approach is using url with type: 'http'. This highlights an inconsistency between the CLI's validation schema and the core library's design. This fix is acceptable, but a follow-up issue should be created to align the schema and migrate away from the deprecated httpUrl property to prevent future maintenance issues.
|
@subhobhai943 Appreciate the PR but this has already been fixed in main, just isn't in stable release. Fix PR: #15465 |
|
Thanks @jackwotherspoon for the heads up! I see now that this was addressed in #15465. I'll close this PR since it's redundant. |
Closing as duplicate of #15465.