-
Notifications
You must be signed in to change notification settings - Fork 87
feat: refactor commands to v2 structure and add HTTP server support #211
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
This commit refactors the command structure for MCPM v2 and adds comprehensive HTTP server support:
## Command Structure Changes
- Move add/remove commands from target_operations to main commands directory
- Rename commands to match v2 syntax: `add` → `install`, `remove` → `uninstall`
- Remove v1-specific profile activation logic and complexity
- Inline necessary helper functions into command files
- Update CLI registration and imports
## HTTP Server Support
- Add support for installing HTTP MCP servers via `mcpm install`
- HTTP servers create RemoteServerConfig instead of STDIOServerConfig
- Add dedicated headers field for HTTP server configuration
- Headers support variable substitution (e.g., `"Authorization": "Bearer ${API_TOKEN}"`)
- HTTP servers don't require command/args fields
## Smart Argument Filtering
- Only prompt for arguments actually referenced in installation method
- Scan for `${VARIABLE_NAME}` patterns in all installation fields
- HTTP installations without variables prompt for no arguments
- Traditional installations only prompt for used variables
## Bug Fixes
- Fix AttributeError when accessing .command on RemoteServerConfig
- Add proper type checking in run.py and display.py
- Ensure HTTP servers are handled correctly throughout the system
## Tests
- Update all tests to use new command structure
- Add comprehensive tests for HTTP server installation
- Add tests for argument filtering functionality
- All tests passing with new architecture
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
- Update fastmcp to v2.10.2 for improved HTTP server support - Update GitHub server configuration to use OAuth HTTP endpoint - Simplify GitHub server config to use GITHUB_PERSONAL_ACCESS_TOKEN - Remove custom Go installation method for cleaner config 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
PR Code Suggestions ✨Latest suggestions up to e39adaf
Previous suggestions✅ Suggestions up to commit ce98f8f
|
||||||||||||||||||||||||
Hide the FastMCP startup banner by setting show_banner=False for both stdio and HTTP modes. This provides a cleaner user experience without the verbose FastMCP branding output. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
SummaryRe-organises the CLI for v2: Notes
ReviewNice cleanup that aligns command names with common package-manager verbs. ✅ Logic looks untouched, tests for
|
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
- Remove --debug option from mcpm run and mcpm profile run commands - Remove debug parameter from proxy factory and convenience functions - Keep MCPMDebugMiddleware class for future use - Add --host option to both run commands for network binding flexibility - Fix type annotations in middleware and proxy for Optional parameters - Remove unused imports and variables 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
… debug Missing client config files are normal when clients aren't installed. This reduces noise in the default log output while still providing debug information when needed.
Update test_client_edit_command_client_not_installed to match current behavior where undetected clients show warning messages instead of calling print_error. The command now continues with interactive selection after showing appropriate warnings about config file creation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Apply ruff formatting fixes to multiple files: - Fix import ordering in install.py - Format long function signatures in run.py and profile/run.py - Remove unused imports in middleware.py and proxy.py - Ensure consistent code style across the codebase 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
# [2.2.0](v2.1.0...v2.2.0) (2025-07-09) ### Features * refactor commands to v2 structure and add HTTP server support ([#211](#211)) ([6ebca95](6ebca95))
|
🎉 This PR is included in version 2.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
User description
Summary
This PR refactors the command structure for MCPM v2 and adds comprehensive HTTP server support, resolving issue #207.
Command Structure Changes
target_operationsto maincommandsdirectoryadd→install,remove→uninstallHTTP Server Support (Fixes #207)
mcpm install githubRemoteServerConfiginstead ofSTDIOServerConfigheadersfield for HTTP server configuration"Authorization": "Bearer ${API_TOKEN}")Smart Argument Filtering
${VARIABLE_NAME}patterns in all installation fieldsBug Fixes
AttributeErrorwhen accessing.commandonRemoteServerConfigrun.pyanddisplay.pyTest Plan
mcpm install --help,mcpm uninstall --help)Breaking Changes
mcpm.commands.target_operations.{add,remove}tomcpm.commands.{install,uninstall}add/removetoinstall/uninstall%prefix🤖 Generated with Claude Code
PR Type
Enhancement
Description
Refactor commands to v2 structure: move add/remove to install/uninstall
Add HTTP server support for MCP installations
Implement smart argument filtering for installation methods
Fix server configuration handling for different server types
Changes diagram
Changes walkthrough 📝
2 files
Update CLI imports and command registrationUpdate package imports for new command structure5 files
Rename add to install with HTTP supportInline global_list_servers functionRemove deprecated common operations fileRename remove to uninstall with inlined functionsAdd HTTP server fields and configuration2 files
Add type checking for server configurationsAdd type checking for STDIOServerConfig display2 files
Update tests for install command and HTTP serversUpdate tests for uninstall command