Skip to content

MCP Transports: stdio and HTTP

How MCP messages travel: standard input and output for local servers, HTTP for remote ones, and how to choose.

Editorial team 1 min read

MCP separates the protocol from how messages are carried. Two transports are standard.

stdio

The host launches the server as a subprocess and exchanges JSON-RPC messages over its standard input and output.

  • Simple and fast.
  • Runs with the user's local permissions.
  • Ideal for local tools: file systems, local databases, developer utilities.

Servers must write only protocol messages to stdout; logs go to stderr.

Streamable HTTP

The server runs as an independent web service. Clients send messages with HTTP requests, and servers can stream responses and notifications back.

  • Suits remote and shared servers, SaaS integrations and multi-user deployments.
  • Needs authentication, TLS and the usual web security measures.

Earlier versions of the protocol used a different HTTP-based transport built on server-sent events; newer implementations use Streamable HTTP. Check which versions your client and server support.

Choosing

  • Local, single-user tool → stdio.
  • Hosted service used by many people → HTTP with authorisation.

Security Notes

For local HTTP servers, bind to localhost and validate the origin of requests. For stdio, remember that the server runs with your privileges — install only servers you trust.

More in MCP

All MCP guides →
MCP Guide · 1 min

MCP Architecture: Hosts, Clients and Servers

How the Model Context Protocol is structured: the host application, the clients it creates and the servers that expose capabilities.

MCP 1 min read 2 Sep 2025

MCP Guide · 2 min

MCP Tools, Resources and Prompts

The three main things an MCP server can offer, who controls each, and when to use which.

MCP 2 min read 1 Sep 2025

MCP Guide · 1 min

Building Your First MCP Server

A walkthrough of the steps to create a simple MCP server that exposes a tool, and how to test it.

MCP 1 min read 30 Aug 2025

MCP Guide · 1 min

MCP Authorisation for Remote Servers

How remote MCP servers authenticate users with OAuth, and good practice for tokens and scopes.

MCP 1 min read 29 Aug 2025