Skip to main content

Docker

Every generated server includes a production-ready Dockerfile:
# Build
docker build -t my-api-mcp .

# Run with stdio transport
docker run --env-file .env my-api-mcp

# Run with SSE transport (network accessible)
docker run -p 8000:8000 --env-file .env my-api-mcp --transport sse

Cloud deployment

The server is standard Python — deploy it anywhere you can run Python 3.11+:
  • AWS — ECS, Lambda (with SSE transport), EC2
  • Google Cloud — Cloud Run, GCE, GKE
  • Azure — Container Apps, ACI, AKS
  • Railway, Render, Fly.io — Container-based platforms
  • VPS — Any Linux server with Python installed

Example: Docker Compose

docker-compose.yml
services:
  mcp-server:
    build: .
    ports:
      - "8000:8000"
    env_file:
      - .env
    command: ["python", "server.py", "--transport", "sse", "--port", "8000"]
    restart: unless-stopped

Connecting remote MCP clients

When running with SSE or streamable-http transport, MCP clients connect over the network:
{
  "mcpServers": {
    "my-api": {
      "url": "http://your-server-host:8000/sse"
    }
  }
}
If exposing over the internet, add a reverse proxy (nginx, Caddy) with TLS termination. The generated server does not include TLS by default.