This document summarizes the implementation of npm and pip package support for just-mcp, addressing [Issue #XX] requesting easier installation across different ecosystems.
Files Created:
package.json- npm package configurationinstall.js- Post-install script to download binaryindex.js- Wrapper to execute the binaryREADME.md- npm package documentationLICENSE- MIT license
How It Works:
- User runs
npm install -g just-mcpornpx just-mcp - During installation,
install.jsdetects platform and downloads appropriate binary - Binary is placed in
npm/bin/directory index.jswrapper provides thejust-mcpcommand- Falls back to
cargo installif binary download fails
Supported Platforms:
- Linux x86_64, aarch64
- macOS x86_64, aarch64 (Apple Silicon)
- Windows x86_64
Files Created:
pyproject.toml- Python package configuration (PEP 621)just_mcp/__init__.py- Package module with download logic and CLI entry pointREADME.md- PyPI package documentationLICENSE- MIT license
How It Works:
- User runs
pip install just-mcporuvx just-mcp - On first run,
__init__.pychecks if binary exists - If not, downloads appropriate binary from GitHub releases
- Binary is cached for subsequent runs
- Provides
just-mcpcommand-line entry point
Same platform support as npm package
Purpose: Automatically builds binaries for all supported platforms when a release is created.
Matrix Build:
- Linux x86_64 (ubuntu-latest)
- Linux aarch64 (ubuntu-latest with cross-compilation)
- macOS x86_64 (macos-latest)
- macOS aarch64 (macos-latest)
- Windows x86_64 (windows-latest)
Triggers:
- Automatically on GitHub release creation
- Manually via workflow_dispatch with tag input
Outputs:
.tar.gzarchives for each platform- Uploaded as GitHub release assets
CONTRIBUTING.md:
- Guidelines for contributors
- Detailed package publishing instructions
- Binary distribution process
TESTING.md:
- Comprehensive testing guide for npm package
- Comprehensive testing guide for Python package
- Platform-specific testing instructions
- Integration testing with MCP clients
- Pre-publish checklist
PACKAGE_MAINTENANCE.md:
- Quick reference for maintainers
- Release checklist
- Common maintenance tasks
- Troubleshooting guide
Updated README.md:
- Added npm installation instructions
- Added pip installation instructions
- Updated Claude Desktop configuration examples
- Documented all three installation methods (npm, pip, cargo)
scripts/publish-packages.sh:
- Bash script to update package versions
- Helps synchronize versions across npm and Python packages
- Provides step-by-step publishing instructions
cargo install just-mcp
# or
git clone ... && cargo buildnpm:
npm install -g just-mcp
# or
npx just-mcp --stdiopip:
pip install just-mcp
# or
uvx just-mcp --stdiocargo (unchanged):
cargo install just-mcpAll three methods now work seamlessly:
Using npx:
{
"mcpServers": {
"just-mcp": {
"command": "npx",
"args": ["-y", "just-mcp", "--stdio"]
}
}
}Using uvx:
{
"mcpServers": {
"just-mcp": {
"command": "uvx",
"args": ["just-mcp", "--stdio"]
}
}
}- All existing Rust tests pass (33 tests)
- Package structure validated (npm and Python)
- CI workflow syntax validated
- npm package installation from GitHub release
- Python package installation from GitHub release
- Binary download on different platforms
- Integration with Claude Desktop
# Trigger build-binaries workflow manually
# or create a test release on GitHubFollow instructions in TESTING.md
cd npm
npm login
npm publishcd python
python -m build
python -m twine upload dist/*npx just-mcp@latest --version
uvx just-mcp@latest --versionPotential improvements for future releases:
- Automated Publishing: Auto-publish npm and PyPI packages after GitHub release
- Version Sync Automation: Script to sync versions across all package files
- CI Integration Tests: Add package installation tests to CI pipeline
- Platform-specific Packages: Consider platform-specific npm packages (esbuild style)
- Checksum Verification: Add SHA256 checksum verification for downloaded binaries
- Progress Indicators: Show download progress in install scripts
- Offline Mode: Support for installing with pre-downloaded binaries
- Binary Downloads: Always from official GitHub releases
- HTTPS Only: All downloads use HTTPS
- Fallback Security: Cargo build fallback only uses official crates.io
- License: MIT license included in all packages
- Code Review: All package code is open source and reviewable
- Update package versions to match Cargo version
- Test on new platforms as needed
- Monitor npm and PyPI download statistics
- Respond to package-specific issues
Use scripts/publish-packages.sh to update versions:
./scripts/publish-packages.sh 0.2.0For issues or questions about package distribution:
- GitHub Issues: https://github.com/promptexecution/just-mcp/issues
- See CONTRIBUTING.md for contribution guidelines
- See PACKAGE_MAINTENANCE.md for publisher quick reference
Implementation completed by: GitHub Copilot
Date: 2025-11-14
PR: [Link to PR]
Related Issue: Request for npm and pip installation methods