PaPoo
cover

What is an MCP transport (stdio vs HTTP)?

An MCP transport is the way a Model Context Protocol client and server exchange messages, most commonly either over standard input/output (stdio) or over HTTP-based connections.

Why it matters

MCP defines what messages are sent; the transport defines how they move between processes or over a network.

You choose a transport based on deployment shape:

In practice, transport is the difference between “spawn a local helper and talk to it directly” and “connect to a service over the network.”

How it works

At a high level, MCP is built around JSON-RPC-style messages. The transport layer carries those messages and handles the mechanics of getting bytes from client to server and back.

stdio transport

With stdio, the client launches the server process and sends messages through the server’s standard input, while reading responses from standard output. This is a simple process-to-process channel and is especially useful for local integrations.

Typical properties:

HTTP transport

With HTTP, the client talks to a server over an HTTP endpoint. Depending on the MCP implementation, the server may support streaming or other HTTP-friendly patterns, but the key idea is the same: messages cross a network boundary instead of a process boundary.

Typical properties:

The practical difference

Both transports can expose the same MCP capabilities. The transport does not change the tools, prompts, or resources the server offers; it only changes the delivery mechanism.

Tiny concrete example

A local desktop app might start a weather MCP server like this:

client -> spawn weather-server
client -> write JSON-RPC request to server stdin
server -> write JSON-RPC response to stdout

A remote setup might look like:

POST /mcp
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}

In both cases, the client is asking for the same MCP method; only the transport changes.

Common pitfalls / when NOT to use it

Related terms

Related terms

同じ著者の記事