MCP Forge

How to deploy a secure MCP server

Docker, Fly, Railway, or a VPS. Updated 2026.

A remote MCP server is just an HTTP service, so it runs anywhere that runs your language. The part people skip is the security configuration that turns a working server into a safe one. This guide covers both.

Docker, the universal option

A multi-stage Dockerfile keeps the image small and runs as a non-root user. Build it, then pass your secrets and allowlists as environment variables at run time, never baked into the image.

docker run -p 8787:8787 \
  -e NODE_ENV=production \
  -e MCP_AUTH_TOKEN="$(openssl rand -hex 32)" \
  -e ALLOWED_ORIGINS=https://app.example.com \
  your-mcp-server

Fly, Railway, Render

The settings you must not skip

What about serverless and Cloudflare Workers?

If your server uses Node's http module, a fetch-handler runtime like Cloudflare Workers needs the web-standard transport instead. Your auth, rate-limit, and SSRF modules port over unchanged, only the entry point changes to a fetch handler.

A server that deploys this way out of the box

MCP Forge Kit includes a Dockerfile, a deploy guide for Fly, Railway, Render, and a VPS, plus the security config wired up and fail-closed in production.

Get MCP Forge Kit, €39

Related: Authentication · SSRF protection · Security checklist