MCP Docker Orchestrator
A daemon to orchestrate MCP servers as Docker containers and configure AWS ALB path-based routing.
MCP Docker Orchestrator
A systemd-managed daemon that orchestrates MCP (Model Context Protocol) servers as Docker containers and configures AWS ALB path-based routing.
Features
- Docker Compose Integration: Manage MCP servers using standard Docker Compose format
- AWS ALB Integration: Configure path-based routing in AWS Application Load Balancer
- Web Dashboard: Monitor and control MCP services through a web interface
- Self-healing: Automatically reconcile configuration and actual state
- Secure: No persistence of secrets, compatible with LiteLLM Proxy
Architecture
The MCP Docker Orchestrator consists of several core components:
- Configuration Manager: Handles loading and parsing of Docker Compose configuration
- Compose Manager: Manages Docker Compose service lifecycle
- ALB Manager: Configures AWS ALB routing rules
- Dashboard: Web interface for monitoring and management
- Orchestrator Service: Main process that coordinates all components
Prerequisites
- Python 3.8 or higher
- Docker and Docker Compose
- AWS Account with appropriate permissions
- Linux host (for systemd service)
Installation
Automatic Installation
The easiest way to install is using the provided setup script:
sudo ./setup.sh
This will:
- Install Python dependencies
- Create default configuration files
- Set up the systemd service
- Configure permissions
Manual Installation
-
Install Python dependencies:
pip install -r requirements.txt -
Configure settings in
settings.conf -
Configure MCP servers in
mcp-compose.yaml -
Install systemd service:
sudo cp service.template /etc/systemd/system/mcp-orchestrator.service # Edit the service file to configure paths sudo systemctl daemon-reload sudo systemctl enable mcp-orchestrator.service
Configuration
Settings (settings.conf)
[aws]
region = us-west-2 # AWS region
alb_arn = # ARN of your Application Load Balancer
listener_arn = # ARN of your ALB listener
vpc_id = # ID of your VPC
[service]
reconciliation_interval_seconds = 60 # How often to check and reconcile state
port_range_start = 8000 # Start of port range for container mapping
port_range_end = 9000 # End of port range for container mapping
[dashboard]
username = admin # Dashboard login username
password = changeme # Dashboard login password (change this!)
path = /monitor # URL path for dashboard
[logging]
level = INFO # Logging level (DEBUG, INFO, WARNING, ERROR)
MCP Server Configuration (mcp-compose.yaml)
version: '3'
services:
example-mcp-server:
image: mcp/example:latest
restart: always
environment:
FASTMCP_LOG_LEVEL: "ERROR"
ADDITIONAL_ENV_VAR: "value"
labels:
mcp.path: "/mcp/example"
mcp.disabled: "false"
mcp.managed_by: "mcp-orchestrator"
Each MCP server configuration consists of:
- image: Docker image to run
- restart: Restart policy (always recommended)
- environment: Environment variables
- labels:
- mcp.path: Path pattern for ALB routing
- mcp.disabled: Whether this server is disabled
- mcp.managed_by: Should always be "mcp-orchestrator"
Usage
Starting the Service
sudo systemctl start mcp-orchestrator
Checking Status
sudo systemctl status mcp-orchestrator
Viewing Logs
sudo journalctl -u mcp-orchestrator -f
Manual Execution
For testing or debugging:
# Run once and exit
python orchestrator/main.py --one-shot
# Run without dashboard
python orchestrator/main.py --no-dashboard
# Specify custom config files
python orchestrator/main.py --compose /path/to/mcp-compose.yaml --settings /path/to/settings.conf
# Migrate from old config format
python orchestrator/main.py --migrate /path/to/old/mcp.config.json
Dashboard
The web dashboard is available at:
http://your-server:5000/monitor
Default login: admin / changeme
Features:
- Overview of MCP servers
- Container status monitoring
- ALB routing configuration
- Actions (start/stop/restart services)
- Synchronization controls
Routing
Each MCP server is mapped to a path based on its ID or the mcp.path label:
/mcp/{server-id}/*
These path patterns are configured in the ALB listener rules.
Migrating from mcp.config.json
If you're upgrading from an older version that used mcp.config.json, you can use the built-in migration tool:
python orchestrator/main.py --migrate /path/to/mcp.config.json
This will:
- Read your existing
mcp.config.json - Convert it to the new Docker Compose format
- Save it as
mcp-compose.yaml
Troubleshooting
Container Issues
- Check Docker Compose status:
docker compose ps - Verify container logs:
docker compose logs {service-id} - Check for port conflicts
- If you see "Permission denied" errors:
- The service user needs access to the Docker socket
- Make sure the user is in the docker group
- You may need to log out and log back in for group changes to take effect
AWS ALB Issues
- Verify AWS credentials
- Check ALB listener ARN and rules
- Ensure target groups are properly configured
- Check EC2 instance is registered with target groups
Service Issues
- Check systemd status:
systemctl status mcp-orchestrator - View logs:
journalctl -u mcp-orchestrator -f - Verify configuration files are properly formatted
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Servers
Workday by CData
A read-only server for querying live Workday data using LLMs, powered by the CData JDBC Driver.
Salesforce MCP Server
Integrates Claude with Salesforce, enabling natural language interactions with your Salesforce data and metadata.
Modal
Deploy Python scripts to Modal, a serverless platform for running code in the cloud.
Huawei MCP Server
A Model Context Protocol server built on Huawei Cloud services, providing secure and controlled cloud access for large AI models.
AWS MCP Server
An MCP server for AWS operations, supporting S3 and DynamoDB services. Requires AWS credentials.
CRIC Wuye AI
Interact with capabilities of the CRIC Wuye AI platform, an intelligent assistant specifically for the property management industry.
Google Ads API v20
Provides full access to the Google Ads API v20. Requires OAuth2 or Service Account credentials for configuration.
Cloudflare Remote MCP Server (Authless)
An example for deploying a remote, authentication-free MCP server on Cloudflare Workers.
Unsplash MCP Server
An MCP server for accessing the Unsplash API to search for and retrieve photos.
Remote MCP Server on Cloudflare
A remote MCP server deployable on Cloudflare Workers with OAuth login support, using Cloudflare KV for data storage.