NodeOps
UK
Blog/Where to Host an MCP Server With Persistent Storage in 2026

May 29, 2026

9 min read

Where to Host an MCP Server With Persistent Storage in 2026

C

CreateOS

Where to Host an MCP Server With Persistent Storage in 2026

The answer (first 100 words)

Host a stateful MCP server somewhere that gives you a persistent volume, a managed database, and a warm long-lived process — not an ephemeral serverless function. The moment your MCP server holds a database connection, a vector store, or session memory across tool calls, serverless and free edge hosts break it: cold starts wipe in-memory state, there is no disk that survives a redeploy, and the Mcp-Session-Id the spec hands you points at memory that no longer exists. CreateOS runs your server as a warm pod with managed PostgreSQL and Valkey on a $0 tier — the simplest fit for persistent-storage MCP.

Why persistent storage changes the whole hosting decision

A stateless MCP server — one that wraps a weather API or a unit converter — runs fine almost anywhere. This post is the other half: what happens the moment your server has to remember something.

The line is sharp. A stateful MCP server holds at least one of these between calls:

  • A database connection to read and write records (a CRM tool, a task tracker, an inventory lookup).
  • A vector store for retrieval — embeddings you paid to compute and don't want to recompute on every request.
  • Session memory — the conversation or workflow context tied to an Mcp-Session-Id, so call #2 knows what call #1 did.

The MCP specification explicitly supports this. The Streamable HTTP transport says a server "MAY assign a session ID at initialization time" and that servers "want to establish stateful sessions" via the Mcp-Session-Id header (modelcontextprotocol.io). The protocol assumes some servers persist state. Your host has to make that possible.

The four ways ephemeral hosts break a stateful MCP server

This is the part generic hosting advice skips. Here is exactly how a "free" serverless or edge host fails the moment state enters the picture.

1. Cold starts wipe in-memory state

Serverless functions spin down when idle and spin back up cold. Any session map, cache, or open connection you held in memory is gone. The next Mcp-Session-Id your client sends points at nothing — and per the spec, the server "MUST respond to requests containing that session ID with HTTP 404 Not Found" once the session is gone, forcing the client to re-initialize. Your agent loop silently restarts mid-task.

2. There is no persistent volume

Vercel Functions run on AWS Lambda's model: the filesystem is read-only except for /tmp, and /tmp is ephemeral — it does not survive between invocations or redeploys. A SQLite file, a downloaded model, a cached embedding index written to disk simply vanishes. Vercel's own docs route stateful workloads away from functions entirely, noting that for code that needs to "maintain state for minutes to months" you need a different primitive (vercel.com/docs).

3. Connection-pool exhaustion

Each serverless invocation can open its own database connection. Under an agent firing dozens of tool calls, you hit the connection ceiling fast. Vercel caps functions at 1,024 file descriptors shared across all concurrent executions — and database connections count against that limit (vercel.com/docs). A warm, single-process server reuses one pooled connection; a fan-out of cold functions does not.

4. CPU and memory ceilings kill the work

Cloudflare Workers' free plan gives you 10 ms of CPU time per request and 128 MB of memory per isolate (developers.cloudflare.com). That is enough for a proxy, not for a tool that runs an embedding lookup or a multi-step LLM reasoning step. And Workers have no local disk at all — persistence means paying separately for KV or Durable Objects and rewriting your data layer around them.

What a persistent-storage MCP host actually needs

We recommend scoring any host against these five requirements. A persistent-storage MCP server needs all five; a stateless one needs none.

RequirementWhy it matters for stateful MCPServerless / edge default
Warm, long-lived processHolds session state and pooled connections between calls❌ Cold starts, ephemeral
Managed databaseDurable reads/writes (Postgres for relational, Redis/Valkey for fast session state)❌ Bring your own, external
Persistent volumeSurvives redeploys — SQLite files, embedding indexes, model caches/tmp only, wiped
Generous CPU/memoryEmbedding lookups and multi-step reasoning exceed 10 ms / 128 MB❌ Hard ceilings
Stable URL + session continuityMcp-Session-Id must resolve to live state on the same backend⚠ Possible, but state is gone

The pattern is clear: every requirement that a stateful MCP server has is a thing serverless was designed not to provide. Serverless trades persistence for elastic scale. MCP servers with storage want the opposite trade.

Where CreateOS fits

CreateOS runs your MCP server as a warm pod, not a function — so the process stays alive and your session map, connection pool, and in-memory cache survive between calls. It ships managed storage — PostgreSQL and Valkey (a Redis-compatible store ideal for session state) — provisioned from the dashboard with no external provider to wire up. CreateOS lists "persistent compute for long-running agents" as a first-class capability, alongside "persistent compute, managed databases, GPU compute" and "MCP server hosting with auto-discovery via mcp-tool.json."

