DigitalOcean
Run your MCP server on App Platform, built from your GitHub repository
DigitalOcean App Platform builds your server from a GitHub repository and redeploys it on every push. It provides HTTPS on a *.ondigitalocean.app address, restarts the server if it stops, and lets you add a custom domain. It's a good fit when you want a managed deployment without writing infrastructure code.
App Platform builds from your Dockerfile when the repository has one. Clients connect to https://<your-app>.ondigitalocean.app/mcp.
Before you start
Push your project, including the Dockerfile from Deploy with Docker, to a GitHub repository. You need a DigitalOcean account connected to GitHub, and the doctl CLI if you deploy from the terminal.
Deploy with an app spec
An app spec is a YAML file that describes the app: where the code comes from, how it's built, which port it listens on, and its environment variables. Keeping it in the repository means the deployment is reviewed and versioned like any other code.
Add the spec to your repository
Save this file as .do/app.yaml, with your repository's name:
name: mcp-server
services:
- name: server
github:
repo: your-username/mcp-server
branch: main
deploy_on_push: true
dockerfile_path: Dockerfile
http_port: 3000
instance_count: 1
instance_size_slug: basic-xxs
health_check:
http_path: /mcp/health
envs:
- key: NODE_ENV
value: production
- key: HOST
value: 0.0.0.0
- key: MCP_TRANSPORT_TYPE
value: http
- key: JWT_SECRET
type: SECRET
value: your-secret-valueCreate the app
Create the app from the spec:
doctl apps create --spec .do/app.yamlYou can also create the app in the DigitalOcean console: choose Create App, pick the repository, and App Platform detects the Dockerfile. Set the HTTP port to 3000 and add the environment variables there.
Find the address
List your apps to find the new one's URL:
doctl apps listThe Default Ingress column shows the app's URL. Your MCP endpoint is that URL followed by /mcp.
Secrets
Environment variables with type: SECRET are encrypted, and App Platform replaces their values in the spec with an encrypted reference after the first deploy. Change them later in the console under Settings, or with doctl apps update.
Health checks and logs
The health_check entry points App Platform at the built-in /mcp/health endpoint. A new deployment only receives traffic after the check passes, so a broken build never replaces a working one.
Stream the server's output from the terminal:
doctl apps logs <app-id> server --type run --follow