feat: resource update server notify and client handler#264
Closed
Zizo-Vi wants to merge 5 commits intomodelcontextprotocol:mainfrom
Closed
feat: resource update server notify and client handler#264Zizo-Vi wants to merge 5 commits intomodelcontextprotocol:mainfrom
Zizo-Vi wants to merge 5 commits intomodelcontextprotocol:mainfrom
Conversation
Contributor
Author
|
Hi @tzolov, we encountered the following No handler registered issue when try to handle the "notifications/resources/updated" notification on MCP client of our project. I google a lot and found this feature is not implemented, so I submit this PR to add this feature. Could you please help review this PR and add this feature in the following SDK release? |
tzolov
pushed a commit
that referenced
this pull request
Jun 24, 2025
This enables servers to notify clients when specific resources are updated, allowing clients to react to individual resource changes rather than just list changes. - Add ResourcesUpdatedNotification schema with uri field - Add METHOD_NOTIFICATION_RESOURCES_UPDATED constant - Implement notifyResourcesUpdated() methods in McpAsyncServer and McpSyncServer - Add client-side support for resource update consumers and handlers - Client automatically reads updated resource content when notification received - Add tests for both async and sync server implementations Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Contributor
|
Hi @Zizo-Vi , Thank you very mach for contribution a missing capability. |
Contributor
|
Rebased, squashed and merged at 9ebff0c |
Contributor
Author
Thanks for merging, and glad to be contributed. |
Closed
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.

add resource update handler support to McpAsyncClient,and also add notifyResourcesUpdated to MCP server.
resolve #251
Motivation and Context
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context