Concretely, that maps to the five requirements:

  • Warm process → 0 cold start; the pod stays up.
  • Managed database → Postgres for relational state, Valkey for sub-millisecond session lookups.
  • Persistent volume → durable storage that survives redeploys.
  • CPU/memory → headroom for embedding and reasoning steps, not a 10 ms cap.
  • Stable URL → a fixed *.createos.sh URL so Mcp-Session-Id always resolves to the same backend.

All of this is available on the $0 free tier — free to start. CreateOS has been in production for 3 years and runs workloads at the scale of a 75-day industrial pilot that processed 50,000+ hours of video (75 TB) through the platform without the customer staffing a DevOps team.

How to deploy a stateful MCP server on CreateOS

The fastest path is to start from a pre-wired template rather than provision storage by hand.

  1. Pick a template from the MCP server templates — there are 150+ production-ready templates in the marketplace, with patterns for database querying, CRM integration, and retrieval that already include a storage layer.
  2. Attach managed storage — provision Postgres or Valkey from the dashboard in a click; the connection string is injected as a secure env var, never bundled in code.
  3. Deploy — push from GitHub or upload directly; live URL in under 2 minutes.
  4. Register the URL with your AI client. The mcp-tool.json discovery file ships in every CreateOS MCP template, so clients introspect your tools automatically.

Because the process is warm and the database is managed, your Mcp-Session-Id resolves to live state on every call — the stateful behavior the spec assumes, without the failure modes serverless introduces.

About CreateOS

CreateOS is the unified execution layer for AI, built under NodeOps. It coordinates the full AI lifecycle — infrastructure, compute, LLM orchestration, agent deployment, and monetization — in one place instead of three. The platform is multi-tenant by default with on-prem and air-gapped options for regulated industries, runs on NodeOps orchestration (89K+ machines, 24K+ providers), and is used in production by everyone from indie builders shipping apps in hours to enterprise pilots processing tens of thousands of hours of data. Learn more at createos.sh.

Common questions

Where should I host an MCP server with persistent storage?

Host it on a platform that gives you a warm, long-lived process plus a managed database and persistent volume — not an ephemeral serverless function. CreateOS runs your MCP server as a warm pod with managed PostgreSQL and Valkey on a $0 tier, so session state and database connections survive between tool calls. Serverless hosts wipe in-memory state on cold start and offer no durable disk.

Why can't I run a stateful MCP server on serverless?

Serverless functions spin down when idle and lose all in-memory state on the next cold start, so session maps and open connections disappear. They also have no persistent disk — Vercel functions only get an ephemeral /tmp that is wiped between invocations. For a server that holds a database connection, a vector store, or session memory, those are disqualifying failures.

Does the MCP spec support stateful servers?

Yes. The MCP Streamable HTTP transport lets a server assign an Mcp-Session-Id header at initialization for servers that "want to establish stateful sessions." Once a session exists, the client must send that ID on every subsequent request, and the server must return HTTP 404 if the session is gone. This requires a backend that keeps session state alive between calls.

What database should an MCP server use for session state?

Use a relational database like PostgreSQL for durable records and a fast key-value store like Redis or Valkey for session state and caching. Valkey gives sub-millisecond reads for session lookups tied to an Mcp-Session-Id, while Postgres handles structured data the tools read and write. CreateOS provides both as managed services with no external provider to configure.

How do cold starts affect an MCP server?

Cold starts wipe everything held in memory — session maps, connection pools, cached embeddings. The next call referencing an existing Mcp-Session-Id finds nothing, and the server must respond with HTTP 404, forcing the client to re-initialize mid-task. A warm, long-lived process avoids this entirely because the state never leaves memory between calls.

Can I host a persistent MCP server for free?

Yes. CreateOS includes managed PostgreSQL and Valkey, a persistent volume, and a warm always-on pod on its $0 free tier. This is the stateful counterpart to free stateless hosting — most free serverless tiers cannot persist state at all, so "free" stops being free once you add a database or a vector store.

What's the difference between stateless and stateful MCP hosting?

A stateless MCP server (a weather lookup, a converter) holds nothing between calls and runs fine on serverless or edge hosts. A stateful one holds a database connection, a vector store, or session memory and needs a warm process with persistent storage. The two have opposite hosting requirements, which is why the right host depends entirely on whether your server remembers anything.

Next step

Deploy a stateful MCP server free at createos.sh — $0 tier, free to start, with managed Postgres and Valkey wired in. Start from an MCP server template that already includes a storage layer, or push your own repo and attach a database in one click.

Share

Share on

100,000+ Builders. One Workspace.

Get product updates, builder stories, and early access to features that help you ship faster.

CreateOS is a unified intelligent workspace where ideas move seamlessly from concept to live deployment, eliminating context-switching across tools, infrastructure, and workflows with the opportunity to monetize ideas immediately on the CreateOS Marketplace.