This guide helps you set up and run comprehensive MCP server testing using real GitHub projects in isolated Docker containers.
- Docker and Docker Compose installed
- Git installed
- 4GB+ available RAM
- 10GB+ available disk space
# Download popular GitHub projects for testing
./scripts/download-test-projects.sh# Start Docker containers with isolated ports
docker-compose -f docker-compose.test.yml up -d
# Wait for services to be ready (30-60 seconds)
docker-compose -f docker-compose.test.yml logs -f test-code-intelligence# Index downloaded projects for MCP testing
./scripts/index-test-projects.sh# Run comprehensive tests with real projects
./scripts/test-real-projects.sh# Generate detailed performance report
./scripts/generate-project-report.sh| Script | Purpose | Duration |
|---|---|---|
download-test-projects.sh |
Download GitHub projects | 2-5 min |
analyze-projects.sh |
Analyze project statistics | 1 min |
index-test-projects.sh |
Index projects for MCP | 5-15 min |
test-real-projects.sh |
Run comprehensive tests | 5-10 min |
benchmark-real-projects.sh |
Performance benchmarking | 10-20 min |
generate-project-report.sh |
Generate HTML/JSON reports | 2 min |
| Service | Port | Purpose |
|---|---|---|
| MCP Server | 4000 | REST API |
| WebSocket/MCP | 8080 | WebSocket connections |
| Test PostgreSQL | 5433 | Test database |
| Test Redis | 6380 | Test cache |
| Test Grafana | 4002 | Monitoring dashboard |
| Test Prometheus | 9092 | Metrics collection |
- Small Projects: lodash, axios, prettier (< 1K files)
- Medium Projects: express, fastapi (1K-10K files)
- Large Projects: react, nextjs, vite (10K+ files)
# Test search functionality
docker exec projectara-test-mcp node dist/minimal-index.js search \
--query="function" \
--codebase-id="react" \
--limit=10# Run performance benchmarks
./scripts/benchmark-real-projects.sh# Search across all projects
docker exec projectara-test-mcp node dist/minimal-index.js search \
--query="import" \
--across-projects \
--limit=20# Test REST API
curl -X POST http://localhost:4000/api/search \
-H "Content-Type: application/json" \
-d '{"query": "useState", "codebase_id": "react"}'# Test WebSocket/MCP connection
wscat -c ws://localhost:8080 -x '{"jsonrpc": "2.0", "method": "search_code", "params": {"query": "function"}}'# MCP Server logs
docker-compose -f docker-compose.test.yml logs test-code-intelligence
# Database logs
docker-compose -f docker-compose.test.yml logs test-postgres
# All services logs
docker-compose -f docker-compose.test.yml logs# Container resource usage
docker stats projectara-test-mcp
# Memory usage details
docker exec projectara-test-mcp node -e "console.log(process.memoryUsage())"- Open http://localhost:4002
- Login with: admin / test_admin
- View MCP Server metrics
- Main results:
test-results/ - Performance data:
test-results/performance-benchmark-*.json - HTML reports:
test-results/reports/mcp-test-report-*.html - JSON metrics:
test-results/reports/metrics-*.json
# Open latest HTML report
open test-results/reports/mcp-test-report-*.html
# Or view in browser
echo "Open: http://localhost:4002 for live monitoring"Docker containers not starting:
# Check port conflicts
netstat -an | grep -E ":(4000|5433|6380|8080)"
# Clean up and restart
docker-compose -f docker-compose.test.yml down --volumes
docker-compose -f docker-compose.test.yml up -dMCP server not healthy:
# Check health endpoint
curl http://localhost:4000/health
# View detailed logs
docker-compose -f docker-compose.test.yml logs test-code-intelligenceIndexing fails:
# Check if projects are downloaded
ls external-test-projects/
# Check disk space
df -h
# Restart indexing
./scripts/index-test-projects.shPerformance issues:
# Check memory usage
docker stats projectara-test-mcp
# Limit concurrent operations
# Edit scripts to reduce parallel processing# Complete reset
docker-compose -f docker-compose.test.yml down --volumes --remove-orphans
docker system prune -f
# Restart fresh
docker-compose -f docker-compose.test.yml up -d
./scripts/index-test-projects.sh# Add your own project
git clone https://github.com/your-username/your-project.git external-test-projects/your-project
# Index custom project
docker exec projectara-test-mcp node dist/minimal-index.js index \
/app/external-projects/your-project \
--codebase-id="your-project"# Test only React project
docker exec projectara-test-mcp node dist/minimal-index.js search \
--query="useState" \
--codebase-id="react"
# Compare two projects
./scripts/compare-projects.sh react nextjs# Memory profiling
docker exec projectara-test-mcp node --inspect dist/minimal-index.js
# CPU profiling
docker exec projectara-test-mcp node --prof dist/minimal-index.js search --query="function"| Project Size | Indexing Time | Search Time | Memory Usage |
|---|---|---|---|
| Small (<1K files) | < 30s | < 50ms | 200-400MB |
| Medium (1K-10K) | 1-5 min | < 100ms | 400-800MB |
| Large (10K+) | 5-15 min | < 200ms | 800-1500MB |
name: MCP Docker Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download test projects
run: ./scripts/download-test-projects.sh
- name: Start test environment
run: docker-compose -f docker-compose.test.yml up -d
- name: Wait for services
run: sleep 60
- name: Index projects
run: ./scripts/index-test-projects.sh
- name: Run tests
run: ./scripts/test-real-projects.sh
- name: Generate report
run: ./scripts/generate-project-report.sh
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results/# Check script help
./scripts/test-real-projects.sh --help 2>/dev/null || echo "Run script without --help flag"
# Check Docker status
docker-compose -f docker-compose.test.yml ps
# Check system resources
free -h
df -h# Enable debug logging
export DEBUG=mcp:*
docker-compose -f docker-compose.test.yml up -d
# Run tests with verbose output
./scripts/test-real-projects.sh --verboseWhen you see:
- β All Docker containers running
- β Projects indexed successfully
- β Tests passing
- β Report generated
Your MCP server is ready for production with real-world project validation!