Makefile•2.48 kB
.PHONY: dev install test lint clean help
help: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
dev: ## Run development server with auto-reload
@echo "Starting MCP server in development mode..."
@echo "Server will be available at http://localhost:8000"
@echo "API documentation at http://localhost:8000"
@echo "Metrics available at http://localhost:8000/metrics"
python main.py
install: ## Install dependencies (placeholder - dependencies handled by Replit)
@echo "Dependencies are managed by Replit environment"
@echo "Required packages: flask, pydantic, openai, PyJWT, prometheus-client, aiofiles, jsonschema, python-json-logger"
test: ## Run tests (placeholder)
@echo "Running tests..."
@echo "Test implementation would go here"
lint: ## Run code linting (placeholder)
@echo "Running linting..."
@echo "Linting would be performed here"
clean: ## Clean up temporary files
@echo "Cleaning up..."
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
check-env: ## Check environment variables
@echo "Checking environment configuration..."
@python -c "from app.core.config import config; config.validate(); print('Configuration is valid')"
demo: ## Show example API calls
@echo "Example API calls:"
@echo ""
@echo "1. Initialize:"
@echo "curl -X POST http://localhost:8000/rpc \\"
@echo " -H 'Authorization: Bearer devtoken' \\"
@echo " -H 'Content-Type: application/json' \\"
@echo " -d '[{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\"}}]'"
@echo ""
@echo "2. List resources:"
@echo "curl -X POST http://localhost:8000/rpc \\"
@echo " -H 'Authorization: Bearer devtoken' \\"
@echo " -H 'Content-Type: application/json' \\"
@echo " -d '[{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"method\":\"resources/list\",\"params\":{\"base\":\".\"}}]'"
@echo ""
@echo "3. Call tool:"
@echo "curl -X POST http://localhost:8000/rpc \\"
@echo " -H 'Authorization: Bearer devtoken' \\"
@echo " -H 'Content-Type: application/json' \\"
@echo " -d '[{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"method\":\"tools/call\",\"params\":{\"name\":\"sum_values\",\"arguments\":{\"a\":5,\"b\":3}}}]'"
@echo ""
@echo "4. SSE Stream:"
@echo "curl -H 'Authorization: Bearer devtoken' 'http://localhost:8000/events?prompt=Hello%20world'"