This guide explains how to test the RMCP meta-orchestration system with real agents and MCP servers.
The test environment includes:
- RMCP Main Service: The meta-orchestrator that plans and executes tasks
- Mock MCP Server: Provides atomic tools (grep, find, cat)
- Mock Agent: Provides AI agent capabilities (security audit, deployment, etc.)
- Docker and Docker Compose
- Python 3.9+
- curl (for health checks)
# Run the complete E2E test suite
python test_meta_orchestration.pyThis will:
- Start all services using docker-compose
- Wait for services to be healthy
- Run test scenarios
- Validate results
- Clean up the environment
# Start all services
docker-compose -f docker-compose.test.yml up -d --build
# Check service health
curl http://localhost:8000/health # Mock MCP Server
curl http://localhost:8001/health # Mock Agent
curl http://localhost:8080/health # RMCP Main# Send high-level security audit request
curl -X POST http://localhost:8080/execute \
-H "Content-Type: application/json" \
-d '{
"goal": "Conduct comprehensive security audit of our Terraform infrastructure",
"context": {
"repo_path": "/path/to/terraform",
"environment": "production"
},
"user_id": "test-user",
"tenant_id": "test-tenant"
}'# Send low-level grep request
curl -X POST http://localhost:8080/execute \
-H "Content-Type: application/json" \
-d '{
"goal": "Find all files containing the word error",
"context": {
"file_pattern": "*.py"
},
"user_id": "test-user",
"tenant_id": "test-tenant"
}'# Send complex request that might use both agents and tools
curl -X POST http://localhost:8080/execute \
-H "Content-Type: application/json" \
-d '{
"goal": "Deploy new version and run security tests",
"context": {
"version": "v1.2.3",
"environment": "staging"
},
"user_id": "test-user",
"tenant_id": "test-tenant"
}'# Stop and remove all containers
docker-compose -f docker-compose.test.yml down -vPurpose: Verify that high-level tasks are delegated to appropriate agents.
Request: Security audit goal Expected: Agent response with security-specific data (vulnerabilities, recommendations)
Purpose: Verify that low-level tasks use atomic tools.
Request: File search goal Expected: Tool response with search results
Purpose: Verify complex scenarios that might use both agents and tools.
Request: Deployment + testing goal Expected: Coordinated response from multiple components
Purpose: Verify all services are running and healthy.
Expected: All services respond to health checks
GET /health- Health checkPOST /execute- Execute task (main endpoint)GET /metrics- Prometheus metricsGET /docs- API documentation
GET /health- Health checkGET /tools- List available toolsPOST /execute- Execute MCP toolGET /stats- Server statistics
GET /health- Health checkPOST /execute- Execute agent taskGET /stats- Agent statistics
The test configuration is in config/test_config.yaml and includes:
- MCP server definitions
- Agent registry
- Planning parameters
- Execution settings
- Observability configuration
# Check logs
docker-compose -f docker-compose.test.yml logs
# Check individual service logs
docker-compose -f docker-compose.test.yml logs rmcp
docker-compose -f docker-compose.test.yml logs mock-mcp-server
docker-compose -f docker-compose.test.yml logs mock-agent# Check if ports are accessible
netstat -tulpn | grep :8000
netstat -tulpn | grep :8001
netstat -tulpn | grep :8080
# Test endpoints manually
curl -v http://localhost:8000/health
curl -v http://localhost:8001/health
curl -v http://localhost:8080/health# Check database file permissions
ls -la /app/data/
# Remove old database
docker-compose -f docker-compose.test.yml down -v- Add new test method to
MetaOrchestrationTesterclass - Call the method in
_run_test_scenarios() - Update this documentation
- Mock MCP Server: Edit
mock_mcp_server/main.py - Mock Agent: Edit
mock_agent/main.py - Configuration: Edit
config/test_config.yaml
- Add tool/agent definition to test configuration
- Implement corresponding mock service
- Update docker-compose configuration
- Add test scenarios
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ RMCP Main │ │ Mock MCP │ │ Mock Agent │
│ (Port 8080) │ │ Server │ │ (Port 8001) │
│ │ │ (Port 8000) │ │ │
│ - Planning │◄──►│ - grep │ │ - Security │
│ - Execution │ │ - find │ │ - Deployment │
│ - Orchestration│ │ - cat │ │ - Testing │
└─────────────────┘ └─────────────────┘ └─────────────────┘
The RMCP main service acts as a meta-orchestrator, deciding whether to:
- Use atomic tools from the MCP server for low-level tasks
- Delegate to agents for high-level, complex tasks
- Combine both approaches for mixed scenarios