π§ AWS¶
MCP Gateway can be deployed to AWS using multiple container-based services:
- ECS (Fargate or EC2-backed)
- EKS (Elastic Kubernetes Service)
- EC2 (direct VM hosting with Docker)
π Option 1: ECS (Fargate)¶
ECS is a fully managed container orchestration service. Use it to deploy MCP Gateway without managing servers.
Steps¶
- Build and push your image:
docker build -t YOUR_ECR_URI/mcpgateway .
aws ecr get-login-password | docker login --username AWS --password-stdin YOUR_ECR_URI
docker push YOUR_ECR_URI/mcpgateway
-
Create an ECS Task Definition:
-
Use port
4444
-
Mount a secret or config for your
.env
(or set environment variables manually) -
Create a Service:
-
Use a Load Balancer (Application LB)
- Map
/
or/admin
to port4444
π Option 2: EKS¶
Use the same Kubernetes deployment guide and run on Amazon EKS.
You can:
- Use
kubectl
+eksctl
- Store
.env
as a Secret or ConfigMap - Use AWS Load Balancer Controller or NGINX Ingress
π Option 3: EC2 (Docker)¶
- Launch a VM (e.g., Ubuntu)
- Install Docker
- Copy your
.env
file and build the container:
scp .env ec2-user@host:/home/ec2-user
ssh ec2-user@host
docker build -t mcpgateway .
docker run -p 80:4444 --env-file .env mcpgateway
π‘οΈ Security Tips¶
- Set
AUTH_REQUIRED=true
in production - Use
JWT_SECRET_KEY
andAUTH_ENCRYPTION_SECRET
- Terminate TLS at the ELB level, or use Caddy/Nginx in-container if needed
π‘ DNS & Access¶
You can point Route53 or your DNS provider to the Load Balancer hostname.
Example: