Skip to content

Revision 2025-03-26 (without streamable http) #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

4t145
Copy link
Collaborator

@4t145 4t145 commented Apr 2, 2025

  1. Suppot revision 2025-03-26 data types
  2. Support meta, progress tokne, and extensions in request/notification,
  3. Remove Message, use JsonRpcMessage directly

Motivation and Context

Support revision 2025-03-26

How Has This Been Tested?

Breaking Changes

  1. Add new types and fields to satisfy the revision 2025-03-26
  2. Now PaginationParam is the previous PaginationParamInner

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@4t145 4t145 mentioned this pull request Apr 2, 2025
4 tasks
@4t145 4t145 marked this pull request as ready for review April 2, 2025 19:38
@4t145 4t145 requested review from Copilot and jokemanfire April 2, 2025 19:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for the 2025-03-26 revision by updating message types, API signatures, and protocol version handling while removing the legacy Message type in favor of JsonRpcMessage. Key changes include:

  • Changing pagination parameters to be optional (Option) across various endpoints.
  • Adding support for meta fields, progress tokens, and extensions in request/notification structures.
  • Updating protocol version constants and ordering, adding new types (e.g. RawAudioContent) and tool annotations.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
examples/servers/src/common/counter.rs Updated pagination parameter type for resource lists.
crates/rmcp/src/transport/sse_server.rs Changed client message handling to use serde_json::Value with error handling.
crates/rmcp/src/service/server.rs Revised initialization logic with protocol version negotiation and message type updates.
crates/rmcp/src/service/client.rs Modified API calls to support optional pagination parameters and added default extensions.
crates/rmcp/src/service.rs Introduced a progress token provider and updated peer request handling.
crates/rmcp/src/model/tool.rs Added an optional annotations field to the Tool structure.
crates/rmcp/src/model/serde_impl.rs Updated serialization/deserialization to integrate meta and extension support.
crates/rmcp/src/model/meta.rs & extension.rs New modules for meta information and protocol extensions support.
crates/rmcp/src/model/content.rs Added RawAudioContent for new audio support.
crates/rmcp/src/model/capabilities.rs Extended ServerCapabilities to include completions and updated builder types.
crates/rmcp/src/model.rs Updated protocol version constants, revised pagination types, and replaced Message with JsonRpcMessage.
crates/rmcp/src/handler/server/tool.rs & server.rs Adjusted pagination parameter types in server handler functions.
crates/rmcp-macros/src/tool.rs Made minor improvements to variable naming in tool macro code.

@4t145
Copy link
Collaborator Author

4t145 commented Apr 2, 2025

I would like to fix the ci lint message when merge.

Copy link
Collaborator

@jokemanfire jokemanfire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The amount of modification is quite large. Please give me more time to take a look

@4t145
Copy link
Collaborator Author

4t145 commented Apr 3, 2025

In China we are going to take a vacation for Qingming Festival these days, so the reply may not be so timely.

1. Suppot revision 2025-03-26 data types
2. Support meta, progress tokne, and extensions in request/notification,
3. Remove `Message`, use `JsonRpcMessage` directly
@4t145 4t145 force-pushed the revision-2025-03-26-without-streamable-http branch from 0950ba1 to fb60fc4 Compare April 3, 2025 17:52
@4t145 4t145 requested review from jokemanfire and kalvinnchau April 3, 2025 17:54
@4t145
Copy link
Collaborator Author

4t145 commented Apr 5, 2025

@jokemanfire @kalvinnchau I think this pr is ready for merge, could you please review this again?

@jokemanfire jokemanfire added this to the Pre release milestones milestone Apr 6, 2025
@4t145 4t145 merged commit 6837546 into modelcontextprotocol:main Apr 7, 2025
7 checks passed
@4t145 4t145 mentioned this pull request Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants