| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Bump to latest stable release https://github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v3.1.0 ``` Added classify authorization-required errors (modelcontextprotocol/rust-sdk#1056) add strict stateless protocol metadata validation (modelcontextprotocol/rust-sdk#1091) SEP-2260 stream-based enforcement of client receive-side request association (modelcontextprotocol/rust-sdk#1055) Fixed (model) decode metadata-bearing input-required results affecting mrtr (modelcontextprotocol/rust-sdk#1097) require metadata for modern HTTP requests (modelcontextprotocol/rust-sdk#1089) honor supported_protocol_versions when negotiating initialize (modelcontextprotocol/rust-sdk#1093) Other document the ping utility with examples (modelcontextprotocol/rust-sdk#1106) complete Tier 1 feature docs and finalize roadmap (modelcontextprotocol/rust-sdk#1101) (conformance) meeting requirements for tier 1 (modelcontextprotocol/rust-sdk#1087) ``` Signed-off-by: Filinto Duran <1373693+filintod@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Add an opt-in Streamable HTTP server setting that requires stateless JSON-RPC
request POSTs to carry their per-request protocol signals before handler
dispatch.
Motivation and Context
The general-purpose SDK preserves compatibility when
MCP-Protocol-Version is absent by treating a stateless request as protocol
version 2025-03-26. Modern-only servers need a supported way to reject that
fallback without changing the SDK default or maintaining custom middleware.
StreamableHttpServerConfig::with_stateless_protocol_metadata_required(true)
adds that enforcement on requests routed statelessly:
HeaderMismatch (-32020) before dispatch
_meta.io.modelcontextprotocol/protocolVersion return HTTP 400 with
Invalid Params (-32602) before dispatch
their existing behavior and error precedence
The validator checks metadata presence rather than applying a version
allowlist. In practice, rmcp clients negotiated below 2026-07-28 do not
attach per-request protocol metadata, so enabling this setting rejects their
ordinary requests. Servers using it should normally restrict
ServerHandler::supported_protocol_versions() to 2026-07-28 and later.
This complements #1089. That PR validates required body metadata when a
request already selects 2026-07-28; this opt-in setting additionally lets a
strict stateless server reject requests that omit both version signals and
would otherwise take the compatibility fallback.
How Has This Been Tested?
Added invocation-counter integration tests covering:
The focused Streamable HTTP protocol-version suite passes 18 tests.
Also ran:
Breaking Changes
None. The new setting defaults to false, and the legacy session path is
unchanged.
Types of changes
Checklist
Additional context
The setting is enforced only after routing selects the stateless branch. Set
legacy_session_mode(false) when every request must use that path. With mixed
routing enabled, regression coverage verifies that the setting does not shadow
legacy session dispatch or the required 404 response for unknown and
terminated sessions.