.PHONY: help build test clean install npm-test npm-install sync-versions release setup-auth
help:
@echo "MCP Proxy Build Commands:"
@echo ""
@echo " build Build the Rust binary (release mode)"
@echo " test Run Rust tests"
@echo " clean Clean build artifacts"
@echo " install Install binary to /usr/local/bin"
@echo ""
@echo " npm-install Install npm package dependencies"
@echo " npm-test Test the npm package"
@echo ""
@echo " sync-versions Synchronize Rust and npm package versions"
@echo " setup-auth Setup cargo authentication for crates.io"
@echo " release Prepare for release (sync versions + test)"
@echo ""
@echo " all Build both Rust binary and test npm package"
build:
cargo build --release
test:
cargo test
clean:
cargo clean
rm -rf ../mcpproxy-npm/bin/mcpproxy*
rm -rf ../mcpproxy-npm/node_modules
install: build
sudo cp target/release/mcpproxy /usr/local/bin/
npm-install:
cd ../mcpproxy-npm && npm install
npm-test: build npm-install
cd ../mcpproxy-npm && npm test
sync-versions:
./sync-versions.sh
setup-auth:
./setup-cargo-auth.sh
release: sync-versions build npm-test
@echo "✓ Ready for release!"
@echo ""
@echo "Next steps:"
@echo "1. git add ."
@echo "2. git commit -m 'Bump mcpproxy version to X.Y.Z'"
@echo "3. git push origin main"
all: build npm-test
dev-test: build
@echo "Testing with a simple request..."
@echo '{"jsonrpc":"2.0","method":"ping","id":1}' | timeout 5 ./target/release/mcpproxy --url https://httpbin.org/post || echo "Test completed (timeout expected)"
check-deps:
@echo "Checking dependencies..."
@command -v cargo >/dev/null 2>&1 || { echo "cargo is required but not installed"; exit 1; }
@command -v npm >/dev/null 2>&1 || { echo "npm is required but not installed"; exit 1; }
@echo "✓ All dependencies available"