C.W.K.
Stream
Lesson 05 of 05 · published

Choosing a Transport

~18 min · decision, stdio-vs-http, operational

Level 0Curious Reader
0 XP0/48 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

The choice is small and consequential. Get it right by walking through five questions in order:

  1. Who installs the server? If the user installs it on their own machine (calculator, personal notes, local code search), stdio is right. If you are operating it as a service for many users, Streamable HTTP.
  2. Does it need network reachability? If yes, Streamable HTTP. There is no "stdio-over-network" — that is just a poorly-named tunneling protocol.
  3. Does it scale horizontally? If yes, Streamable HTTP, ideally stateless behind a load balancer. Stdio cannot share load across processes.
  4. Does it have multi-tenant data? If yes, Streamable HTTP with explicit auth per request. Stdio has no auth concept beyond "the user installed it."
  5. Does it survive a process restart? Stdio servers come back when the host relaunches them; Streamable HTTP servers come back when the operator restarts them. Match the failure mode you are willing to tolerate.

The honest summary: stdio for personal, Streamable HTTP for shared. The mistakes happen in the margin — a "personal" server that grows into a team service, an "internal" server exposed to enough people that it should have had auth from day one. When in doubt, write the server transport-agnostically (the SDK lets you) and pick the transport at deployment time.

Code

Same FastMCP server, two deployment shapes·python
# server.py — works under either transport
from mcp.server.fastmcp import FastMCP
app = FastMCP("my-server")
# ... define tools/resources/prompts ...

# stdio entrypoint
if __name__ == "__main__":
    app.run()  # speaks stdio by default

# HTTP entrypoint (uvicorn / similar):
# uvicorn server:app.streamable_http_app

External links

Exercise

Inventory the MCP servers you currently use or maintain. Mark each as stdio or HTTP, and ask the five questions for each. Any rows where the answer doesn't match the transport in use are the ones worth scheduling a migration for.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.