feat: install and validate MCP packages during crux mcp add#31
Open
kaushalpaneri wants to merge 12 commits into
Open
feat: install and validate MCP packages during crux mcp add#31kaushalpaneri wants to merge 12 commits into
kaushalpaneri wants to merge 12 commits into
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The flags now reflect the package manager, not the runner command. --npm installs via npm install -g, --uv installs via uv tool install. The runtime commands (npx, uvx) remain unchanged internally. Updated across all source, tests, docs, README, install.sh, and skills. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nstall.py Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Install success/failure is sufficient validation. MCP servers often need auth configured before they can respond to protocol handshakes, so probing at registration time produces false negatives. Full protocol probing is available via crux mcp status after auth setup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed probe and rollback from the design. Install exit codes are sufficient validation. Protocol probing deferred to crux mcp status. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updated mcp-add CLI docs, registry guide, quickstart, authentication guide, changelog, README, install.sh, and home page to reflect that crux mcp add now installs packages before registering, auto-detects deps for github/local sources, and supports --skip-validation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
crux mcp add --npmnow runsnpm install -gand--uvrunsuv tool installbefore registering. Catches missing packages, yanked versions, and build failures at registration time.crux mcp add --githuband--localnow auto-detect project type and install dependencies (package.json→npm install,pyproject.toml→uv sync,requirements.txt→uv pip install).--valueflag). Commented and closed.--npx→--npm,--uvx→--uv(reflects package manager, not runner).--skip-validationbypasses installation checks for auth-requiring MCPs, offline use, or private registries.Key changes
src/crux_cli/install.pyinstall_npm_package,install_uv_package,detect_and_install_deps,rollback_mcp_addsrc/crux_cli/cli/commands/mcp.pycmd_mcp_addto install before registeringsrc/crux_cli/health.pyprobe_mcp_server_detailednow accepts configurabletimeoutparametersrc/crux_cli/package_validation.pyinstall.py)--skip-validationDesign decisions
crux mcp statusafter auth is configured.npm install -ganduv tool installexit codes are sufficient to verify packages exist and are installable. No need for separate registry checks.--skip-validation: Keeps the escape hatch for edge cases without complicating the happy path.Test plan
crux mcp add foo --npm @modelcontextprotocol/server-memoryinstalls and registerscrux mcp add bar --npm nonexistent-pkg-xyzfails with clear errorcrux mcp add baz --npm nonexistent-pkg-xyz --skip-validationregisters without installcrux mcp add qux --uv some-mcp-toolinstalls via uv tool install🤖 Generated with Claude Code