Minimal server shape
Production rules
- read
PORTfrom the environment - bind to
0.0.0.0 - use the HTTP transport
- store secrets in environment variables
- use
/mcp/healthfor health checks
Install and start
Install dependencies with Bun:Docker baseline
If your host deploys containers, this is a good starting Dockerfile:Verify the app
After the process starts, verify the built-in health endpoint:200 response.
Where to use this
- Railway if you want the simplest managed hosting flow
- Fly.io if you want a containerized VM deployment
Common mistake
Do not assumestdio is interchangeable with HTTP in production. Hosted Bun deployments should expose the HTTP transport unless you are building a local-only integration.