5.3 Transport Protocol and Message Format
The Model Context Protocol supports two primary transport mechanisms: STDIO (Standard Input/Output) and HTTP [i.19] combined with SSE (Server-Sent Events) [i.20].
The STDIO mechanism uses standard input and output streams and is typically used for direct inter-process communication on the same machine, delivering optimal performance without network overhead.
In contrast, the HTTP with SSE mechanism relies on HTTP for communication, with server-sent events for server-to-client messages and POST requests for client-to-server communication, making it suitable for distributed setups. Both local and distributed communication modes use JSON-RPC 2.0 [i.21] as the message format for data transmission.