The protocol-derived headers for an outgoing message: the MCP-Protocol-Version header plus, for a draft client, the standard Mcp-Method / Mcp-Name headers and any Mcp-Param-* mirrored tool arguments. Called with Json.undefined (no message — e.g. the GET server stream) it returns only the version header. Never includes Accept / Content-Type / Authorization / Mcp-Session-Id / Last-Event-ID — those are the transport's own.
Whether a response with the given JSON-RPC id belongs to a request the client has cancelled (basic/utilities/cancellation): such a response is dropped rather than returned.
The protocol-side collaborator an McpClient hands to its transport at construction (ClientTransport.setProtocol). It lets the transport pull the protocol-derived request headers and consult the cancelled-request set without knowing anything about the client's draft state, tool inputSchema cache, or cancellation bookkeeping — and without the transport having to be a concrete HttpClientTransport the client downcasts to. McpClient implements this interface.