If you want to host an MCP Server in the cloud (e.g., on Vercel or AWS) so multiple clients can connect, you use the Streamable HTTP transport, historically involving Server-Sent Events (SSE).
This allows a single cloud-hosted MCP Server to serve thousands of Clients independently.
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
app.get("/sse", async (req, res) => {
const transport = new SSEServerTransport("/message", res);
await server.connect(transport);
});