python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Adding roots changed and initialized notification handlers

Open gspencergoog opened this issue 7 months ago • 3 comments

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

gspencergoog avatar Jun 26 '25 18:06 gspencergoog

@felixweinberger I'm new to this repo: do I need to do anything that I haven't done to proceed to a review?

gspencergoog avatar Aug 05 '25 18:08 gspencergoog

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.

gspencergoog avatar Sep 23 '25 17:09 gspencergoog

@felixweinberger Do you have some time to finish this review?

gspencergoog avatar Oct 28 '25 21:10 gspencergoog