AI Hints
Home›MCP Tutorial›Building Blocks
MCP · Lesson 6 of 120

Transports

Stdio and HTTP.

⏱ 2 min read▶ Video at 4:36🎓 Free
Watch this lesson in the MCP courseWatch on YouTube ↗Full MCP course

Messages need a way to travel. MCP has two standard transports. Standard input and output, for servers running on your own computer. And streamable HTTP, for servers on the web.

Transports
From the video: Transports
  • Messages must travel
  • stdio
  • Streamable HTTP

stdio or HTTP

With standard IO, the host starts the server as a program, and they talk through its input and output. With HTTP, the server runs on its own, and many clients connect over the network.

stdio

  • Host starts the serverSame computerOne client

Streamable HTTP

  • Server runs aloneOver the networkMany clients

Which to use

Use standard IO for local tools, like files on your laptop. Use HTTP for shared servers, like a company's order system. The tools and code inside the server stay the same.

keyvalue
Local toolsstdio
Shared serversHTTP
Server codethe same
Switchone line

Summary

Standard IO is for local servers, and streamable HTTP is for servers on the web. Next, installing the SDK.

Key takeaways
  • stdio
  • HTTP
  • Same server code
Next up: Installing the SDK — mcp for Python