| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The streamable HTTP client transport now mirrors the JSON-RPC method of outgoing requests and notifications into the Mcp-Method HTTP header, as required by SEP-2243. Responses do not carry a method and are sent without the header. Signed-off-by: Nikita Kibitkin <nikita.n.kibitkin@gmail.com>
|
Heads-up on overlap: #1112 (draft) touches the same two source files as this PR — HttpClientStreamableHttpTransport and HttpHeaders — and adds the server-side header/body validation this PR leaves as a follow-up, plus Mcp-Name. #994 also implements Mcp-Name across an overlapping file set, so there are now three open PRs against #990. I have no interest in landing over anyone's work. Happy to drop the client-side half of #1112 and rebase its server-side validation on top of this, or to fold this in — whichever split maintainers prefer. This comment was created with AI assistance. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation and Context
Contributes the client-side Mcp-Method part of #990.
SEP-2243 (final, https://modelcontextprotocol.io/seps/2243-http-standardization) requires Streamable HTTP clients to mirror the JSON-RPC method of every request and notification into the Mcp-Method HTTP header, so proxies and load balancers can route MCP traffic without parsing the body. The client transport currently does not send this header.
#994 covers the Mcp-Name header. This PR is limited to client-side emission of Mcp-Method; server-side validation of header/body consistency is left as a follow-up, since #994 already touches that area for Mcp-Name. If #994 merges first, I will rebase on top of it.
Description
How Has This Been Tested?
Three new tests in HttpClientStreamableHttpTransportTest (request, notification, response cases), using the existing request-customizer hook to capture the outgoing request. The two header-presence tests were verified to fail without the production change. All streamable HTTP client suites pass locally:
Breaking Changes
None. The header is additive and limited to Streamable HTTP client POSTs.
Types of changes