feat(mcp-cli): add CLI management commands (#6350)#6787
Merged
Conversation
Implement the hive mcp subcommand group with shared helpers and all P0/P1 management commands: install, add, remove, enable, disable, list, info, config, search, health, update. Includes update bridge (remove+reinstall with rollback on failure), first-use security notice, credential prompting, secret masking, and agent usage detection via load_agent_selection().
58 tests covering all commands end-to-end: - Real framework.cli.main() entrypoint dispatch (list, install, update) - Real registry-on-disk integration (install, list, config, info, remove) - All 11 command handlers (install, add, remove, enable, disable, list, info, config, search, health, update) - Security notice shown only once - Credential prompting stores overrides, skips when env set, handles cancel - Secret masking in human output, JSON output, and config display - Index refresh semantics (stale cache fallback vs no-cache hard fail) - Update rollback on reinstall failure preserves original entry - Update rejects local servers and pinned servers with correct remediation - Bulk update skips local and pinned servers - Argparse registration validates all 11 subcommands present - _find_agents_using_server resolves via real load_agent_selection - _parse_key_value_pairs validates KEY=VAL format
…ate, defer security sentinel (aden-hive#6350) - list --json now masks override values as <set> before emitting - update preserves enabled=False state across reinstall - security notice sentinel only written after successful install
…extract _mask_overrides helper (aden-hive#6350) - Fix module docstring to reflect update's full behavior - Pass registry instance to _cmd_mcp_update_server to avoid redundant disk I/O - Extract _mask_overrides() used by list --json, info --json, info human, and config display - Add comment about _find_agents_using_server path arithmetic limitation
Antiarin
marked this pull request as ready for review
March 25, 2026 18:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implement the
hive mcpsubcommand group with all P0/P1 management commands and shared CLI helpers for the MCP Server Registry.Type of Change
Related Issues
Fixes #6350
Changes Made
core/framework/runner/mcp_registry_cli.pywith 11 subcommands: install, add, remove, enable, disable, list, info, config, search, health, updatehive mcpcommand group incore/framework/cli.pyload_agent_selection()update <name>bridge: remove+reinstall with override preservation and rollback on failure (proper version diffing deferred to [MCP Registry] Version compatibility, pinning & upgrade safety #6355)update(no name) refreshes index and updates all non-pinned registry servers--jsonon list, info, search, health with masked overridesTesting
cd core && pytest tests/)cd core && ruff check .)58 tests in
core/tests/test_mcp_registry_cli.pycovering:framework.cli.main()entrypoint dispatchChecklist