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
7.7 KiB
7.7 KiB
MCPTesta Docker Environment
A comprehensive Docker Compose setup for MCPTesta documentation with development and production configurations.
Quick Start
Prerequisites
- Docker and Docker Compose installed
- Caddy external network created:
make caddy-network
Development Environment
# Clone and setup
git clone <repository>
cd mcptesta
# Start development environment
make up
# OR manually:
# make setup && make dev
# View logs
make logs-live
# Access the site
open http://mcptesta.l.supported.systems
Production Environment
# Switch to production mode
make env-prod
# Start production environment
make prod
# Monitor production
make prod-logs
Architecture
Services
docs
(Documentation Site)
- Development: Astro with hot reloading and volume mounts
- Production: Multi-stage build with nginx serving static files
- Features:
- Automatic HTTPS via Caddy reverse proxy
- Health checks and logging
- Security headers and content optimization
- Resource limits and monitoring
Networks
caddy
(External)
- Connects documentation to Caddy reverse proxy
- Provides automatic HTTPS and load balancing
- Must be created externally:
docker network create caddy
monitoring
(Internal)
- Service monitoring and health checks
- Log aggregation and metrics collection
internal
(Build-only)
- Isolated network for build processes
- Production image building and artifact handling
Volumes
Development
docs_dev_cache
: Astro build cache for faster rebuildsdev_data
: SQLite database for development testingdev_redis
: Redis cache for development
Production
docs_build
: Production build artifacts- Persistent storage for static assets
Configuration
Environment Variables (.env)
# Project isolation
COMPOSE_PROJECT=mcptesta
# Environment mode
NODE_ENV=development # or 'production'
# Domain configuration
DOCS_DOMAIN=mcptesta.l.supported.systems
# Resource limits
DOCS_MEMORY_LIMIT=512m
DOCS_CPU_LIMIT=0.5
# Health check configuration
HEALTH_CHECK_INTERVAL=30s
HEALTH_CHECK_TIMEOUT=10s
HEALTH_CHECK_RETRIES=3
Caddy Integration
The documentation site integrates with caddy-docker-proxy
using labels:
labels:
caddy: mcptesta.l.supported.systems
caddy.reverse_proxy: "{{upstreams 4321}}"
caddy.encode: gzip
caddy.header.Cache-Control: "public, max-age=31536000"
Development Features
Hot Reloading
- Source files mounted as volumes
- Astro dev server with automatic rebuilds
- LiveReload integration for instant updates
Debugging
# Access container shell
make shell
# View real-time logs
make logs-live
# Check container health
make health
# Debug network connectivity
make network
File Watching
# Enable file watcher (requires inotify-tools)
docker compose --profile watcher up -d docs-watcher
# Manual watch mode
make watch
Production Features
Security
- Read-only root filesystem
- Non-root user execution
- Security headers and content policies
- Minimal attack surface with Alpine Linux
Performance
- Multi-stage builds for minimal image size
- Gzip/Zstd compression
- Static asset caching
- Resource limits and health monitoring
Monitoring
# Enable production monitoring
docker compose --profile monitoring up -d
# Check logs
make prod-logs
# View metrics
docker compose exec docs-monitor wget -qO- http://localhost:9100/metrics
Available Commands (Makefile)
Development
make dev
- Start development environmentmake dev-detached
- Start in backgroundmake dev-logs
- Follow development logs
Production
make prod
- Start production environmentmake prod-build
- Build production imagesmake prod-logs
- Follow production logs
Management
make build
- Build development imagesmake rebuild
- Rebuild without cachemake clean
- Stop and remove containers/volumesmake deep-clean
- Full cleanup including images
Monitoring
make logs
- Show all logsmake status
- Container statusmake health
- Health check statusmake restart
- Restart services
Utilities
make shell
- Access container shellmake test
- Run health testsmake network
- Show network infomake env
- Show environment config
Environment
make env-dev
- Switch to developmentmake env-prod
- Switch to productionmake setup
- Initial setup
File Structure
mcptesta/
├── .env # Environment configuration
├── docker-compose.yml # Main compose file
├── docker-compose.dev.yml # Development overrides
├── docker-compose.prod.yml # Production overrides
├── Makefile # Management commands
├── DOCKER.md # This documentation
├── docs/
│ ├── Dockerfile # Multi-stage documentation build
│ ├── package.json # Node.js dependencies
│ ├── astro.config.mjs # Astro configuration
│ └── src/ # Documentation source
├── config/
│ ├── nginx-dev.conf # Development nginx config
│ └── fluent-bit.conf # Production logging config
└── scripts/ # Utility scripts
Troubleshooting
Common Issues
Container won't start
# Check logs
make logs
# Verify environment
make env
# Check network
make network
Caddy network missing
# Create external network
make caddy-network
# OR manually:
# docker network create caddy
Permission issues
# Fix file permissions
sudo chown -R $USER:$USER docs/
sudo chmod -R 755 docs/
Port conflicts
# Check port usage
netstat -tlnp | grep :4321
# Modify port in .env
echo "DOCS_PORT=4322" >> .env
Debug Commands
# Full debug information
make debug
# Container inspection
docker compose exec docs sh -c "id && ls -la && env"
# Network connectivity
docker compose exec docs wget -qO- http://localhost:4321/
# Resource usage
docker stats $(docker compose ps -q)
Health Checks
Health checks are configured for all services:
- Interval: 30 seconds
- Timeout: 10 seconds
- Retries: 3
- Start Period: 40 seconds
# Check health status
make health
# Manual health check
docker compose exec docs wget --spider -q http://localhost:4321/
Integration with MCPTesta
This Docker environment is designed to work seamlessly with the MCPTesta project:
Documentation Integration
- Astro/Starlight serves the Diátaxis-structured documentation
- Hot reloading for documentation development
- Integration with MCPTesta's existing docs/ structure
Development Workflow
- Local MCPTesta development with live documentation
- Testing documentation changes in real-time
- Production-ready deployment pipeline
CI/CD Integration
- Production builds for deployment
- Health checks for deployment validation
- Logging and monitoring for production environments
Best Practices
Development
- Always use
make
commands for consistency - Check logs regularly:
make logs-live
- Use development environment for documentation editing
- Test production builds before deployment
Production
- Use production environment for staging/production
- Monitor resource usage and health
- Enable logging for production troubleshooting
- Regular backups of persistent volumes
Security
- Keep base images updated
- Review security headers configuration
- Monitor access logs
- Use read-only filesystems in production
This Docker environment provides a robust, scalable, and secure foundation for MCPTesta documentation development and deployment.