← Blog
MCPHosting

Where to host a remote MCP server in 2026

Yura Dubinin
Yura Dubinin

A remote MCP server is a Model Context Protocol server that answers on a public HTTPS URL instead of running as a local stdio process, and there are two kinds of place to host one. A long-running process (Fly.io, Railway, Render, Lizard or a VPS) keeps your server in memory and keeps billing while nobody calls it, unless the host can put it to sleep. A serverless platform (Cloudflare Workers, Vercel) starts code per request, costs nothing at idle and caps how long one call may run. Since MCP revision 2026-07-28 removed sessions from the protocol, both kinds can serve a plain tool server. The choice comes down to call length, in-process state and idle cost.

I work on Lizard, so weigh that row of the table accordingly. For a server that should stay in memory, deploy it as an app with lizard up --service mcp --port 8000; the steps are in the guide to deploy an MCP server on Lizard. To try a server on a public URL first, lizard sandbox create -t claude -s small followed by lizard sandbox expose <id> 8000 gives it an HTTPS address. That second route is the one I tested for this article, and the commands and client output are below.

What does a remote MCP server need from a host?

A remote MCP server needs a host that serves one HTTPS endpoint, accepts POST requests, and lets a response stream stay open. The requirements come from the Streamable HTTP transport in the MCP specification, revision 2026-07-28, which was the current revision when I checked on 22 November 2026.

  • One endpoint that accepts POST. Every JSON-RPC request is its own HTTP POST to a path such as /mcp. Revision 2026-07-28 removed the GET stream endpoint.
  • JSON or a stream as the answer. The server replies with application/json or with a Server-Sent Events stream that carries progress notifications and then the result. The host must not buffer that stream; the spec asks servers to send X-Accel-Buffering: no for nginx-style proxies.
  • No sticky sessions. Revision 2026-07-28 removed the initialize handshake and the Mcp-Session-Id header. Each request carries its protocol version, so any replica can answer any request.
  • Long calls that survive. Stream resumption is gone too: if a response stream breaks, the request is lost and the client must send it again. A host that cuts a connection at 60 seconds will kill a 90-second tool call.
  • TLS, an Origin check and auth. The spec says servers MUST validate the Origin header and SHOULD authenticate every connection.

Older clients still matter. The official TypeScript client SDK 2.4.0 negotiated revision 2025-11-25 with my test server by default, and that revision still starts with a handshake.

How do the remote MCP server hosting options compare?

Seven hosts cover most choices: two serverless platforms, four that run a long-lived process, and a plain VPS. Every figure comes from the vendor's own page, linked in the last column and checked on 22 November 2026.

HostProcess modelRequest and stream limitsAt idleAuth helpEntry priceSource
Cloudflare WorkersServerless, code runs per requestNo wall-clock limit while the client stays connected; CPU time 30 s by default, up to 5 min on PaidNo usage billedWorkers OAuth Provider library, stateless createMcpHandler templateFree: 100,000 requests a day, 10 ms CPU each. Paid: from $5 a month with 10 million requestspricing, limits, MCP guide
Vercel FunctionsServerless (Fluid compute)300 s on Hobby; on Pro 300 s by default, 800 s maximumBilled for use onlymcp-handler checks bearer tokens and serves OAuth metadata; you bring the authorization serverHobby $0; Pro $20 a month with $20 of usage creditpricing, limits, MCP guide
Fly.ioLong-running Machineidle_timeout in fly.toml closes idle connections; no request duration limit stated on the pages I checkedRuns all month, or autostop: a stopped Machine bills $0.15 per GB of root disk a month and takes about 2 s or more to startSDK middleware$2.19 per 30 days for 1 shared CPU and 256 MB, always onpricing, autostop
RailwayLong-running containerA request runs up to 15 min while data flows; closed after 5 min with no dataFree plan sleeps after 5 to 10 min without outbound traffic; Hobby and above stay onSDK middlewareFree $0 with $1 of usage a month; Hobby $5 minimumpricing, limits
RenderLong-running containerNot stated on the pages I checkedA Free web service spins down after 15 min without traffic and takes about a minute to wakeSDK middlewareFree $0 with 512 MB; $7 a month for 0.5 CPU and 512 MB (plan 0.5c-512mb, formerly Starter)pricing, Free limits
LizardLong-running container (lizard up)The limits page lists none; a 150 s streamed call passed in my sandbox testAlways on by default; lizard sleep --on sleeps the service after 10 min without requestsSDK middlewareLizard Pro $19 a month with $19 of usage included; 7-day trial, card required, $5 of usagepricing, guide
VPS (Hetzner Cloud)Your process behind your own reverse proxyWhatever your proxy allowsFlat monthly priceSDK middlewareFrom €5.49 a month before VAT (CPX02: 1 vCPU, 1 GB RAM)Hetzner Cloud

