Community-driven testing excellence for the MCP ecosystem MCPTesta is a comprehensive testing framework for FastMCP servers that brings scientific rigor and enterprise-grade capabilities to MCP protocol testing. 🎯 Core Features: • Comprehensive FastMCP server testing with advanced protocol support • Parallel execution with intelligent dependency resolution • Flexible CLI and YAML configuration system • Rich reporting: console, HTML, JSON, and JUnit formats • Advanced MCP protocol features: notifications, cancellation, progress tracking • Production-ready Docker environment with caddy-docker-proxy integration 🧪 Advanced Testing Capabilities: • Multi-transport support (stdio, SSE, WebSocket) • Authentication testing (Bearer tokens, OAuth flows) • Stress testing and performance validation • Memory profiling and leak detection • CI/CD integration with comprehensive reporting 🎨 Professional Assets: • Complete logo package with lab experiment theme • Comprehensive documentation with Diátaxis framework • Community-focused branding and messaging • Multi-platform favicon and social media assets 📚 Documentation: • Getting started tutorials and comprehensive guides • Complete CLI and YAML reference documentation • Architecture explanations and testing strategies • Team collaboration and security compliance guides 🚀 Ready for: • Community contributions and external development • Enterprise deployment and production use • Integration with existing FastMCP workflows • Extension and customization for specific needs Built with modern Python practices using uv, FastMCP, and Starlight documentation. Designed for developers who demand scientific precision in their testing tools. Repository: https://git.supported.systems/mcp/mcptesta Documentation: https://mcptesta.l.supported.systems
180 lines
5.7 KiB
Makefile
180 lines
5.7 KiB
Makefile
# MCPTesta Docker Compose Management
|
||
# Modern Makefile for managing Docker environments
|
||
|
||
.PHONY: help dev prod build clean logs status health restart shell test network caddy
|
||
|
||
# Default target
|
||
help: ## Show this help message
|
||
@echo "MCPTesta Docker Compose Commands"
|
||
@echo "================================"
|
||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||
|
||
##@ Development Commands
|
||
|
||
dev: ## Start development environment with hot reloading
|
||
@echo "🚀 Starting MCPTesta development environment..."
|
||
@docker compose up --build --remove-orphans
|
||
|
||
dev-detached: ## Start development environment in background
|
||
@echo "🚀 Starting MCPTesta development environment (detached)..."
|
||
@docker compose up -d --build --remove-orphans
|
||
|
||
dev-logs: ## Follow development logs
|
||
@docker compose logs -f docs
|
||
|
||
##@ Production Commands
|
||
|
||
prod: ## Start production environment
|
||
@echo "🏭 Starting MCPTesta production environment..."
|
||
@docker compose -f docker-compose.yml -f docker-compose.prod.yml up --build -d
|
||
|
||
prod-logs: ## Follow production logs
|
||
@docker compose -f docker-compose.yml -f docker-compose.prod.yml logs -f
|
||
|
||
prod-build: ## Build production images
|
||
@echo "🔨 Building production images..."
|
||
@docker compose -f docker-compose.yml -f docker-compose.prod.yml build
|
||
|
||
##@ Management Commands
|
||
|
||
build: ## Build development images
|
||
@echo "🔨 Building development images..."
|
||
@docker compose build
|
||
|
||
rebuild: ## Rebuild images without cache
|
||
@echo "🔨 Rebuilding images without cache..."
|
||
@docker compose build --no-cache
|
||
|
||
clean: ## Stop containers and remove volumes
|
||
@echo "🧹 Cleaning up containers and volumes..."
|
||
@docker compose down -v --remove-orphans
|
||
@docker system prune -f
|
||
|
||
deep-clean: ## Full cleanup including images and build cache
|
||
@echo "🧹 Deep cleaning - removing images and build cache..."
|
||
@docker compose down -v --remove-orphans --rmi all
|
||
@docker system prune -af --volumes
|
||
|
||
##@ Monitoring Commands
|
||
|
||
logs: ## Show all container logs
|
||
@docker compose logs --tail=100
|
||
|
||
logs-live: ## Follow all container logs
|
||
@docker compose logs -f
|
||
|
||
status: ## Show container status
|
||
@echo "📊 Container Status:"
|
||
@docker compose ps
|
||
@echo ""
|
||
@echo "🌐 Network Status:"
|
||
@docker network ls | grep mcptesta
|
||
|
||
health: ## Check container health
|
||
@echo "🏥 Health Check Status:"
|
||
@docker compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Health}}"
|
||
|
||
restart: ## Restart all services
|
||
@echo "🔄 Restarting services..."
|
||
@docker compose restart
|
||
|
||
##@ Utility Commands
|
||
|
||
shell: ## Access docs container shell
|
||
@docker compose exec docs sh
|
||
|
||
shell-root: ## Access docs container as root
|
||
@docker compose exec --user root docs sh
|
||
|
||
test: ## Run container tests
|
||
@echo "🧪 Running container health tests..."
|
||
@docker compose exec docs wget --spider -q http://localhost:4321/ && echo "✅ Docs container healthy" || echo "❌ Docs container unhealthy"
|
||
|
||
##@ Network Commands
|
||
|
||
network: ## Show network information
|
||
@echo "🌐 Docker Networks:"
|
||
@docker network ls | grep -E "(caddy|mcptesta)"
|
||
@echo ""
|
||
@echo "🔗 Container Network Details:"
|
||
@docker compose exec docs ip route show
|
||
|
||
caddy-network: ## Create caddy external network if it doesn't exist
|
||
@echo "🌐 Ensuring caddy network exists..."
|
||
@docker network create caddy 2>/dev/null || echo "ℹ️ Caddy network already exists"
|
||
|
||
##@ Environment Commands
|
||
|
||
env: ## Show current environment configuration
|
||
@echo "⚙️ Current Environment Configuration:"
|
||
@echo "COMPOSE_PROJECT: $(shell grep COMPOSE_PROJECT .env | cut -d= -f2)"
|
||
@echo "NODE_ENV: $(shell grep NODE_ENV .env | cut -d= -f2)"
|
||
@echo "DOCS_DOMAIN: $(shell grep DOCS_DOMAIN .env | cut -d= -f2)"
|
||
@echo ""
|
||
@echo "📄 Full .env file:"
|
||
@cat .env
|
||
|
||
env-dev: ## Switch to development environment
|
||
@echo "🔧 Switching to development environment..."
|
||
@sed -i 's/NODE_ENV=.*/NODE_ENV=development/' .env
|
||
@echo "✅ Environment set to development"
|
||
|
||
env-prod: ## Switch to production environment
|
||
@echo "🔧 Switching to production environment..."
|
||
@sed -i 's/NODE_ENV=.*/NODE_ENV=production/' .env
|
||
@echo "✅ Environment set to production"
|
||
|
||
##@ Quick Start Commands
|
||
|
||
validate: ## Validate complete Docker setup
|
||
@echo "🔍 Validating MCPTesta Docker setup..."
|
||
@./scripts/validate-setup.sh
|
||
|
||
setup: caddy-network validate ## Initial setup - create networks and prepare environment
|
||
@echo "🎯 Setting up MCPTesta Docker environment..."
|
||
@echo "✅ Setup complete! Run 'make dev' to start development"
|
||
|
||
up: setup dev ## Complete setup and start development environment
|
||
|
||
stop: ## Stop all containers
|
||
@echo "⏹️ Stopping all containers..."
|
||
@docker compose down
|
||
|
||
##@ Documentation Commands
|
||
|
||
docs-build: ## Build documentation only
|
||
@echo "📚 Building documentation..."
|
||
@docker compose --profile build up docs-builder
|
||
|
||
docs-preview: ## Preview production build locally
|
||
@echo "👀 Previewing production documentation build..."
|
||
@docker compose exec docs npm run preview
|
||
|
||
##@ Debugging Commands
|
||
|
||
debug: ## Show debugging information
|
||
@echo "🔍 MCPTesta Docker Debug Information"
|
||
@echo "===================================="
|
||
@echo ""
|
||
@echo "📦 Docker Version:"
|
||
@docker version --format '{{.Server.Version}}'
|
||
@echo ""
|
||
@echo "🐳 Docker Compose Version:"
|
||
@docker compose version --short
|
||
@echo ""
|
||
@echo "⚙️ Environment:"
|
||
@make env
|
||
@echo ""
|
||
@echo "📊 Container Status:"
|
||
@make status
|
||
@echo ""
|
||
@echo "🌐 Network Status:"
|
||
@make network
|
||
|
||
# Development helpers
|
||
watch: ## Watch for changes and rebuild (requires inotify-tools)
|
||
@echo "👀 Watching for changes..."
|
||
@while inotifywait -r -e modify,create,delete ./docs/src; do \
|
||
echo "🔄 Changes detected, rebuilding..."; \
|
||
docker compose restart docs; \
|
||
done
|