We earn commissions when you shop through links on this page. How this works →

How to host an MCP server

What an MCP server needs to run somewhere other than your laptop, and what six options cost. Prices are list prices from each vendor's official pricing page, checked 2026-10-24. We run one remote MCP server ourselves, on Netlify; we have not tested hosting on the other platforms.

TL;DR
  • Only you use it: stdio, $0.
  • Stateless server, short tool calls: Netlify or Cloudflare Workers, $0 tiers.
  • Needs SSE or sessions: Fly.io from $2.19 per 30 days, Railway $5/month, DigitalOcean $5/month.

Prices · Which to pick · FAQ

What hosting an MCP server involves

stdio or remote (Streamable HTTP)

The MCP spec defines two standard transports (spec). With stdio, the client starts your server as a child process and talks over stdin/stdout. Nothing is hosted, nothing is public, and it costs $0. With Streamable HTTP, your server is a URL that accepts JSON-RPC over POST; it may reply with plain JSON or open an SSE stream, and may accept GET for a server-to-client stream. Only remote servers need hosting.

Auth

A remote URL is reachable by anyone who finds it. The spec describes OAuth-based authorization for HTTP transports (authorization). At minimum, keep API keys in the host's environment variables, never in the client config you share. See our API key rotation checklist and MCP servers that need an API key.

Cold starts

Serverless functions and scaled-to-zero containers start on the first request after idle. That adds latency, and some platforms document an error on the first request after sleep (Railway says it “may return a 502”). Agents may retry or give up, so check your client's timeout.

Long-lived connections