"SDK middleware" means the host adds nothing for MCP and you verify tokens in the server, for example with requireBearerAuth from @modelcontextprotocol/express.

Pick Cloudflare Workers when calls are short and traffic is uneven: idle costs nothing and the Free allowance is large. Pick Vercel when the MCP server lives inside a Next.js app. Pick a long-running host when tools run for minutes, hold a database pool or shell out to a binary. For a wider look at those hosts, see my list of the best PaaS providers and the page on Lizard vs Cloudflare Workers.

Should a remote MCP server run serverless or as a long-running process?

Run a remote MCP server serverless when every tool call is short and keeps no state in memory, and run it as a long-running process when a call can outlast the platform's limit or the server holds something between calls. Before revision 2026-07-28 the answer leaned toward a process, because a session lived in one server's memory. The 2026-07-28 changelog removed protocol-level sessions, and the TypeScript SDK now builds a fresh server instance for each request, which is the serverless model.

Three things still favor a process.

Long calls come first. Vercel ends a function at 300 seconds on Hobby and at 800 seconds at most on Pro, according to its limits page. Cloudflare has no wall-clock limit while the client stays connected, but CPU time stops at 30 seconds by default and 5 minutes at most on the Paid plan. A process has only the proxy's limit: Railway allows 15 minutes while data keeps flowing.

Open streams are the second. A client that wants change notifications sends subscriptions/listen and the response stream stays open. On a serverless platform that open stream is a running invocation, so it ends at the duration limit and the client has to reconnect.

State is the third. A Postgres pool, a cache, files on disk or a child process survive between requests in a process. The SDK documentation tells you to create pools once at module scope, and on serverless that scope can disappear after any request.

Serverless wins on idle cost. My test server held 82.5 MB of memory with no traffic (Node.js 22.23.2, measured with ps on 22 November 2026). On Lizard, where app memory costs $9.13 per GB a month, that is 0.0825 × $9.13 = $0.75 a month of metered memory. CPU is metered too, at $18.26 per active vCPU a month, so an idle server adds little; both come out of the $19 of usage in Lizard Pro. On Workers the same idle month meters nothing.

How do you turn a stdio MCP server into a remote one?

To turn a stdio MCP server into a remote one, keep the tools and swap the entry point: the stdio transport becomes an HTTP handler behind a host check and a token check. With version 2 of the TypeScript SDK (@modelcontextprotocol/server 2.4.0, which implements revision 2026-07-28), the tools sit in one factory that both entry points share.

