Model Context Protocol › Transports
Language AI HandbookAll chapters The transport decides how the same protocol messages are framed and delivered. The standard bindings are stdio and Streamable HTTP. Stdio uses newline-delimited messages on the standard input and output of a subprocess. Diagnostic text goes on standard error. Restrict the process's privileges and data access separately.
In modern Streamable HTTP the client sends a JSON-RPC request using POST. The client accepts both JSON and a request-scoped server-sent event stream. The request carries the protocol version in the MCP-Protocol-Version header as well as in params._meta. The Mcp-Method header mirrors the method, and calls such as tools/call also include a matching Mcp-Name. A server that processes the body checks the mirrored headers against it. For a header validation failure, the server returns HTTP 400 with JSON-RPC error -32020. SSE is one response framing option within Streamable HTTP. The older transport called HTTP+SSE is separately deprecated. Streamable HTTP.
For an integration that needs protected HTTP access, MCP defines an optional authorization framework based on the OAuth 2.1 Internet-Draft and related standards. In that framework the MCP server is the protected resource server. It validates the access token for its own audience. Tokens for a different resource cannot be accepted or passed through as the MCP server's own credentials. The server still needs to enforce access rules for the selected operation and data. Transport identity, permission to access a service and approval to perform a particular action answer separate questions.
A tools capability means the server implements tool operations. Its catalog can vary by authorization on the request. A tool listing is not a reason to skip the permission check on a call. For a cacheable list result, ttlMs gives the freshness hint in milliseconds and cacheScope indicates public or private scope. Keep any cached view within its permitted scope and enforce the current permission on each protected operation. See tools and caching.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!