How to Host an MCP Server

7 Real Deployment Options Compared for 2026

Alexander Gusev

Founder, Planetary Labour

You have a working MCP server on your laptop — if you don't yet, start with our guide to building one — and now you need to host it somewhere a real client can reach it — Claude Desktop, Claude Code, Cursor, or your own product. That decision matters more than it looks: the wrong host means unnecessary cold starts, an OAuth flow you have to build from scratch, or a bill that scales badly. This guide compares every practical way to host an MCP server in 2026, with real pricing, so you can pick in five minutes instead of a weekend.

Key Takeaways

  • Cloudflare Workers is the fastest path to a remote MCP server — a free tier covering 100,000 requests/day, built-in OAuth, and zero cold starts for Streamable HTTP transport
  • Self-hosting on a $6/month VPS still makes sense when you need full control over auth, networking, or data residency
  • Stateful or SSE-based MCP servers generally belong on Railway or Fly.io, which keep a persistent process alive instead of recycling it between requests
  • Compute-heavy tools (embeddings, image models, batch jobs) are cheaper on Modal, which bills GPU and CPU time per second

MCP Hosting Economics, 2026

$5/mo
Cloudflare Workers Paid — 10M requests included
100k/day
Requests on the Cloudflare Workers free tier
~$6/mo
Typical entry-level self-hosted VPS (Hetzner, DigitalOcean)
$1.94/mo
Smallest Fly.io shared-CPU machine, billed per second

Sources: Cloudflare Agents docs, Cloudflare Blog

How to Choose Where to Host Your MCP Server

Before comparing platforms, answer three questions about your server. They eliminate most of the options faster than reading feature lists.

1. Is your server stateless or stateful?

A stateless MCP server that just wraps an API call fits serverless platforms well. A server that holds a long-lived connection, an in-memory session, or streams events over Server-Sent Events wants a persistent process instead — that rules out pure function-as-a-service platforms unless they offer a durable-state primitive.

Durable state without a persistent server

Cloudflare Workers is the exception here: Durable Objects let a stateless-looking Worker keep per-session state without you running a server process at all.

When this matters in practice

Multi-step tool calls that need to remember context between requests, long-running jobs a client polls for status, or rate-limiting state scoped to a single user session.

Fine print

Durable Objects are billed separately from standard Worker requests, so a stateful design on Cloudflare is not automatically as cheap as the headline Workers pricing.

2. Do you need remote access, or is local enough?

If only you, on your own machine, will ever call this MCP server, stdio transport and zero hosting is the right answer — skip everything below and run it locally from your client config. Hosting only becomes necessary once a teammate, a hosted product, or a client that cannot spawn local processes (a web app, a mobile client) needs to reach it.

3. What does the tool actually do?

A tool that queries a database or calls a REST API is cheap to run anywhere. A tool that runs inference, renders video, or processes large files needs a platform that bills compute fairly and does not choke on function timeout limits.

The transport your host needs to support

As of the MCP specification's mid-2026 revisions, remote servers should speak Streamable HTTP — a single endpoint that handles JSON-RPC over HTTP POST and can upgrade to Server-Sent Events for streaming — rather than the older, deprecated HTTP+SSE transport. Every platform in this guide supports it; confirm any MCP framework or SDK you use has been updated to match before you deploy. See the official MCP specification changelog for the exact transport and auth requirements.

MCP Server Hosting Options Compared

A side-by-side view of the seven realistic ways to host an MCP server today, ranked by nothing except how commonly teams actually pick them.

PlatformBest forStarting priceCold startsBuilt-in OAuth
Self-hosted VPSFull control, compliance needs~$6/moNone (always on)No — you build it
Cloudflare WorkersFastest deploy, lowest ops burdenFree / $5/moNone (edge runtime)Yes — workers-oauth-provider
VercelNext.js-based MCP serversFree (Hobby) / $20/seatOccasionalYes — Vercel MCP adapter
RailwayStateful / SSE servers$5/mo Hobby, then usageNone (always-on process)No — bring your own
Fly.iostdio servers, cost optimizationFree allowance / ~$1.94/moAuto-suspend, fast resumeNo — bring your own
ModalGPU / compute-heavy toolsFree ($30/mo credit)Optional keep_warm (~$0.03/hr)No — bring your own
run.cloudTeams that want MCP-specific tooling out of the boxSee provider pricingManaged platformBuilt-in

