mcp: fix broken client root capabilities (#698)

To address #607, add ClientCapabilities.RootsV2, and populate it when
constructing sending and receiving InitializeParams.

Fixes #607
This commit is contained in:
Robert Findley 2025-12-11 10:16:56 -05:00 • committed by GitHub
commit a5e369ed12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,3 +29,9 @@ v2.
- `AudioContent.MarshalJSON` should have had a pointer receiver, to be
consistent with other content types.
- `ClientCapabilities.Roots` should have been a distinguished struct pointer
([see #607](https://github.com/modelcontextprotocol/go-sdk/issues/607)).
**Workaround**: use `ClientCapabilities.RootsV2`, which aligns with the
semantics of other capability fields.