feat: add SEP-2575 discovery and SEP-2322 MRTR models#946
Closed
erenatas wants to merge 1 commit into
Closed
Conversation
ab274c9 to
23b3212
Compare
Introduce the first scoped 2026-07-28 stateless MCP protocol surface in rmcp. Existing 2025 stateful flows and the default protocol version remain unchanged. Changes: - Add server/discover request and DiscoverResult models for SEP-2575. - Wire discover through ServerHandler with a default get_info()-based implementation. - Add 2026-07-28 protocol-version awareness while keeping LATEST at 2025-11-25. - Add SEP-2322 MRTR models: ResultType, InputRequest, and InputRequiredResult. - Add InputResponse for typed client-to-server MRTR input responses. - Add inputResponses and requestState to CallToolRequestParams. - Route server/discover through CustomRequest to preserve public enum semver. - Serialize typed new results through CustomResult to preserve public enum semver. - Allow CallToolResult to carry optional resultType for wire compatibility. - Register new model types in serde, meta, and schema plumbing. - Preserve PartialEq on existing task payload params. - Document why MRTR still exposes SEP-2577-deprecated sampling variants. - Add deserialization, schema, and round-trip coverage for the new wire shapes. Signed-off-by: Eren Atas <eren_atas@hotmail.com>
23b3212 to
943a367
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce the first scoped 2026-07-28 stateless MCP protocol surface in
rmcp without changing the default protocol version or existing stateful
flows.
Changes:
Motivation and Context
This adds the first scoped rmcp model-layer support for the MCP 2026-07-28 release candidate stateless protocol work.
The change is tied primarily to:
server/discoveras the stateless replacement path for handshake-time capability discovery.inputRequired,inputRequests,inputResponses, andrequestState.This is needed so rmcp can begin supporting fully stateless MCP servers while preserving the current 2025-11-25 default behavior.
How Has This Been Tested?
Tested locally in rmcp with:
cargo fmtcargo test -p rmcp --test test_deserialization -- --nocapturecargo test -p rmcpgit diff --checkAlso tested against a real remote MCP server locally by temporarily pointing its workspace
rmcpdependency to this local SDK branch.Breaking Changes
No intentional breaking changes.
Existing 2025 initialization/session flows remain available, and
ProtocolVersion::LATESTremains2025-11-25.Validation against a server surfaced downstream compatibility concerns from rmcp 2.0 renames, so this PR also adds deprecated aliases for older names:
ContentPromptMessageContentPromptMessageRoleUsers should not need to update code for this PR, but they may see deprecation warnings if they still use those old names.
Types of changes
Checklist
Additional context
This PR is intentionally scoped to the model/handler foundation for SEP-2575
server/discoverand SEP-2322 MRTR. It does not implement stateless HTTP transport mode,Mcp-Method/Mcp-Namevalidation, OAuth hardening, Tasks, Apps, or cache TTLbehavior.
MRTR includes sampling request/response variants because sampling is deprecated by SEP-2577 but still retained by the protocol lifecycle.