Title: Send SEP-2243 Mcp-Method/Mcp-Name headers from the StreamableHTTP client by vidigoat · Pull Request #2730 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Send SEP-2243 Mcp-Method/Mcp-Name headers from the StreamableHTTP client by vidigoat · Pull Request #2730 · modelcontextprotocol/python-sdk
X Title: Send SEP-2243 Mcp-Method/Mcp-Name headers from the StreamableHTTP client by vidigoat · Pull Request #2730 · modelcontextprotocol/python-sdk
Description: Summary
Fixes #2715. Per SEP-2243 (accepted — see the draft changelog), the Streamable HTTP transport requires Mcp-Method and Mcp-Name headers on POST requests so servers/intermediaries can route without parsing the JSON-RPC body. The Python client did not send them.
Changes
_set_mcp_request_headers() sets, for outgoing POST messages:
Mcp-Method: the JSON-RPC method — for requests and notifications
Mcp-Name: params.name (tools/prompts) or, when absent, params.uri (resources)
responses/errors (no method) get neither header
_encode_mcp_header_value() applies the SEP-2243 value-encoding rules to Mcp-Name: safe printable-ASCII values pass through; non-ASCII, control characters, or significant leading/trailing whitespace are wrapped as =?base64?
Open Graph Description: Summary Fixes #2715. Per SEP-2243 (accepted — see the draft changelog), the Streamable HTTP transport requires Mcp-Method and Mcp-Name headers on POST requests so servers/intermediaries can route w...
X Description: Summary Fixes #2715. Per SEP-2243 (accepted — see the draft changelog), the Streamable HTTP transport requires Mcp-Method and Mcp-Name headers on POST requests so servers/intermediaries can route w...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2730
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:deda1f9c-df61-628e-6484-fc534b1c4879 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E6D0:2053C6:C6DA5E:11D48EE:6A5A0222 |
| html-safe-nonce | 8a881ff34acdbd8f8aa26752826f2fed06d99c834de2c76c83d5d0e6c91acacb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkQwOjIwNTNDNjpDNkRBNUU6MTFENDhFRTo2QTVBMDIyMiIsInZpc2l0b3JfaWQiOiI0NDQyMTUzODY3MzkxODAwNjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6e8bf6e1be3acef543a76ea47cb36870edd817bcbb9ee533e378adc69390e672 |
| hovercard-subject-tag | pull_request:3773854519 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2730/files |
| twitter:image | https://avatars.githubusercontent.com/u/219086731?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/219086731?s=400&v=4 |
| og:image:alt | Summary Fixes #2715. Per SEP-2243 (accepted — see the draft changelog), the Streamable HTTP transport requires Mcp-Method and Mcp-Name headers on POST requests so servers/intermediaries can route w... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4d3f961cfc83a4348ee5be7691cf4ae3515aab3ef5200c13a7e41b048125fb61 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac4d28603af300ac851b62521abb878ab5d3319a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width