---
title: "MCP Transport: stdio vs Streamable HTTP | CustomMCP.com"
description: "Compare MCP stdio and Streamable HTTP transports for local tools and remote servers: authentication, deployment, origin checks, sessions and trade-offs."
canonical: https://custommcp.com/resources/mcp-transport-comparison/
updated: 2026-11-29
release_state: APPROVED_FOR_RELEASE
license: content all rights reserved; reference code MIT
generator: CustomMCP static generator 2.1.0
---

# stdio or Streamable HTTP: choosing an MCP transport

> Use stdio for a local server that runs on the same machine as the AI host and needs no network exposure. Use Streamable HTTP for a remote server shared by users, where OAuth, origin validation, rate limits and centralized deployment matter. Legacy SSE is a compatibility fallback, not a default.

The transport decides who can reach the server, how credentials work and what you have to operate. Choose it before writing the tool layer.

## Side-by-side

| Dimension | stdio | Streamable HTTP |
| --- | --- | --- |
| Where it runs | On the user's machine, launched by the host | On a server or edge runtime |
| Reach | One local user | Many users or tenants |
| Authentication | Operating-system identity and local file permissions | OAuth 2.1, API keys or signed agent identity |
| Network exposure | None | Public or private ingress, TLS, origin checks |
| Deployment | Package and version per machine | Central deploy, rollback and monitoring |
| Data residency | Data stays local unless the tool calls out | Data crosses the network to your runtime |
| Failure visibility | Local logs, harder to aggregate | Central logs, metrics and alerts |
| Best for | Developer tools, local files, single-user utilities | Shared business systems and multi-user agents |

*Transport comparison*

## Choose stdio when

- The server must read local files or use a desktop application's context.

- There is one user and no need for a shared deployment.

- Credentials can live in the local OS keychain or a file with restrictive permissions.

- You want the lowest operational surface and no network service to secure.

- The host supports launching a subprocess with a documented command and arguments.

## Choose Streamable HTTP when

- Multiple users or tenants share one integration.

- The server calls internal systems that must stay behind a private network boundary.

- You need centralized rate limits, audit logs and rolling upgrades.

- Credentials must be held server-side and never distributed to client machines.

- The host connects over the network rather than spawning a local process.

## Hybrid deployments

A common pattern is a thin local server for machine-specific context and a remote server for shared business data. The host sees two servers; each has its own trust boundary and its own credentials.

Do not bridge a local stdio server to the public internet with an unauthenticated proxy. That turns a local privilege into a remote attack surface, and it usually breaks origin and session assumptions.

## Controls a remote transport needs

| Control | Requirement |
| --- | --- |
| TLS | HTTPS only, modern ciphers, HSTS at the edge |
| Origin | Validate the Origin header; reject unexpected browser origins |
| Auth | OAuth 2.1 with PKCE, or a scoped server-issued token; bind the audience |
| Session | Stateless where possible; if stateful, bind sessions to the authenticated principal |
| Limits | Request-size cap, per-principal rate limit, timeouts |
| Content type | Accept application/json and the required streaming type; reject others |
| Logging | Request ID, principal, tool, outcome; no tokens or payload bodies |

*Streamable HTTP baseline*

> **Note:** Legacy HTTP+SSE remains in some clients. Support it only when a tested client requires it, and treat it as a compatibility path with the same authentication and origin controls, not a simpler option.

## Frequently asked questions

### Can a stdio server call a remote API?

Yes. stdio describes how the host talks to the server, not what the server may call. If it calls remote systems, it still needs bounded credentials and egress rules.

### Is Streamable HTTP the same as REST?

No. It is an MCP transport that carries JSON-RPC messages, optionally streamed. It is not a REST resource design.

### Which transport does this site use?

The public reference endpoint at /mcp is a stateless Streamable HTTP JSON-RPC endpoint. The downloadable reference server uses stdio.

### Do I need sticky sessions?

Not if the server is stateless. If you keep session state, bind it to the authenticated principal and plan for instance restarts.

## Related

- [MCP developer documentation](https://custommcp.com/docs/)
- [What is Model Context Protocol?](https://custommcp.com/resources/what-is-mcp/)
- [MCP security checklist: 20 controls before you expose a tool](https://custommcp.com/resources/mcp-security-checklist/)
- [Managed MCP hosting with written limits](https://custommcp.com/services/managed-mcp-hosting/)

---

Canonical HTML: https://custommcp.com/resources/mcp-transport-comparison/
Machine index: https://custommcp.com/llms.txt
Agent onboarding: https://custommcp.com/agents/
Last verified: 2026-11-29