Pricing reflects each provider's public pages as of August 2026. Confirm current numbers before committing — cloud pricing changes often.

Find Your Fit in 10 Seconds

Answer two questions and get a directional recommendation with a cost estimate. Then jump straight to that section for the full setup notes.

Interactive

Which MCP host fits you?

What matters most?

How much traffic?

Recommended

Cloudflare Workers

Deploy a single TypeScript file to the edge with built-in OAuth, Durable Objects for state, and no cold starts to worry about.

Free (100k requests/day)Jump to this section →

This is a directional estimate based on typical usage patterns, not a quote. Always check each provider's current pricing page before committing.

Self-Hosting: Full Control on Your Own Server

Self-hosting means running your MCP server as a long-lived process on infrastructure you fully control — a VPS from Hetzner, DigitalOcean, or your own hardware. Nothing beats it for control: you decide the network path, the TLS termination point, and exactly how OAuth tokens are validated and stored.

What a self-hosted setup needs

  • A small VPS — entry-level instances from Hetzner or DigitalOcean start around $5-6/month and are enough for most single MCP servers
  • Docker — containerizing the server keeps dependencies isolated and makes redeploys reproducible
  • A reverse proxy — Caddy or nginx in front of the container for TLS termination and routing
  • systemd or a process manager — to restart the container automatically if it crashes
  • An OAuth 2.1 resource server implementation — since none of this comes for free outside a managed platform

The real trade-off with self-hosting

You are trading platform convenience for full ownership. Uptime, security patches, TLS renewal, and OAuth correctness are entirely on you. That is the right trade for regulated data or unusual compliance requirements — it is the wrong trade if you just want a tool live in an afternoon.

Cloudflare Workers: The Fastest Path to a Remote MCP Server

Cloudflare Workers has become the default choice for teams that want to host an MCP server without managing any infrastructure. You deploy a single TypeScript file and get a globally distributed, Streamable HTTP-compliant remote MCP server at a *.workers.dev subdomain, with no VPS, no Docker, and no cold starts to plan around.

Why teams pick it

  • Generous free tier — 100,000 requests per day before you pay anything
  • $5/month Paid plan includes 10 million requests, which covers most production traffic for a single tool
  • OAuth out of the box — the workers-oauth-provider library adds authorization to your MCP endpoints without a separate auth service
  • Durable Objects — for MCP servers that need per-session state without running a persistent server

Read this before you deploy

Cloudflare publishes a step-by-step guide for building and deploying a remote MCP server, including the OAuth provider setup and Durable Objects pattern for stateful tools. Start with the official Cloudflare Agents documentation, and see the Cloudflare engineering blog post for the architecture rationale.

Vercel: Best for Next.js-Based MCP Servers

If your product is already a Next.js app on Vercel, hosting your MCP server there too avoids a second deployment pipeline entirely. Vercel's Hobby plan is free for non-commercial use; the Pro plan runs $20 per seat per month plus usage, which becomes the more relevant number once you are billing customers.

The trade-off is per-seat and usage-based billing that can surprise teams at scale — bandwidth and function invocation costs are the most common source of unexpectedly high bills on Vercel. For a single internal MCP tool alongside an existing Next.js app, that rarely matters. For a standalone, high-traffic MCP server, it is worth comparing against Cloudflare Workers or Fly.io before committing.

When Vercel is the right call

You are already deploying a Next.js app there, your MCP tools are stateless request/response calls, and you want one dashboard for both the product and the MCP endpoint.

Railway: Best for Stateful, Always-On MCP Servers

Railway runs your MCP server as a persistent, always-on process rather than a function that gets recycled between requests, which makes it the more natural fit for stateful or Server-Sent Events-based MCP servers. The Hobby plan is $5/month with a usage ceiling suitable for small tools; the Pro plan is usage-based with costs scaling by CPU-seconds and memory rather than a hard cap.

One-click Redis and Postgres add-ons are useful if your MCP server needs a database or cache alongside the tool logic itself — something you would otherwise have to wire up manually on a VPS.

Fly.io: Best for stdio MCP Servers and Cost Optimization

