---
title: "What is an MCP transport? stdio vs Streamable HTTP"
description: "An MCP transport carries JSON-RPC messages between an MCP client and server. Compare stdio and Streamable HTTP, and learn what replaced the HTTP+SSE transport."
type: "glossary-term"
canonical_url: "https://theaiengineering.com/glossary/mcp-transport"
markdown_url: "https://theaiengineering.com/glossary/mcp-transport.md"
topic: "Model Context Protocol"
author: "The AI Engineering Editors"
publisher: "The AI Engineering"
updated: "2026-11-06"
keywords: ["MCP transport","stdio transport","Streamable HTTP","MCP stdio"]
citation: "The AI Engineering Editors. \"What is an MCP transport? stdio vs Streamable HTTP.\" The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/mcp-transport"
---

# What is an MCP transport? stdio vs Streamable HTTP

Also called stdio transport, Streamable HTTP, MCP stdio.

> **Definition of MCP transport:** An MCP transport is the binding that carries Model Context Protocol messages between a client and a server; the specification defines stdio for local subprocesses and Streamable HTTP for remote servers.

An MCP transport is the layer that frames and delivers [JSON-RPC](https://theaiengineering.com/glossary/json-rpc) messages between an MCP client and an [MCP server](https://theaiengineering.com/glossary/mcp-server). The [transports page](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports) of the current specification, revision 2026-07-28, calls each transport a binding: it defines how messages are framed, where request metadata travels, and how cancellation and termination are signaled, while the meaning of every message stays the same on every transport. The choice of transport decides who starts the server, how callers authenticate, and what infrastructure can sit in between.

## How MCP transports work

MCP defines two standard transports. With stdio, the client launches the server as a subprocess and exchanges one JSON-RPC message per line over standard input and output. With Streamable HTTP, the server runs independently, and the client sends every message as its own HTTP POST to a single endpoint.

On stdio, messages must not contain embedded newlines, the server must not write anything to stdout that is not a valid MCP message, and it may log to stderr. The client cancels a request with a `notifications/cancelled` message and shuts the server down by closing its stdin, escalating to a forced kill if the process does not exit. The specification's authorization framework does not apply; a stdio server reads credentials from its environment.

On [Streamable HTTP](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http), the server exposes one MCP endpoint, such as `https://example.com/mcp`. The server answers each POST with a single JSON object or a Server-Sent Events stream scoped to that request, and closing that stream cancels the request. Every POST carries an `MCP-Protocol-Version` header and an `Mcp-Method` header, plus `Mcp-Name` for `tools/call`, `resources/read`, and `prompts/get`. These headers mirror the body so that load balancers and [MCP gateways](https://theaiengineering.com/glossary/mcp-gateway) can route without parsing JSON, and a server rejects any mismatch with a `HeaderMismatch` error. Servers must validate the `Origin` header to block DNS rebinding, and a local HTTP server should bind to 127.0.0.1.

Custom transports are allowed if they keep the JSON-RPC format, message patterns, and per-request metadata, and byte-stream channels such as Unix sockets should reuse stdio framing.

## stdio vs Streamable HTTP

stdio fits a server that runs on the user's machine for a single host application. Streamable HTTP fits a server deployed as a shared service for many clients. stdio relies on process isolation and environment variables for credentials, while Streamable HTTP should use the specification's OAuth-based authorization framework and has to defend against network attacks.

| | stdio | Streamable HTTP |
|---|---|---|
| Server lifecycle | Launched and stopped by the client | Runs independently |
| Framing | One JSON-RPC message per line | One HTTP POST per message |
| Replies | One shared stdout channel | A JSON object or a per-request SSE stream |
| Request metadata | Message body only | Body, mirrored into HTTP headers |
| Cancellation | `notifications/cancelled` | Close the response stream |
| Credentials | Environment variables | OAuth-based HTTP authorization |

Revision 2026-07-28 also changed Streamable HTTP itself. It removed protocol-level sessions and the `Mcp-Session-Id` header, the standalone GET stream, and stream resumption with `Last-Event-ID`. Long-lived change notifications now arrive on the response stream of a `subscriptions/listen` request. Tutorials written for revisions 2025-03-26 through 2025-11-25 describe the older shape.

## The deprecated HTTP+SSE transport

The HTTP+SSE transport from the first public revision, 2024-11-05, paired a GET request that opened a server-sent events stream with a separate POST endpoint for client messages. Streamable HTTP replaced it in revision 2025-03-26, and the [2026-07-28 changelog](https://modelcontextprotocol.io/specification/2026-07-28/changelog) reclassified HTTP+SSE as Deprecated under the project's feature lifecycle policy.

That policy sets a minimum twelve-month deprecation window, and HTTP+SSE is eligible for removal in a future revision, so new implementations should not adopt it. A server that must support older clients can keep hosting the old SSE and POST endpoints next to the new MCP endpoint. A client that must support older servers tries a POST first; if that fails with 400, 404, or 405 and no recognized modern JSON-RPC error, it sends a GET and treats an `endpoint` event as the sign of a legacy server.

[How to build an MCP server](https://theaiengineering.com/articles/how-to-build-an-mcp-server) shows the same server code running over both standard transports.

## Related terms

- [Model Context Protocol (MCP)](https://theaiengineering.com/glossary/model-context-protocol): Model Context Protocol (MCP) is an open protocol, introduced by Anthropic in November 2024, that standardizes how AI applications connect to external tools, data sources, and prompts through MCP servers.
- [MCP server](https://theaiengineering.com/glossary/mcp-server): An MCP server is a program that exposes tools, resources, and prompts to AI applications through the Model Context Protocol, running locally over stdio or remotely over Streamable HTTP.
- [JSON-RPC](https://theaiengineering.com/glossary/json-rpc): JSON-RPC is a lightweight, transport-agnostic remote procedure call protocol that encodes method calls, results, and errors as JSON objects; version 2.0 is the message format of MCP and A2A.
- [MCP gateway](https://theaiengineering.com/glossary/mcp-gateway): An MCP gateway is a proxy that sits between MCP hosts and many MCP servers, exposing them through one endpoint and centralizing authentication, tool access policy, and audit logging.
- [AI gateway](https://theaiengineering.com/glossary/ai-gateway): An AI gateway is a proxy layer between applications and model providers that exposes one API for many models and centralizes routing, failover, access control, cost tracking, caching, and logging.

## Guides that cover mcp transport

- [A2A protocol vs MCP: differences and when to use each](https://theaiengineering.com/articles/a2a-vs-mcp): A2A protocol vs MCP: A2A connects AI agents to other agents, and MCP connects an agent to tools and data. Compare agent cards, tasks, transports, and security.
- [How to build an MCP server: a Python and TypeScript tutorial](https://theaiengineering.com/articles/how-to-build-an-mcp-server): Learn how to build an MCP server with the official Python and TypeScript SDKs: tools, resources, transports, testing, client config, and production security.
- [What is the Model Context Protocol (MCP)? How it works](https://theaiengineering.com/articles/what-is-model-context-protocol): The Model Context Protocol (MCP) is an open standard for connecting AI apps to tools and data. Learn its architecture, transports, tool calls, and security.

Part of the [Model Context Protocol](https://theaiengineering.com/topics/mcp) topic hub.

## Cite this definition

The AI Engineering Editors. "What is an MCP transport? stdio vs Streamable HTTP." The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/mcp-transport

- Title: What is an MCP transport? stdio vs Streamable HTTP
- Author: The AI Engineering Editors
- Publisher: The AI Engineering
- Updated: 2026-11-06
- URL: https://theaiengineering.com/glossary/mcp-transport
- Markdown: https://theaiengineering.com/glossary/mcp-transport.md
