Skip to main content
If your organization already uses AWS, GCP, or Azure, you can deploy MCPs on your existing infrastructure. The LeanMCP SDK works on any Node.js runtime. However, deploying on cloud providers requires significant DevOps expertise. You need to configure logging, monitoring, scaling, networking, and security yourself.

The Reality of Cloud Deployment

Deploying MCPs properly on AWS, GCP, or Azure is not trivial. To get it right, you need:
  • Logging and observability — CloudWatch, Cloud Logging, or Azure Monitor
  • Scaling configuration — auto-scaling policies, load balancers
  • Networking — VPCs, security groups, IAM roles
  • Access controls — who can deploy, who can access logs
  • CI/CD pipelines — automated builds and deployments
  • Health checks and alerting — know when things break
Even experienced teams typically need 6-7 DevOps engineers and 500-600 hours to set up production-ready infrastructure. That’s months of work before you even start building MCP features.
If you must deploy on cloud providers, use managed container services. They handle scaling and infrastructure, reducing (but not eliminating) the DevOps burden.
ProviderRecommended ServiceDescription
AWSFargate (with ECS)Serverless containers, no server management
GCPCloud RunFully managed container platform
AzureContainer AppsServerless containers with auto-scaling

AWS: Fargate with ECS

AWS Fargate runs containers without managing servers. Combine it with ECS for orchestration.

Step 1: Create Dockerfile

FROM node:20-alpine

WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .

EXPOSE 3000
CMD ["node", "dist/server.js"]

Step 2: Build and Push to ECR

# Authenticate with ECR
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <account-id>.dkr.ecr.us-east-1.amazonaws.com

# Build image
docker build -t my-mcp .

# Tag and push
docker tag my-mcp:latest <account-id>.dkr.ecr.us-east-1.amazonaws.com/my-mcp:latest
docker push <account-id>.dkr.ecr.us-east-1.amazonaws.com/my-mcp:latest

Step 3: Create ECS Service

# Create task definition (task-definition.json)
aws ecs register-task-definition --cli-input-json file://task-definition.json

# Create service
aws ecs create-service \
  --cluster my-cluster \
  --service-name my-mcp-service \
  --task-definition my-mcp:1 \
  --desired-count 2 \
  --launch-type FARGATE

GCP: Cloud Run

Cloud Run is GCP’s fully managed container platform. It’s simpler than Fargate for basic deployments.

Step 1: Build with Cloud Build

# Build and push to Artifact Registry
gcloud builds submit --tag gcr.io/PROJECT_ID/my-mcp

Step 2: Deploy to Cloud Run

gcloud run deploy my-mcp \
  --image gcr.io/PROJECT_ID/my-mcp \
  --platform managed \
  --region us-central1 \
  --allow-unauthenticated \
  --memory 512Mi \
  --timeout 300
Cloud Run supports up to 60 minutes timeout on paid plans, much better than Lambda/Vercel.

Azure: Container Apps

Azure Container Apps is Microsoft’s serverless container platform.

Step 1: Create Container Registry

az acr create --resource-group myResourceGroup --name myregistry --sku Basic

Step 2: Build and Push

az acr build --registry myregistry --image my-mcp:v1 .

Step 3: Deploy Container App

az containerapp create \
  --name my-mcp \
  --resource-group myResourceGroup \
  --environment myEnvironment \
  --image myregistry.azurecr.io/my-mcp:v1 \
  --target-port 3000 \
  --ingress external

Adding Monitoring

Cloud providers require you to configure monitoring yourself:

AWS CloudWatch

import { CloudWatchClient, PutMetricDataCommand } from "@aws-sdk/client-cloudwatch";

const cloudwatch = new CloudWatchClient({});

async function logToolCall(toolName: string, duration: number) {
  await cloudwatch.send(new PutMetricDataCommand({
    Namespace: "MCP/Tools",
    MetricData: [{
      MetricName: "Duration",
      Dimensions: [{ Name: "Tool", Value: toolName }],
      Value: duration,
      Unit: "Milliseconds"
    }]
  }));
}

GCP Cloud Monitoring

const monitoring = require('@google-cloud/monitoring');
const client = new monitoring.MetricServiceClient();

// Similar setup for custom metrics

Enterprise Option: LeanMCP on Your Cloud

For enterprise customers who need to stay on AWS/GCP/Azure for compliance or existing infrastructure reasons, we offer a managed deployment option. We deploy our platform on your cloud account with our infrastructure code. You get:
  • Battle-tested infrastructure
  • Full monitoring and observability
  • No DevOps overhead on your team
  • Your data stays in your cloud
Contact us at [email protected] for enterprise deployments.

Comparison

ApproachSetup TimeDevOps RequiredMonitoring
DIY on Cloud500-600 hours6-7 engineersConfigure yourself
LeanMCP PlatformMinutesNoneBuilt-in
LeanMCP on Your CloudDaysOur teamBuilt-in

Recommendation

If you’re already deep in AWS/GCP/Azure and have DevOps resources, these guides help you get started. But for most teams, LeanMCP Platform is faster and cheaper than building infrastructure from scratch.