Adding roots changed and initialized notification handlers
I've added two server-side notification handlers, one for InitializedNotification and one for RootsListChangedNotification.
Motivation and Context
This allows an MCP server to fully implement roots support, since once the initialization is complete, it needs to be able to request roots from clients which support them, and it needs to be able to react to changes in the client's list of roots if they change.
How Has This Been Tested?
I wrote new tests for the notifications, and merged it with the existing progress notification tests.
Breaking Changes
No breaking changes were introduced.
Types of changes
- [X] New feature (non-breaking change which adds functionality)
Checklist
- [X] I have read the MCP Documentation
- [X] My code follows the repository's style guidelines
- [X] New and existing tests pass locally
- [X] I have added appropriate error handling
- [X] I have added or updated documentation as needed
@felixweinberger I'm new to this repo: do I need to do anything that I haven't done to proceed to a review?
Hi @gspencergoog thank you for this contribution! And apologies for the time it took to get back to you on this, currently getting a handle on managing all the inbound contributions like yours.
No worries, I know how it is. :-)
Hopefully this is closer to what you were expecting now.
@felixweinberger Do you have some time to finish this review?