MCP Docker Orchestrator

by gd03champ

Not rated
GitHub

About

A daemon to orchestrate MCP servers as Docker containers and configure AWS ALB path-based routing.

Details

Author
gd03champ
Categories
Cloud Service, Other, Infrastructure

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"

# 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

- Overview of MCP servers
- Container status monitoring
- ALB routing configuration
- Actions (start/stop/restart services)
- Synchronization controls

Each MCP server is mapped to a path based on its ID or the mcp.path label:

These path patterns are configured in the ALB listener rules.

If you're upgrading from an older version that usedmcp.config.json, you can use the built-in migration tool:

python orchestrator/main.py --migrate /path/to/mcp.config.json

- Read your existingmcp.config.json
- Convert it to the new Docker Compose format
- Save it asmcp-compose.yaml

- 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

- Verify AWS credentials
- Check ALB listener ARN and rules
- Ensure target groups are properly configured
- Check EC2 instance is registered with target groups

- Check systemd status:systemctl status mcp-orchestrator
- View logs:journalctl -u mcp-orchestrator -f
- Verify configuration files are properly formatted

This project is licensed under the MIT License - see the LICENSE file for details.

Core AWS MCP server providing prompt understanding and server management capabilities.

Generate and execute AWS CLI commands using natural language.

A natural language interface to manage AWS services like RDS, S3, EC2, and VPC.

Execute AWS CLI commands through the Model Context Protocol (MCP). Requires AWS credentials configured on the host.

Manage cloud infrastructure using Pulumi's Infrastructure as Code (IaC) platform. Requires the Pulumi CLI to be installed.

Manage your Bedrock server with natural language commands using the Bedrock Server Manager API.

A CLI tool to automate packaging MCP servers as Docker images and deploying them to AWS ECS.

Get prescriptive CDK advice, explain CDK Nag rules, check suppressions, generate Bedrock Agent schemas, and discover AWS Solutions Constructs patterns.

Manage and interact with Microsoft Azure services.

Integrates with Alibaba Cloud APIs to manage resources like ECS, Cloud Monitor, and OOS.

A daemon to orchestrate MCP servers as Docker containers and configure AWS ALB path-based routing.

A systemd-managed daemon that orchestrates MCP (Model Context Protocol) servers as Docker containers and configures AWS ALB path-based routing.

- 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

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

- Python 3.8 or higher
- Docker and Docker Compose
- AWS Account with appropriate permissions
- Linux host (for systemd service)

The easiest way to install is using the provided setup script:
- Install Python dependencies
- Create default configuration files
- Set up the systemd service
- Configure permissions

Configure MCP servers inmcp-compose.yaml

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
[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"

# 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

- Overview of MCP servers
- Container status monitoring
- ALB routing configuration
- Actions (start/stop/restart services)
- Synchronization controls

Each MCP server is mapped to a path based on its ID or the mcp.path label:

These path patterns are configured in the ALB listener rules.

If you're upgrading from an older version that usedmcp.config.json, you can use the built-in migration tool:

python orchestrator/main.py --migrate /path/to/mcp.config.json

- Read your existingmcp.config.json
- Convert it to the new Docker Compose format
- Save it asmcp-compose.yaml

- 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

- Verify AWS credentials
- Check ALB listener ARN and rules
- Ensure target groups are properly configured
- Check EC2 instance is registered with target groups

- Check systemd status:systemctl status mcp-orchestrator
- View logs:journalctl -u mcp-orchestrator -f
- Verify configuration files are properly formatted

This project is licensed under the MIT License - see the LICENSE file for details.

Core AWS MCP server providing prompt understanding and server management capabilities.

Generate and execute AWS CLI commands using natural language.

A natural language interface to manage AWS services like RDS, S3, EC2, and VPC.

Execute AWS CLI commands through the Model Context Protocol (MCP). Requires AWS credentials configured on the host.

Manage cloud infrastructure using Pulumi's Infrastructure as Code (IaC) platform. Requires the Pulumi CLI to be installed.

Manage your Bedrock server with natural language commands using the Bedrock Server Manager API.

A CLI tool to automate packaging MCP servers as Docker images and deploying them to AWS ECS.

Get prescriptive CDK advice, explain CDK Nag rules, check suppressions, generate Bedrock Agent schemas, and discover AWS Solutions Constructs patterns.

Manage and interact with Microsoft Azure services.

Integrates with Alibaba Cloud APIs to manage resources like ECS, Cloud Monitor, and OOS.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.