Fly.io bills primarily on compute (machine type times uptime), outbound bandwidth, and storage, with a free allowance that covers roughly two shared-CPU VMs, 3GB of persistent storage, and 160GB of outbound transfer. The smallest shared-CPU machine starts around $1.94/month, billed per second — and with auto-suspend, an idle MCP server can sit at close to zero cost between calls while still resuming fast when a request arrives.

Fly.io also ships a dedicated fly mcp launch workflow aimed specifically at deploying MCP servers, including ones that were originally written for stdio transport rather than HTTP — a case most other platforms on this list do not handle as cleanly.

Good fit for

Servers with bursty, unpredictable traffic where you want a real container (not just a function) but do not want to pay for one running 24/7.

run.cloud: Purpose-Built MCP Hosting

run.cloud takes a different approach from the general-purpose platforms above: instead of adapting a web or serverless host to fit MCP, it is built around the specific shape of hosting MCP servers — deployment, OAuth, and observability designed for the protocol rather than bolted onto it. For teams that want MCP-specific tooling without assembling reverse proxies, OAuth libraries, and monitoring themselves, that focus is the main appeal over a general-purpose cloud.

As with any newer, specialized platform, weigh it the same way you would weigh any hosting decision: check current pricing and feature scope directly on their site, and compare the total cost against the DIY combination of Cloudflare Workers plus a gateway if your needs are simple enough to not require a dedicated MCP platform.

Disclosure

Planetary Labour may receive compensation for run.cloud's placement in this guide. That does not change the ranking or recommendations elsewhere on this page — every comparison above is based on each provider's own published pricing and documentation, and we would make the same recommendations without this arrangement.

Security and Auth Checklist for Any Host

Whichever platform you choose, the same handful of security requirements apply once your MCP server is reachable over the internet:

  • Use OAuth 2.1 with short-lived tokens rather than long-lived static secrets
  • Validate every tool's required scope inside the handler itself, not just at the gateway
  • Rate-limit tool invocations per user or session to prevent runaway costs on usage-based platforms
  • Log every tool call for auditability, especially on tools that write data or spend money

For the full checklist across authentication, supply chain, and monitoring, see our complete MCP security guide. If you are running more than one MCP server, an MCP gateway centralizes a lot of this instead of reimplementing it per server.

MCP Servers Are Infrastructure. Your GTM Should Be Too.

Once your MCP server is hosted, the tools it exposes are only useful if something actually puts them to work. Explore the full directory of MCP servers and the wider landscape of agentic AI tools, or see how Planetary Labour runs an autonomous GTM engine — connected to tools like these through MCP — that posts, publishes, and builds authority around the clock.

Explore Planetary Labour

Frequently Asked Questions

What is the cheapest way to host an MCP server?

For low traffic, Cloudflare Workers is usually cheapest: the free tier covers 100,000 requests per day, and the Workers Paid plan is $5/month for 10 million requests. Fly.io is close behind, with a free allowance covering roughly two shared-CPU VMs and per-second billing that keeps idle MCP servers near zero cost.

Can I self-host an MCP server on my own VPS?

Yes. Self-hosting an MCP server on a VPS from a provider like Hetzner or DigitalOcean gives you full control over the process, TLS, and OAuth flow, typically for $5 to $6 a month. You are responsible for uptime, patching, and reverse proxy configuration yourself, which is the main trade-off versus a managed platform.

Do I need OAuth to host a remote MCP server?

If your MCP server is reachable over the internet and touches any private data or paid API, yes. The MCP specification recommends OAuth 2.1 for remote servers, with the server acting as an OAuth 2.1 resource server that validates tokens rather than issuing them itself. Local stdio-only servers do not need this.

What is the difference between hosting an MCP server and an MCP gateway?

Hosting an MCP server means running the actual tool implementation somewhere reachable by a client. An MCP gateway sits in front of one or more hosted servers to handle routing, auth, rate limiting, and observability across them, which matters more once you are running several servers rather than one.

Which platform is best for a stateful MCP server?

Platforms that keep a persistent, always-on process are the better fit for stateful or SSE-based MCP servers, since serverless functions can be recycled between requests. Railway and Fly.io are the most commonly recommended options for this, while Cloudflare Workers handles state through Durable Objects instead of a long-lived process.

Continue Learning