SSE streams and stateful sessions (Mcp-Session-Id) want a process that stays up. Some function platforms cut requests at a fixed limit (Netlify: 60 seconds, including streamed responses). Cloudflare Workers has no wall-clock limit on HTTP requests, but limits CPU time and may end connections during runtime updates (up to 20 minutes' grace) (limits). If your tools run long or stream progress, pick a container or VM, or keep the server stateless with short tool calls.

A real example: our registry endpoint on Netlify

https://testedmcp.com/mcp is our own read-only MCP server. It runs as a single Netlify function (config.path = '/mcp'), stateless, Streamable HTTP with JSON responses only, no auth and no storage. It answers initialize, ping, tools/list and tools/call over POST (four read-only tools: search_servers, get_score, is_deprecated, get_replacement); notifications get 202, bodies over 64 KB get 413. It issues no Mcp-Session-Id, returns JSON only and never opens an SSE stream, so GET returns 405. The code sets no custom timeout; each call is a short in-memory lookup. On Oct 24, 2026 single POSTs from our test box returned 200 in about 0.2 s (0.16 s initialize, 0.17 s ping; spot checks, not a benchmark). This design fits a function host because every call is short and holds no session.

Hosting options and prices (checked 2026-10-24)

Prices in USD as listed. Usage beyond included amounts is extra. “Not stated” means we did not find it on the official pages we read.

OptionFree tierCheapest paid tierMCP caveats (from the docs)Deploy (official docs)Source (checked 2026-10-24)
Local (stdio)$0: runs on your own machinen/aOnly the client on that machine can use it. No public URL, no cold start, no hosting bill.Add the server to your client's config as a command; nothing to deployn/a (no vendor)
Netlify Functions$0/month, 300 creditsPersonal $9/month (1,000 credits); Pro $20/month (3,000 credits). Compute 10 credits per GB-hour; 2 credits per 10k web requestsSynchronous functions: 60-second limit, not configurable. Streamed responses: 60 seconds, 20 MB. Buffered request/response payload: 6 MB. Background functions: 15 minutes but reply 202 at once, so not usable for an MCP response. Sleep on idle: not stated (functions are ephemeral per request).Deploy: Netlify Functions quickstartpricing page · limits · streaming
Cloudflare Workers$0: 100,000 requests/day, 10 ms CPU per invocationWorkers Paid $5/month minimum: 10 million requests + 30 million CPU-ms included; $0.30 per extra million requests, $0.02 per extra million CPU-msDuration (wall clock): not charged and not limited for HTTP requests on either plan; CPU time max 5 min per request on paid (default 30 s). 128 MB memory per isolate; response body size not limited. Free plan's 10 ms CPU can be tight for heavy tool calls. Long-lived sessions usually need Durable Objects (billed for wall-clock duration unless hibernating).Deploy: Cloudflare Workers remote MCP guidepricing page · limits
RailwayFree $0 with $1/month usage credit (1 vCPU / 0.5 GB per service, 0 custom domains); Free Trial $5 one-time credit for 30 daysHobby $5/month incl. $5 usage; usage about $10 per GB RAM and $20 per vCPU per month, billed per secondAlways-on container, so long connections are possible. Optional Serverless (app sleeping) puts a service to sleep after 5–10 min with no outbound traffic; the first request after sleep may be slow or return 502. Request timeout: not stated on the pages we read.Deploy: Railway quickstartpricing page · sleeping
DigitalOcean App Platform$0, static sites only (3 apps). An MCP server needs a container, which is paid$5/month: shared fixed 1 vCPU / 512 MiB, 50 GiB transferAlways-on container. Request timeout and SSE limits: not stated on the pricing page. Sleep on idle: not stated.Deploy: DigitalOcean App Platform quickstartpricing page
DigitalOcean DropletsNo free tier stated; the pricing FAQ mentions a $5 credit for 90 days for some new usersBasic $4/month: 512 MiB, 1 vCPU, 500 GiB transfer, 10 GiB SSD (per-second billing, monthly cap)A plain VM: no platform timeout or sleep, but you run the OS, TLS, reverse proxy and updates yourself.Deploy: DigitalOcean Droplets quickstartpricing page
Fly.ioNo free tier. Trial: up to 2 hours of Machine runtime or 7 days, no cardPay as you go, no platform fee: shared-cpu-1x 256 MB $2.19 per 30 days always-on (iad/ewr); 512 MB $3.69Optional autostop/autostart: a stopped Machine costs only rootfs ($0.15/GB per 30 days); Fly says a cold start takes about 2 s or more, a few hundred ms from suspend. Request timeout: not stated on the pages we read.Deploy: Fly.io quickstartpricing page · autostop

Which to pick

None of these picks is based on our own hosting tests except Netlify; they follow from each vendor's documented limits. We did not time how long setup takes on any host, so we make no claim about which is fastest to deploy.

Affiliate DigitalOcean Droplets (we may earn a commission; it does not change this table).

FAQ

Do I need to host my MCP server at all?

No, not if only you use it. A stdio server runs on your own machine, launched by your client, for $0. Host it only when other people or remote agents need a URL.

What is the cheapest way to host a remote MCP server?

On Oct 24, 2026 list prices: Cloudflare Workers and Netlify have $0 tiers with limits; Fly.io starts at $2.19 per 30 days for an always-on 256 MB Machine; DigitalOcean Droplets start at $4/month; DigitalOcean App Platform containers and Railway Hobby start at $5/month. We have not tested hosting an MCP server on any of these except Netlify.

Can an MCP server run on serverless functions?

Yes, if it is stateless and each response fits inside the platform's time limit. Our own registry endpoint at https://testedmcp.com/mcp is a stateless Streamable HTTP server running as a Netlify function. Netlify's synchronous limit is 60 seconds.

Does my server need SSE?

Streamable HTTP lets a server answer with plain JSON or with an SSE stream. A read-only server with short tool calls can answer with JSON only, as ours does; GET returns 405. Servers that push progress or notifications need streaming and a host that keeps the connection open.

Does a hosted MCP server need auth?

If it can read private data or take actions, yes. The MCP spec defines OAuth-based authorization for HTTP transports. A public read-only server like ours uses none. Which auth you need depends on your server; this guide does not rate any setup.

Did you test every host on this page?

No. Prices and limits come from each vendor's official pages, checked Oct 24, 2026. The only host we run an MCP server on is Netlify. We have not tested anything else.

What we haven't tested

  • Hosting an MCP server on Cloudflare, Railway, DigitalOcean or Fly.io.
  • Cold-start times on any platform (the Fly.io figure is Fly's own).
  • Request timeouts that vendors did not state on the pages we read.
  • Any auth setup.

How we test: methodology. Affiliate policy: disclosure.

Sources (accessed 2026-10-24)

Prices checked 2026-10-24