The practical, end-to-end guide to shipping a remote MCP server that any AI client can actually connect to in 2026.
In December 2025, Anthropic handed the Model Context Protocol to the Linux Foundation with more than 10,000 active servers and over 97 million SDK downloads every month - Model Context Protocol Blog. A little over a year after it was a single Anthropic side project, MCP had become the way AI assistants reach the rest of software, backed by every major lab and cloud. Then, on 28 July 2026, the people who run the standard did something unusual for a protocol that had already won: they rewrote its core to be stateless, deleting the connection handshake and the session identifier that every tutorial had taught for eighteen months - Model Context Protocol Blog.
That last detail is why most of what you will read about building a remote MCP server is now quietly wrong. The old model treated a remote server like a phone call: the client dialed in, the two sides negotiated capabilities once, and a session ID kept them glued together for the rest of the conversation. The 2026 spec treats it like the web: every request stands alone, carries its own context, and can hit any server instance behind a load balancer. If you build for the old model in 2026, you inherit sticky sessions, awkward scaling, and a transport that is now formally deprecated. If you build for the new one, a remote MCP server becomes an ordinary web handler that scales to zero and runs for pennies.
This guide is the insider version. It starts high level (what a remote server is and why it suddenly got easy) and then goes deep: the exact spec revisions and what each changed, the transports and how Streamable HTTP works mechanically, the SDKs and frameworks worth using, two real build walkthroughs, a hosting comparison with real 2026 pricing, how to do OAuth 2.1 without creating a security incident, the genuine threat model (with the CVEs to prove it), how to publish to the registry so clients can find you, and where this is all heading. Along the way it treats managed platforms as a serious alternative, because for many teams the right answer is not to hand-build a server at all.
Contents
- What a remote MCP server actually is
- Why 2026 is the year the remote server got easy
- The protocol in one page: primitives, transports, lifecycle
- The 2026-07-28 revision: what stateless changes for you
- Choosing your stack: official SDKs, FastMCP, or a framework
- Building the server: two real walkthroughs
- Where to host it: platforms and real 2026 pricing
- Authorization: OAuth 2.1 without shooting yourself in the foot
- Security: the real threat model
- Publishing and discovery: the MCP Registry and marketplaces
- Adoption and the market: who is building, and how fast
- Managed alternatives, and when not to build your own
- Future outlook: where remote MCP goes next
- Conclusion: a decision framework
Before the detail, here is the single most useful table in the guide: a weighted scoring of the eight most common places to host a remote MCP server, judged on what actually matters for this workload. Each cell carries the real data behind its score, and the full pricing and reasoning appear in section 7. This table ranks general-purpose hosts where public pricing is verifiable; specialist MCP platforms (Smithery, Klavis, Gram) are covered in prose because their hosting prices are not consistently public.
| # | Host | What it is | MCP-native (25%) | Cost at small scale (25%) | Serverless fit (20%) | Dev experience (15%) | Production scale (15%) | Final |
|---|---|---|---|---|---|---|---|---|
| 1 | Cloudflare Workers | Edge runtime with native MCP handler | 10 - createMcpHandler + Agents SDK + workers-oauth-provider | 9 - $5/mo, 100k req/day free, no egress fees | 10 - V8 isolates, near-zero cold start, stateless-native | 10 - one-command wrangler deploy, templates | 9 - global edge, 5-min CPU cap/req | 9.6 |
| 2 | Vercel | Fluid-compute functions | 9 - mcp-handler package + zero-config xmcp | 7 - Hobby free (1M inv), Pro $20/user/mo | 8 - Fluid compute pauses CPU on I/O | 10 - best zero-config deploy | 8 - 800s max duration (1800s beta) | 8.3 |
| 3 | AWS Bedrock AgentCore | Managed agent + MCP runtime | 9 - Gateway turns APIs into MCP tools, GA Oct 2025 | 6 - $0.0895/vCPU-hr + memory + gateway fees | 8 - per-second billing, idle-free, 14-day sessions | 6 - powerful but AWS-heavy setup | 10 - identity, memory, observability built in | 7.8 |
| 4 | Google Cloud Run | Container serverless | 6 - no built-in MCP, clean container deploy | 8 - 2M req/mo free, scales to zero | 8 - request or instance billing modes | 7 - container build + gcloud deploy | 9 - Google infra, global | 7.5 |
| 5 | Fly.io | Firecracker microVMs | 5 - container, no MCP helpers | 9 - ~$2/mo (256MB), $0 while stopped | 8 - native auto-stop/start, fast resume | 7 - flyctl + Dockerfile | 8 - global microVMs | 7.4 |
| 6 | AWS Lambda + API Gateway | Classic serverless | 5 - DIY wiring, common pattern | 8 - 1M req free on both, pennies after | 8 - scales to zero, cold starts apply | 6 - Lambda + API Gateway plumbing | 9 - AWS scale | 7.1 |
| 7 | Railway | Container PaaS | 5 - container, opt-in sleep | 8 - $5/mo Hobby (incl. $5 credit) | 7 - opt-in app sleeping, 10-min idle | 8 - excellent developer UX | 7 - usage-based scale | 6.9 |
| 8 | Render | Managed web service | 5 - container | 6 - Free (cold starts), $7/mo Starter | 5 - only free tier scales to zero | 8 - simple, clean dashboard | 7 - flat instance tiers | 6.0 |
Criteria and weights: MCP-native support (25%) rewards built-in helpers, handlers, and OAuth glue so you write less plumbing. Cost at small scale (25%) reflects free tiers and the real entry price for a low-traffic server. Serverless fit (20%) rewards scale-to-zero and statelessness, which the 2026 spec now makes natural. Developer experience (15%) covers how fast you go from code to a live URL. Production scale (15%) captures limits, auth integration, and enterprise features. Scores are 0 to 10; the final column is the weighted average, and the rows are sorted by it, highest first.
1. What a remote MCP server actually is
Start from the problem MCP was invented to solve, because it explains everything else. Before MCP, every time you wanted an AI assistant to use a tool (read a Google Doc, query a database, file a Jira ticket) somebody had to write a bespoke integration for that specific model talking to that specific system. With a handful of models and a handful of tools, that is an annoyance. With dozens of each, it is an M times N explosion of glue code that nobody maintains. The Model Context Protocol collapses that into an M plus N problem by defining one uniform interface: any compliant AI client can talk to any compliant server, so a tool is built once and works everywhere - Anthropic.
A server in MCP is the thing that exposes capabilities: functions the model can call (tools), data it can read (resources), and reusable instruction templates (prompts). A client lives inside the AI application (Claude, ChatGPT, Cursor, VS Code) and connects to servers on the user's behalf. The distinction that this whole guide turns on is where the server runs. A local server runs as a subprocess on the same machine as the client and talks over standard input and output, which is perfect for a personal tool but useless to anyone else. A remote server runs on infrastructure somewhere on the internet, is reachable by URL over HTTPS, and can serve many users at once. Cloudflare frames the shift memorably: moving from local to remote MCP servers is like the move from desktop software to web apps, trading the friction of local installs for reach.
The practical consequence is about distribution. A local server has to be installed, updated, and trusted on every user's machine, which caps its audience at people willing to edit a JSON config file and run an npm package. A remote server is a single endpoint you operate: users add it by pasting a URL into their client's connector settings, you ship fixes centrally, and it can carry its own authentication so different users see different data. That is why every serious MCP integration in 2026, from Notion to Linear to Stripe, ships as a remote server. If you are building something you want other people (or other companies) to use, remote is not one option among several. It is the option, and the rest of this guide is about doing it well.
For a fuller map of what sits around this decision, including how MCP compares to the agent-to-agent protocols it is often confused with, our guide on MCP versus A2A in 2026 is a useful companion, and the broader Anthropic ecosystem guide puts MCP in the context of the company that created it.
2. Why 2026 is the year the remote server got easy
There is a first-principles reason the remote MCP server suddenly became a weekend project rather than a distributed-systems exercise, and it is worth reasoning through rather than taking on faith. A protocol has to make a choice about state. Stateful protocols remember things between messages, which is powerful but expensive: the two ends must stay connected, requests from one client must return to the same server that holds its memory, and the whole thing fights the way the modern web scales, which is by throwing identical, forgetful servers behind a load balancer. The original MCP remote transport was stateful. It used a long-lived connection and a session identifier, which meant that to run more than one server instance you needed sticky sessions, and to survive a restart you needed to persist session state somewhere. For a protocol whose entire job is to be everywhere, that was friction in exactly the wrong place.
The 2026 spec resolved the tension by removing the state from the protocol layer. As the official announcement puts it, the team "officially retired the initialize/initialized exchange along with the Mcp-Session-Id header," so "each request now travels on its own, carrying its protocol version, client identity, and client capabilities" in a metadata field - Model Context Protocol Blog. Cloudflare, which had built its entire remote MCP story on stateful Durable Objects, welcomed the change bluntly: "MCP servers can now run in just a Worker, no stateful infrastructure needed, and customers benefit from the operational simplicity and reduced cost of less moving parts" - Cloudflare. Microsoft made the same point about its own platform, noting that stateless MCP servers "scale horizontally, work on serverless platforms, and the protocol finally matches how the rest of the web is built" - Microsoft Tech Community.
Why this matters is direct: statelessness is what makes the cheap, serverless hosts in the table above genuinely viable. When any request can land on any instance, you can deploy to a platform that spins servers up and down with traffic, pay nothing while idle, and never think about session affinity. How to apply it is equally direct: for any new server, target the stateless model, and treat the old session-based transport as legacy you are migrating off, not a foundation you are building on. The rest of the guide assumes you are building the 2026 way, because building the 2024 way in 2026 means adopting complexity the standard just spent a year removing. If you want the deep specifics of the stateless revision and its new async model, we cover them in the MCP 2026 spec, stateless apps and tasks.
3. The protocol in one page: primitives, transports, lifecycle
To build a server well you need a working mental model of the protocol, and it fits on a page. Underneath, MCP is JSON-RPC 2.0: structured request and response messages with method names and parameters, the same pattern that has powered language servers and countless internal APIs for years - MCP specification timeline. On top of that plumbing sit three server-side primitives that have been there since day one. Tools are functions the model can invoke, each with a name, a description, and a JSON schema for its inputs. Resources are readable pieces of context the client can pull in, addressed by URI. Prompts are reusable, parameterized templates a server offers so a client can trigger a known-good interaction. Almost every server you build will lean hardest on tools, because tools are how the model takes action.
Around those primitives, later revisions added capabilities that make servers richer. Structured tool output lets a tool return typed JSON rather than just text. Elicitation lets a server pause mid-call and ask the user for input through the client. Resource links let a tool point at resources instead of inlining them. Two early client-side capabilities, sampling (the server asks the client's model to generate something) and roots (the client tells the server which filesystem paths are in scope), existed from the start but are being deprecated in the 2026 line in favor of simpler patterns - Model Context Protocol changelog. The newest headline capability is MCP Apps, standardized interactive UI: a tool can reference a UI template served under a ui:// URI, and the host renders it in a sandboxed iframe, which is how apps now appear inside ChatGPT and Claude - Model Context Protocol Blog.
The part that changed most is the transport, which is the wire between client and server. Locally, MCP uses stdio: the client launches the server as a subprocess and they exchange JSON-RPC over standard input and output, which is simple and fast but single-user - TrueFoundry. Remotely, the transport is Streamable HTTP, introduced in the 2025-03-26 revision to replace the original two-endpoint HTTP-plus-SSE design. Streamable HTTP exposes a single endpoint, conventionally /mcp, that accepts an HTTP POST carrying a JSON-RPC message; the server can answer with a plain JSON body, or, for a long-running call, upgrade the response into a Server-Sent Events stream to push incremental updates back - Apigene. Clients advertise what they can handle through the Accept header, offering both application/json and text/event-stream. The old design needed a persistent GET channel and a separate POST endpoint, which forced sticky sessions and broke behind proxies; collapsing it to one endpoint, and then in 2026 removing the session entirely, is the whole arc of the remote transport.
Finally, the lifecycle. Before 2026, a client and server negotiated capabilities once through an initialize exchange and then reused that agreement for the life of the session. In the stateless model there is no handshake: version, identity, and capabilities travel in a _meta field on every request, and servers must implement a server/discover method a client can call up front to learn which protocol versions and features are supported - Model Context Protocol changelog. The MCP-Protocol-Version HTTP header, mandatory since the 2025-03-26 revision, remains the transport-level version signal. That is the entire model: JSON-RPC messages, three primitives plus a growing set of capabilities, one remote transport, and a lifecycle that now fits in a header. Anthropic themselves published the clearest short overview of these pieces, worth watching before you write a line of code.
4. The 2026-07-28 revision: what stateless changes for you
MCP versions are dated strings in YYYY-MM-DD form, where the date marks the last backwards-incompatible change, and the current revision as of August 2026 is exactly 2026-07-28 - MCP Directory. It helps to see the whole chain, because each step narrowed the gap between MCP and how ordinary web services work, and because a surprising number of guides skip the November 2025 revision entirely. Reading the timeline as a single arc tells you where the protocol is heading, which is toward less bespoke state and more standard HTTP.
| Revision | Headline change |
|---|---|
| 2024-11-05 | Initial release: JSON-RPC 2.0, the tools/resources/prompts primitives, and two transports (stdio and HTTP+SSE) |
| 2025-03-26 | OAuth 2.1 authorization, Streamable HTTP replaces HTTP+SSE, mandatory MCP-Protocol-Version header |
| 2025-06-18 | Structured tool output, elicitation, resource links, MCP servers classified as OAuth resource servers |
| 2025-11-25 | OpenID Connect discovery, tool icons, tool-calling inside sampling, an experimental Tasks primitive |
| 2026-07-28 | Stateless core: no handshake, no session ID, new routable headers, HTTP+SSE deprecated |
The 2026-07-28 revision is the largest since launch, and its changes are worth understanding concretely because they touch code you will write. The handshake is gone: the spec removed the initialize and notifications/initialized exchange, so a version mismatch now surfaces as an UnsupportedProtocolVersionError rather than a failed negotiation, per SEP-2575 - Model Context Protocol changelog. The session identifier is gone: protocol-level sessions and the Mcp-Session-Id header were removed from Streamable HTTP under SEP-2567, and any state your tools need is now passed explicitly as ordinary tool arguments (a server mints a handle, hands it back, and the client passes it on the next call). Two new headers, Mcp-Method and Mcp-Name, are now required on Streamable HTTP POSTs under SEP-2243, precisely so a gateway, rate limiter, or WAF can route and meter requests without parsing the body.
There is more than the headline stateless story, and the extras matter for real servers. Long-running work moved out of the experimental core into an official Tasks extension, replacing a blocking wait with a poll-based tasks/get plus tasks/update model, which is how you now build a tool that kicks off a slow job and lets the client check back later. Structured output was loosened to accept any JSON Schema 2020-12 construct, so you can use composition and conditionals in your tool schemas. List operations like tools/list became cacheable through a required ttlMs and cacheScope, cutting redundant round-trips. And the legacy HTTP-plus-SSE transport, deprecated since 2025-03-26, was formally reclassified with a minimum twelve-month removal window under SEP-2596, so there is a real, dated offramp rather than an open-ended maybe. All four Tier-1 SDKs (TypeScript, Python, Go, and C#) support the 2026-07-28 spec, with Rust in beta - Model Context Protocol Blog.
What this means for you as a builder is a set of concrete defaults. Build stateless, and if a tool needs continuity across calls, mint an explicit handle and pass it as an argument rather than leaning on a session. Emit and route on the new headers so your server plays nicely with gateways. Reach for the Tasks extension for anything slow rather than holding a request open. Treat HTTP-plus-SSE as a migration target, not a starting point. These are not stylistic preferences; they are the difference between a server that runs cleanly on a serverless platform in 2026 and one that carries dead weight from a model the standard has already left behind.
5. Choosing your stack: official SDKs, FastMCP, or a framework
There are three layers you can build on, and picking the right one is mostly about how much control versus how little boilerplate you want. The first layer is the official SDKs, maintained by the MCP project itself and organized into tiers by completeness. Tier 1, the most complete and best-maintained, is TypeScript, Python, C# (with Microsoft), and Go (with Google). Tier 2 is Java, Rust, and Ruby; Tier 3 is Swift, PHP, and Kotlin - Model Context Protocol SDK docs. A notable 2026 shift is that Java and Kotlin, which were flagship in 2025, slipped to Tier 2 and Tier 3 as TypeScript and Python pulled ahead in adoption. The Python SDK is the most-starred at roughly 23,900 GitHub stars, with TypeScript around 13,100 - Python SDK on GitHub.
The TypeScript SDK went through a meaningful redesign worth knowing about. Its version 2 split the old monolithic @modelcontextprotocol/sdk package (now on a long-lived v1.x branch at v1.30.0) into a focused @modelcontextprotocol/server package at v2.0.0, a matching client package, and thin middleware adapters for Express, Fastify, and Hono - npm registry. It also moved from Zod-only validation to Standard Schema, so you can define tool inputs with Zod, Valibot, or ArkType. If you are starting a TypeScript server today, install @modelcontextprotocol/server, not the legacy monolith. The redesign explicitly targets the 2026-07-28 spec, and the SDK now ships as nine coordinated npm packages rather than one - MCP TypeScript SDK v2 docs.
The second layer is FastMCP, and it deserves a careful note because the name now refers to three different things. The original Python FastMCP by Jeremiah Lowin moved into the Prefect organization, sits at roughly 27,100 GitHub stars, and is on version 3 - PyPI. FastMCP 1.0 was absorbed into the official Python SDK back in 2024, so the two share DNA, but the standalone project is a much richer superset with built-in clients, server composition, OpenAPI generation, auth, proxying, and interactive Apps. Prefect now also ships an official TypeScript counterpart, @prefecthq/fastmcp-ts, which is distinct from an older, separate community TypeScript project also called fastmcp (by the developer punkpeye, around 3,200 stars) built directly on the official SDK. The practical takeaway: for Python, FastMCP is the de-facto standard for getting a server running with the least code, and its own README claims some version of it powers roughly 70% of MCP servers, though that figure is self-reported marketing rather than an audited number, so treat it as a signal of popularity, not a fact.
Language choice deserves a moment of first-principles thought rather than a reflex toward whatever you already know. The deciding factor is rarely the SDK's raw capability, since the Tier-1 SDKs are all complete; it is the ecosystem your tools need to reach. If your server wraps Python data tooling, machine-learning libraries, or a FastAPI backend, staying in Python with FastMCP keeps everything in one runtime. If it lives next to a web frontend or deploys to the edge, TypeScript on Cloudflare or Vercel removes an entire language boundary. If it fronts an existing enterprise Java or .NET system, Spring AI or the C# SDK let the server sit inside the codebase it exposes rather than beside it. Pick the language your tools already live in, and the server becomes a thin adapter instead of a second system to maintain.
The third layer is higher-level frameworks that add conventions or platform integration. In TypeScript, xmcp (from Basement, around 1,300 stars) offers Next.js-style file-based routing where each tool is a file, plus zero-config deployment to Vercel - xmcp on GitHub. mcp-use (around 10,500 stars) is a fullstack framework centered on MCP Apps, the React widgets that run inside ChatGPT and Claude - mcp-use on GitHub. In Go, the community mark3labs/mcp-go (around 9,000 stars) still outshines the official Go SDK and pioneered the HTTP transports the official one later aligned with. In Java, Spring AI (around 9,300 stars) wraps the official SDK with Boot starters, so a Streamable HTTP server is a dependency, one property (spring.ai.mcp.server.protocol=STREAMABLE), and @McpTool annotations - Spring AI docs. Which one to choose comes down to a simple rule: use the official SDK directly when you want minimal dependencies and full control, reach for FastMCP when you want batteries included, and pick a framework only when its conventions or platform ties (Vercel, Cloudflare, Spring Boot) genuinely match how you deploy. For teams comparing the broader agent-building toolchain around these servers, our LangGraph versus CrewAI versus AutoGen breakdown and the top 50 coding-agent frameworks benchmark map the wider field.
6. Building the server: two real walkthroughs
Enough context. This section builds an actual remote server twice, once in TypeScript with the official SDK and once in Python with FastMCP, so you can see both idioms. The goal in each is the same: expose one tool and serve it over Streamable HTTP in stateless mode. Keep in mind that a tool is just a named function with a described input schema and a handler that returns content, so the whole exercise is defining that function and wiring it to the /mcp endpoint. Everything else (auth, hosting, publishing) layers on top of this core, which is why getting the minimal server right first is the fastest path to a working system.
In TypeScript with the version 2 SDK, you create a server, register a tool with a Standard-Schema input, and attach a Streamable HTTP transport with sessions turned off. The canonical shape, drawn from the SDK's own quickstart, looks like this - MCP TypeScript SDK:
import { McpServer } from "@modelcontextprotocol/server";
import { createMcpExpressApp, NodeStreamableHTTPServerTransport } from "@modelcontextprotocol/express";
import { z } from "zod/v4";
const server = new McpServer({ name: "weather", version: "1.0.0" });
server.registerTool(
"get-forecast",
{
description: "Get a short weather forecast for a US state",
inputSchema: z.object({ state: z.string().length(2) }),
},
async ({ state }) => ({ content: [{ type: "text", text: `Forecast for ${state}: clear.` }] })
);
const app = createMcpExpressApp();
app.post("/mcp", async (req, res) => {
const transport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: undefined });
await server.connect(transport);
await transport.handleRequest(req, res, req.body);
});
app.listen(3000);
The single most important line is sessionIdGenerator: undefined. That is what puts the transport in stateless mode: a fresh transport handles each request, nothing is remembered between calls, and any instance can serve any request, which is exactly the 2026 model. The Python path with FastMCP is even terser, because the framework hides the transport wiring entirely. You decorate a function as a tool and call run with the HTTP transport, and FastMCP serves it at /mcp - FastMCP docs:
from fastmcp import FastMCP
mcp = FastMCP("weather")
@mcp.tool
def get_forecast(state: str) -> str:
"""Get a short weather forecast for a US state."""
return f"Forecast for {state}: clear."
if __name__ == "__main__":
mcp.run(transport="http", host="0.0.0.0", port=8000)
Both servers are now real remote MCP servers you can point a client at. The reason to show both is that they teach the same lesson in two accents: define a tool, describe its inputs so the model knows how to call it, and expose it over Streamable HTTP without a session. From here the work is not more protocol, it is the surrounding concerns of hosting, auth, and discovery. Before moving on, it is worth watching a full from-scratch build rather than reading snippets, and a recent 2026 walkthrough covers exactly this ground, including local, remote, and OAuth flows, on the current spec.
Before you deploy, test the server locally, because a remote server that works in production but breaks on your laptop is miserable to debug. The MCP Inspector is the standard tool for this: it connects to your server, lists its tools, resources, and prompts, and lets you invoke each one by hand, so you can confirm a tool's schema and output before any real client touches it. To test against an actual client like ChatGPT or Claude while the server still runs on your machine, expose it with a tunnel (ngrok or a Cloudflare tunnel) and register the public URL as a developer connector. That local-first loop, build then inspect then tunnel then connect, is how most MCP servers actually get written, and it maps directly onto the journey a server takes from its first tool to a client reaching it over the internet.
One design note that separates a toy from a real server: tool descriptions are prompts. The model reads them to decide when and how to call your tool, so a vague description produces a tool the model misuses or ignores. Write them like instructions to a capable but literal assistant, be explicit about when the tool should and should not be used, and keep the input schema tight. This is also where a lot of the security surface lives, as section 9 explains, because anything the model reads is a place an attacker can try to write. Teams that expose search or data-retrieval tools should study how retrieval quality interacts with tool design; our guide to the top AI search APIs for agents is a good reference for the kind of tools that get wrapped in MCP servers, and the deeper wiring of tools into an agent runtime is covered in our Claude Agent SDK deep dive.
7. Where to host it: platforms and real 2026 pricing
A remote MCP server is, at bottom, an HTTP service, so you can host it almost anywhere. But the 2026 stateless model changes which anywhere is smart, because a stateless server is a perfect fit for platforms that scale to zero and charge only for what you use. The assessment table at the top of this guide ranks the eight most common hosts; this section gives the real numbers and the reasoning, so you can match a host to your actual traffic and budget rather than to whichever platform you already have an account with. The headline is that a low-traffic MCP server should cost almost nothing, and the main decision is between edge-native, general serverless, container PaaS, and managed enterprise runtimes.
Cloudflare Workers is the most MCP-native option and tops the ranking. Cloudflare's Agents SDK now recommends createMcpHandler, a stateless handler that runs in an ordinary Worker, and it has explicitly deprecated and feature-frozen the older stateful McpAgent class built on Durable Objects - Cloudflare docs. The Workers free plan gives 100,000 requests a day; the paid plan is $5 a month and includes 10 million requests plus 30 million CPU-milliseconds, with overage at $0.30 per million requests and $0.02 per million CPU-milliseconds, and no egress charges at all - Cloudflare pricing. Because Workers run on V8 isolates, cold starts are effectively negligible, which for a bursty tool endpoint is a real advantage over container platforms.
Vercel is the best pure developer experience, deploying MCP servers as Fluid-compute functions through either the mcp-handler package or the zero-config xmcp framework. Its Hobby tier is free with 1 million invocations and 4 hours of active CPU a month; the Pro tier is $20 per user a month including $20 of usage credit, after which invocations cost $0.60 per million and active CPU starts around $0.128 an hour - Vercel pricing. Vercel's active CPU model is genuinely well-suited to MCP work: it pauses CPU billing while your function waits on a model or database call, and since most MCP tools are I/O-bound, that can cut cost dramatically. The rest of the ranking splits along familiar lines. AWS Bedrock AgentCore, generally available since October 2025, is the enterprise-grade managed runtime, billing active consumption at $0.0895 per vCPU-hour plus $0.00945 per GB-hour, with a Gateway that turns existing APIs into MCP tools for $0.005 per thousand invocations, and built-in memory and identity - AWS pricing. Google Cloud Run gives a generous free tier (2 million requests a month) and clean container deploys. The cheapest always-on option is Fly.io, where a 256MB microVM runs about $2 a month and costs nothing while auto-stopped - Fly.io pricing.
| Host | Free tier | Paid entry | Compute and requests | Egress |
|---|---|---|---|---|
| Cloudflare Workers | 100k req/day | $5/mo | 10M req + 30M CPU-ms incl., then $0.30/M req, $0.02/M CPU-ms | None |
| Vercel | 1M inv, 4h active CPU | $20/user/mo (incl. $20 credit) | Invocations $0.60/M; active CPU from $0.128/hr | 100GB (Hobby) to 1TB (Pro), then $0.15/GB |
| AWS Bedrock AgentCore | $200 credit | Consumption | $0.0895/vCPU-hr + $0.00945/GB-hr; Gateway $0.005/1k | Varies |
| Google Cloud Run | 2M req/mo | Pay-as-you-go | $0.024/1k vCPU-s (request mode); $0.40/M req | Varies |
| AWS Lambda + HTTP API | 1M req each | Pay-as-you-go | Lambda $0.20/M + $0.0000166667/GB-s; API $1.00/M | $0.09/GB |
| Fly.io | Legacy orgs only | ~$2.02/mo (256MB) | Pay-as-you-go microVMs, $0 while stopped | $0.02/GB (NA/EU) |
| Railway | $5 trial credit | $5/mo (incl. $5 credit) | $10/GB-mo RAM, $20/vCPU-mo | $0.05/GB |
| Render | Free (cold starts) | $7/mo Starter (0.5 vCPU/512MB) | Flat instance tiers | 5-25GB incl., $0.15/GB |
A worked example makes the economics concrete. Suppose your server exposes three tools, is called 200,000 times a month, and each call spends most of its time waiting on an upstream API. On Cloudflare Workers that traffic sits well inside the $5 plan's included 10 million requests, so the bill is $5. On Vercel, 200,000 invocations is a rounding error against the free tier's million, and because active-CPU billing pauses while your tool waits on the upstream, you pay almost nothing for compute. On Fly.io a single always-on 256MB machine runs about $2, and on Cloud Run the whole workload fits inside the 2-million-request free tier. The point is not which host wins by a few dollars; it is that a genuinely useful remote MCP server costs less than a coffee per month until it becomes popular, which is exactly the cost profile the stateless spec was built to enable.
Beyond the general-purpose hosts, there are MCP-specialist platforms worth naming even though their hosting prices are not consistently public. Smithery deploys and hosts MCP servers and doubles as a registry with thousands of listings. Klavis AI focuses on managed servers with progressive tool discovery, and Gram by Speakeasy turns APIs into hosted MCP servers. These trade some control for convenience, and for a team that wants an MCP server live without touching infrastructure they are reasonable, but you give up the transparency and portability of running your own endpoint. The practical guidance is a decision by workload: for a hobby or authless demo, use a free tier (Cloudflare, Cloud Run, or Render's scale-to-zero); for a real stateless production server, Cloudflare Workers or Vercel are the strongest; for enterprise needs with memory and identity baked in, Bedrock AgentCore earns its complexity. Whatever you pick, the stateless spec is what lets you choose the cheap option without inheriting a scaling headache. If you are weighing the total cost of running agents and their tools over time, our true cost of AI agents report and our guide to cutting agent costs with model routing go deeper on the economics.
8. Authorization: OAuth 2.1 without shooting yourself in the foot
The moment your server does anything with private data, it needs to know who is calling, and MCP standardized on OAuth 2.1 for exactly that. The single most important architectural fact is a role split introduced in the 2025-06-18 revision: your remote MCP server is an OAuth Resource Server only. It validates access tokens; it does not issue them - Model Context Protocol specification. A separate Authorization Server, which can be a third party like WorkOS, Auth0, or Stytch, or something you co-host, handles login, consent, and token issuance. Earlier drafts made the MCP server do both jobs at once, which was the main source of implementation pain and confused-deputy risk, so keeping these roles separate is not a nicety, it is the design.
The handshake that ties it together follows a fixed sequence, and understanding it is what lets you either implement it correctly or pick a provider that does. A client hits your server with no token and gets back an HTTP 401 with a WWW-Authenticate header pointing at your Protected Resource Metadata, which the spec now mandates you expose at /.well-known/oauth-protected-resource under RFC 9728. That metadata names your authorization server. The client fetches the authorization server's own metadata (RFC 8414), registers, and runs an OAuth 2.1 code flow with PKCE mandatory. Crucially, it includes a resource parameter (RFC 8707) that binds the resulting token's audience to your server's canonical URL, and your server must reject any token that was not minted for it. That audience check is the linchpin of the whole security model, because it is what stops a token issued for one service being replayed against another.
To make that concrete, walk one real request. A user adds your server URL to Claude and asks it to do something; Claude's MCP client calls your /mcp endpoint with no credentials, and your server answers 401 with a header that says, in effect, here is where my permissions are described. The client fetches your /.well-known/oauth-protected-resource document, learns which authorization server you trust, and sends the user there to log in and consent. The user signs in once, the authorization server mints a token stamped with your server's URL as its audience, and every later tool call arrives carrying that token in an Authorization: Bearer header. Your server's only job on each call is to confirm the token is valid and that its audience is genuinely you. Get that single check right and most of the OAuth attack surface closes.
There is a second rule that matters as much as audience validation, and it is the one teams most often get wrong: never pass a token through. If your MCP server needs to call an upstream API (say your tool talks to GitHub on the user's behalf), it must not forward the client's token unchanged. It acts as a fresh OAuth client and obtains a separate token for that upstream, because forwarding turns your server into a confused deputy that can be tricked into using its privileges for an attacker. The 2026 line adds further hardening: it deprecates Dynamic Client Registration in favor of Client ID Metadata Documents, where an HTTPS URL serves as the client identifier, and it adds issuer validation (RFC 9207) to defend against mix-up attacks - Model Context Protocol draft.
The honest advice is to not build this from scratch. A cluster of providers now implement the full pattern (Protected Resource Metadata, PKCE, audience binding) so you add spec-correct OAuth without reinventing it. WorkOS AuthKit issues tokens with the audience bound to your server's URL and supports the full MCP flow - WorkOS. Auth0's Auth for MCP adds a Token Vault and RFC 8693 token exchange so your server never passes the client token upstream - Auth0. Stytch Connected Apps, Scalekit, Clerk, and Cloudflare's own workers-oauth-provider cover the same ground, the last handling the authorization and token endpoints inside a Worker - Cloudflare on GitHub. Cloudflare's own diagram of the full flow is a useful reference when you wire this up, whichever provider you choose.
9. Security: the real threat model
Here is the uncomfortable truth a lot of MCP marketing skips: the hardest security problems in MCP are not solved by OAuth, because they live above the auth layer, in the content the model reads. The structural reason is that an MCP client inherits trust from a server without continuously verifying it, and a language model cannot reliably tell the difference between data and instructions. Reason from that and you can predict the entire attack class before reading a single incident report: anything the model ingests (a tool description, a resource, an issue title, a support ticket) is a place an attacker can plant instructions the model will follow. This is prompt injection, and MCP hands it a rich new surface.
The canonical example is tool poisoning, first demonstrated by Invariant Labs in April 2025: a malicious server hides instructions inside a tool's description, which the model reads but the user never sees, and those instructions can exfiltrate data without the user ever invoking the poisoned tool - OWASP MCP Top 10. Benchmarks make clear this is not a corner case: the MCPTox study measured tool-poisoning attack success above 60% across 45-plus real-world servers, with the strongest model reaching 72.8% - MCPTox on arXiv. A related trick, Trail of Bits' line jumping, is worse still, because the payload fires at tool-discovery time, before any tool is called, defeating approval schemes that gate on invocation - Trail of Bits. And rug pulls exploit the fact that tool definitions are dynamic: a server that passes review can later mutate a benign tool into a malicious one, which is why version-pinning trusted servers matters.
These are not theoretical. In May 2025, Invariant showed a GitHub MCP exploit where a prompt-injection payload planted in a public issue coerced an agent into leaking data from private repositories through the same token, a chaining of private access, untrusted content, and an exfiltration channel that Invariant calls the lethal trifecta - Invariant Labs. Cato Networks demonstrated the same pattern against Atlassian in June 2025, using a malicious Jira ticket that an internal support agent processed with elevated privileges - Cato Networks. Asana's own MCP server leaked data across roughly a thousand organizations for about 34 days due to broken tenant isolation - BleepingComputer. And in July 2026, Manifold Security showed hidden HTML comments in Azure DevOps pull-request descriptions reaching a review agent verbatim through the REST API - The Hacker News.
The second front is supply chain and remote code execution, and the CVEs here are concrete. postmark-mcp became the first real-world malicious MCP server in September 2025: a typosquat that behaved for fifteen versions, then in version 1.0.16 added a one-line backdoor BCCing every email to an attacker - Snyk. The mcp-remote proxy carried CVE-2025-6514, a CVSS 9.6 command-injection flaw letting a malicious server achieve remote code execution on the client - JFrog. And in April 2026, OX Security disclosed eleven CVEs rooted in unsafe stdio configuration defaults across SDKs with 150 million-plus downloads and 7,000-plus exposed servers, including CVE-2026-30623 in LiteLLM, with Anthropic controversially calling the behavior expected - The Hacker News. Roughly 43% of the 30-plus MCP CVEs filed in one 60-day window were command-injection patterns - Practical DevSecOps.
None of this means you should not build a remote server; it means you should build it defensively. The consensus best practices, codified in the OWASP MCP Top 10 and the spec's own security guide, are concrete: issue short-lived, narrowly-scoped tokens bound to your specific server; validate token audience on every request and never pass tokens through; require human confirmation for irreversible actions, since MCP has no built-in human-in-the-loop; validate and sanitize everything the model will read, including your own tool descriptions; and pin or allowlist the servers you trust to blunt rug pulls - Model Context Protocol security guide. If you are building a server that will handle anything sensitive, our guide to AI agent security and prompt-injection defense goes deeper on the mitigations, and the LLM tool gateways guide covers the gateway layer that can enforce many of these controls centrally.
10. Publishing and discovery: the MCP Registry and marketplaces
Building a server is half the job; being found is the other half, and in 2026 discovery runs through a two-tier system worth understanding before you ship. At the center is the official MCP Registry, which launched in preview in September 2025 at registry.modelcontextprotocol.io as an open catalog and API of publicly available servers - Model Context Protocol Blog. It was a genuinely community effort, with maintainers from PulseMCP, Block, GitHub, and Anthropic, and it is deliberately thin: rather than being a consumer destination, it acts as a single upstream source of truth that downstream sub-registries (the client-facing marketplaces) ingest and enrich. Enterprises can even run private sub-registries that pull from the central one, which is how a company curates an internal catalog.
The mechanics of publishing are straightforward and matter for anyone shipping a server. Each server is described by a server.json document and published under a reverse-DNS namespace: individuals publish under io.github.<username>/<server>, while organizations with a domain publish under something like com.example/<server> - MCP Registry on GitHub. Ownership is proven before you can publish, through GitHub OAuth, GitHub Actions OIDC, a DNS TXT record, or an HTTP challenge file, which is what keeps the namespace from being squatted. One honest caveat: as of August 2026 the registry is still officially in preview, not general availability, and explicitly warns that data resets may occur before GA, so treat it as the emerging standard rather than a finished, guaranteed-durable service.
The downstream marketplaces are where most users actually browse, and their scale is large but their numbers are self-reported and heavily overlapping, so read them as order-of-magnitude rather than a census. Directory snapshots in 2026 put Glama around 22,000 servers, mcp.so around 17,000, MCP Market over 10,000, PulseMCP near 7,000, and Smithery in the low thousands, while Docker's MCP Catalog curates a much stricter couple of hundred containerized servers - TrueFoundry. Because the same server often appears across several directories, aggregate counts double-count heavily, which is why the most credible growth figures come from Anthropic's own de-duplicated numbers rather than summed directory totals. The practical publishing playbook is simple: publish a verified server.json to the official registry, and let Smithery, Glama, Docker, and the client marketplaces ingest it downstream. For a broader look at where to list an API or server and how those directories rank, our guide to the top MCP alternatives and connection layers surveys the wider landscape.
One rising angle worth noting for anyone building a commercial server is monetization. As servers become products, the question of charging for tool calls has produced new agent-payment rails, and the emerging pattern pairs MCP tools with machine-payable protocols so an agent can pay per call. We cover that intersection in our agent payments infrastructure guide and the deep dive on x402 and agent payments, which is the most concrete path today from a free MCP server to one that bills for usage.
11. Adoption and the market: who is building, and how fast
It is worth stepping back from the how to the how-much, because the adoption curve is the reason building a remote MCP server is a good use of your time rather than a bet on a standard that might not last. The structural argument is simple: a protocol wins when the people on both sides of it adopt it, and MCP got both the model providers and the tool builders. On the model side, OpenAI adopted MCP in March 2025 with Sam Altman saying "people love MCP and we are excited to add support across our products," Google and DeepMind followed in April 2025 with Demis Hassabis calling it "rapidly becoming an open standard for the AI agentic era," and Microsoft, AWS, Block, Replit, and Sourcegraph rounded out the coalition - The New Stack. When every major client speaks your protocol, a server you build reaches all of them at once, which is the entire economic case for the standard.
The raw growth numbers are striking, and the most credible ones come straight from the protocol's stewards rather than from directory self-counts. MCP went from roughly 50 servers at its November 2024 launch to around 2,000 by the September 2025 registry preview to more than 10,000 active servers by December 2025, alongside over 97 million monthly SDK downloads - Model Context Protocol Blog. That is roughly a 200-fold increase in server count in about a year, the kind of curve that signals a genuine platform shift rather than a hype cycle. It is the sort of adoption pattern we have tracked across the agent ecosystem, and it rhymes with the trajectory documented in our analysis of self-improving AI agents in 2026.
Enterprise adoption is real but earlier-stage than the server counts suggest, and it is worth being honest about that gap. Stacklok's 2026 State of MCP survey found that among software organizations, roughly 41% already run MCP in production, split across limited and broad rollouts, with the rest still planning or piloting - Digital Applied. That distribution tells you the market is past experimentation but not yet saturated, which is the sweet spot for building: the clients exist, the standard is stable, and most companies have not yet built the servers they will eventually need. A word of caution on the hype, in keeping with a first-principles read of the data: some widely-circulated figures, like a claimed "78% of enterprise AI teams in production," have been retracted from the trackers that first published them, and the ~99,000-server aggregate you will see quoted double-counts across directories, so anchor on the official de-duplicated numbers when you cite growth.
Governance is the quiet signal that this is durable infrastructure rather than a single vendor's project. In December 2025 Anthropic donated MCP to the Agentic AI Foundation, a directed fund under the Linux Foundation co-founded with Block and OpenAI and supported by Google, Microsoft, AWS, Cloudflare, and Bloomberg - Model Context Protocol Blog. A standard controlled by one company can be changed or abandoned at that company's convenience; a standard held by a neutral foundation with every hyperscaler signed on is one you can build a business on. That is the deeper reason 2026 is the moment to build: not just that the tools got easier, but that the ground under them got solid.
12. Managed alternatives, and when not to build your own
A guide that only tells you to build would be doing you a disservice, because for a large share of teams the right move is not to hand-build and operate a remote MCP server at all. Reason about it from the goal rather than the artifact. What you actually want is usually not a server; it is an outcome: an assistant that can act in your systems, a workflow that runs without a human babysitting it, a product that does something useful with AI. A remote MCP server is one means to that end, and it is the right means when you are exposing a specific capability to many external clients and you value control and portability. It is the wrong means when the server would just be plumbing between an agent and a few internal systems that a managed platform already connects.
The managed options fall on a spectrum. At the closest-to-DIY end are the MCP-specialist hosts from section 7, Smithery, Klavis, and Gram, which run the server for you but still leave you owning the tool logic. Further along are connector platforms like Composio that maintain hundreds of pre-built managed MCP servers for common SaaS tools, so you consume rather than build them. And at the far end are full agent platforms that abstract the server away entirely: you describe what you want done, and the platform's agents already have the tools wired up, secured, and hosted. This is the model behind platforms like o-mega.ai, which lets you build and run an autonomous company through one conversation, where the underlying agents connect to the tools and services they need without you standing up or securing a single endpoint. It is a genuinely different trade: you give up the fine-grained control of your own server in exchange for never operating one, which for a non-technical founder or a small team is often the better deal.
The way to choose is to be honest about where your value actually lives. If the differentiated thing you are building is the tool itself (a novel data source, a proprietary action, a capability nobody else exposes) then build the server, because that server is your product and you want to own it end to end. If the differentiated thing is the outcome, and the tools are commodity connections to systems that already have MCP servers or managed integrations, then buying that layer frees you to spend your effort on the part that matters. Many teams end up doing both: building one or two servers for their proprietary capabilities and consuming managed connectors for everything else. For a fuller treatment of that build-versus-rent decision across the agent stack, our guide on OpenAI's build-versus-rent trade-off and the unified agent API alternatives both map the middle ground between rolling your own and buying it whole.
It is worth naming the author's vantage point here, because it shapes the guide's honesty about this trade-off. Yuma Heymans (@yumahey), who leads the AI-agent company O-mega and co-founded the recruitment-automation platform HeroHunt.ai, spends his days on exactly this question of wiring agents to the tools they need to do real work - LinkedIn. That background is why this section resists the reflex to tell everyone to build: the interesting problem in 2026 is rarely the server itself, it is deciding which capabilities are worth owning and which are better consumed.
13. Future outlook: where remote MCP goes next
Predicting a fast-moving standard is risky, but the direction of travel is legible if you extrapolate from what the 2026 spec already did rather than from wishful roadmaps. The clearest trend is convergence with ordinary web infrastructure. Making the protocol stateless, adding routable headers so gateways and WAFs can handle MCP traffic natively, and making list operations cacheable are all moves toward MCP being just another kind of HTTP service that your existing tooling already knows how to scale, secure, and observe. Expect this to continue: the async Tasks extension points toward MCP servers that manage long-running jobs the way any modern API does, and the extensions framework introduced in 2026 means new capabilities will arrive as optional add-ons rather than breaking-change core revisions, which is exactly how mature standards evolve.
The second trend is the interface layer, driven by MCP Apps. Once a server can ship not just tools but sandboxed interactive UI that renders inside ChatGPT and Claude, the remote MCP server stops being a backend integration and starts being a distribution channel: a way to put a real application in front of hundreds of millions of assistant users without building a separate app. That reframes what a server is worth building. The third trend is security maturation, which is less exciting but more consequential. The tool-poisoning and confused-deputy problems documented in section 9 are not going away on their own, and the ecosystem's response (scanning tools, gateways that enforce policy, spotlighting defenses, and eventually signed and attested servers) will become table stakes for anything handling real data. The teams that treat security as a first-class part of building a server, not an afterthought, are the ones whose servers survive.
The honest uncertainty is about competing protocols and consolidation. MCP won the tool-connection layer, but the agent-to-agent coordination layer is still contested, and how MCP relates to protocols for agents talking to other agents will shape the next two years; we work through that specific question in our MCP versus A2A guide. What seems safe to say is that the remote MCP server, as a unit of capability that any AI client can call, is now durable infrastructure. It has the adoption, the neutral governance, and a spec that finally matches how the web works. Building one in 2026 is not a bet on whether the standard sticks; it is a bet on your specific capability being worth exposing, which is the right thing to be betting on. For where autonomous agents built on these foundations are heading operationally, our guides on agentic computer use and how to write loops for AI coding agents trace the next layer up the stack.
14. Conclusion: a decision framework
Building a remote MCP server in 2026 comes down to a short sequence of honest decisions, and the guide can be compressed into them. First, decide whether to build at all: build a server when the capability you are exposing is your differentiator and you want many clients to reach it, and buy a managed layer when the tools are commodity plumbing and the outcome is what you actually sell. Second, build for the stateless 2026-07-28 spec, because building for the old session-based model in 2026 means adopting complexity the standard just removed and a transport that is now on a twelve-month deprecation clock.
Third, pick your stack by how much you want to write: the official SDK for control, FastMCP for the least Python boilerplate, or a framework like xmcp or Spring AI when its conventions match your platform. Fourth, host where the stateless model pays off: Cloudflare Workers for edge-native and near-zero cold starts, Vercel for the smoothest deploy, a cheap microVM on Fly.io for always-on on a budget, or Bedrock AgentCore when you need enterprise memory and identity baked in. Fifth, do authorization by the book: your server is a resource server that validates audience-bound tokens and never passes them through, and you should lean on a provider like AuthKit, Auth0, or Stytch rather than hand-rolling OAuth.
Sixth, and most underrated, treat security as core: the real threats are prompt injection through tool descriptions and content, confused-deputy token misuse, and supply-chain compromise, and the defenses (scoped short-lived tokens, audience validation, human-in-the-loop for irreversible actions, pinned trusted servers, and validated inputs) are known and non-negotiable. Finally, publish a verified server.json to the official registry and let the marketplaces carry you downstream. Do those things and you have a server that any AI client can find, connect to, and trust, running for a few dollars a month on infrastructure that scales itself. That is the payoff the 2026 stateless spec unlocked, and it is why this is the year the remote MCP server stopped being hard.
This guide reflects the Model Context Protocol landscape as of August 2026, including the 2026-07-28 specification and pricing current at publication. MCP is evolving quickly and prices, spec details, and model versions change often, so verify current specifics against the official sources linked above before building or purchasing.