// tools.mjs
import { McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod/v4';

export function buildServer() {
  const server = new McpServer({ name: 'demo', version: '1.0.0' });
  server.registerTool(
    'add',
    { description: 'Add two numbers', inputSchema: z.object({ a: z.number(), b: z.number() }) },
    async ({ a, b }) => ({ content: [{ type: 'text', text: String(a + b) }] })
  );
  return server;
}

The stdio entry point is two lines: import { serveStdio } from '@modelcontextprotocol/server/stdio' and serveStdio(buildServer). The remote one adds Express, the allowed host names and a bearer token:

// http.mjs
import { createMcpExpressApp, requireBearerAuth } from '@modelcontextprotocol/express';
import { toNodeHandler } from '@modelcontextprotocol/node';
import { createMcpHandler } from '@modelcontextprotocol/server';
import { buildServer } from './tools.mjs';

const port = Number(process.env.PORT ?? 8000);
const allowedHosts = process.env.MCP_ALLOWED_HOSTS.split(',');

// Swap this for your identity provider's token check before real users arrive.
const verifier = {
  async verifyAccessToken(token) {
    if (token !== process.env.MCP_TOKEN) throw new Error('invalid token');
    return { token, clientId: 'demo', scopes: [], expiresAt: Math.floor(Date.now() / 1000) + 3600 };
  },
};

const app = createMcpExpressApp({ host: '0.0.0.0', allowedHosts });
const mcp = toNodeHandler(createMcpHandler(buildServer));

app.all('/mcp', requireBearerAuth({ verifier }), (req, res) => void mcp(req, res, req.body));
app.listen(port, '0.0.0.0', () => console.error(`MCP on :${port}/mcp`));

Three details cost me time. Binding to 0.0.0.0 switches off the SDK's localhost protection, so allowedHosts has to name the public host. The verifier has to return expiresAt, or the middleware answers 401 with "Token has no expiration time". And the older package, @modelcontextprotocol/sdk 1.32.2, stops at revision 2025-11-25, so a server built on it does not speak the current one.

The packages I installed were @modelcontextprotocol/server 2.4.0, @modelcontextprotocol/node 2.1.2, @modelcontextprotocol/express 2.0.2, express 5.3.0 and zod 4.6.7.

How do you deploy an MCP server on Lizard?

To put an MCP server on a public URL on Lizard for a test, create a sandbox, copy the files in, expose the port and start the process. I ran these commands on 22 November 2026 with Lizard CLI 4.0.134. Lizard Sandboxes are Firecracker microVMs, and a Small one (2 vCPU, 4 GB RAM) costs $0.0162 an hour, billed per second.

lizard sandbox create -t claude -s small --timeout 900000 --json
lizard sandbox files put <id> package.json /root/mcp/package.json   # repeat for tools.mjs and http.mjs
lizard sandbox expose <id> 8000
lizard sandbox exec <id> -- sh -c "cd /root/mcp && npm install && \
  (MCP_TOKEN=s3cret MCP_ALLOWED_HOSTS=<hostname> nohup node http.mjs > server.log 2>&1 &)"

expose prints a hostname and a url that ends in ?lizard_token=.... The sandbox proxy answered 401 without that token, so keep it in the address you give the client, https://<hostname>/mcp?lizard_token=<token>, or send it in an X-Lizard-Access-Token header, as the preview URL docs describe. An MCP client built on @modelcontextprotocol/client 2.4.0, run from another machine against that address, printed:

protocol: 2025-11-25
tools: [ 'add' ]
add(2, 3) = 5

The same endpoint answered a single revision 2026-07-28 POST from curl, with no handshake before it, with "resultType":"complete". A request without the bearer token got 401, and a request with the wrong Host header got 403. To test streaming I added a tool that reports progress every 5 seconds: all 30 notifications arrived on time and the call returned after 150.2 seconds, so the proxy did not buffer the stream. Claude Code 2.1.330 reported the server as connected after claude mcp add --transport http demo <url> --header "Authorization: Bearer s3cret" when I ran both on one machine. lizard sandbox rm <id> deletes the sandbox.

A sandbox is a test bed. During the trial every sandbox is deleted one hour after it starts at the latest, and on a paid plan a sandbox stops after 596 hours at most. For a server that stays up, deploy the same files as an app by following the guide, which ends with lizard up --service mcp --port 8000; I checked that command's flags with --help and did not run it for this article. If the server only wraps a database, compare it with what a Postgres MCP server already does.

How do you secure a remote MCP server?

Secure a remote MCP server with an Origin and host check, a token on every request and an access check per user inside each tool. The Streamable HTTP section of the MCP specification says servers MUST validate the Origin header and answer 403 when it is invalid, and SHOULD authenticate all connections. Five of the nine organic results Google returned for "remote mcp server" on 22 November 2026 were copies of an "authless" template. That is fine for a demo and unsafe for any tool that reads private data.

The authorization section of revision 2026-07-28 builds on OAuth 2.1. The MCP server acts as a resource server: it checks access tokens and publishes OAuth 2.0 Protected Resource Metadata (RFC 9728), which tells the client where the authorization server is. A separate authorization server signs users in. The same revision deprecates Dynamic Client Registration and prefers Client ID Metadata Documents.

A static bearer token, like the one in the example above, is enough for a server only you call. For other people's accounts, use an identity provider and scopes. Cloudflare documents its Workers OAuth Provider for this (OAuthAuthorizationServer and OAuthResourceServer), and Vercel's mcp-handler verifies tokens and serves the metadata document. On the other five hosts the SDK's requireBearerAuth and mcpAuthMetadataRouter do the same job.

FAQ

Can you host a remote MCP server for free? Yes, on some hosts. Cloudflare's Workers Free plan allows 100,000 requests a day with 10 ms of CPU time each, and Vercel's Hobby plan costs $0. Render's Free web service spins down after 15 minutes without traffic and takes about a minute to wake. Lizard starts with a 7-day trial that needs a card and includes $5 of usage; after it, Lizard Pro costs $19 a month. All figures are from the vendors' pages on 22 November 2026.

Does a remote MCP server still need SSE? Only as a response format. The older HTTP+SSE transport is deprecated in the MCP specification. Streamable HTTP, its replacement, lets a server answer a POST with plain JSON or with a Server-Sent Events stream when it wants to send progress before the result.

Does a remote MCP server need sticky sessions? Not under revision 2026-07-28, which removed protocol-level sessions and the Mcp-Session-Id header. Clients that speak revision 2025-11-25 or earlier still open with a handshake. Version 2 of the TypeScript SDK serves them from the same stateless handler by default, according to its documentation.

Build with AI. Ship with Lizard

You don't need a platform team to go live. Your whole cloud, one CLI command away.

Start 7-day trial
Services
—
Add-ons
—
Deployments
—
Sandbox starts
—

We use cookies for essential site functionality and analytics. See our Cookie Policy.