package:dart_mcp v0.2.0
·
127 commits
to main
since this release
- Support protocol version 2025-03-26.
- Adds support for
AudioContent. - Adds support for
ToolAnnotations. - Adds support for
ProgressNotificationmessages.
- Adds support for
- Save the
ServerCapabilitiesobject on theServerConnectionclass to make
it easier to check the capabilities of the server. - Add default version negotiation logic.
- Save the negotiated
ProtocolVersionin aprotocolVersionfield for both
MCPServerand theServerConnectionclasses. - Automatically disconnect from servers if version negotiation fails.
- Save the negotiated
- Added support for adding and listing
ResourceTemplates.- Handlers have to handle their own matching of templates.
- Added a
RootsTrackingSupportserver mixin which can be used to keep an
updated list of the roots set by the client. - Added default throttling with a 500ms delay for
ResourceListChangedNotifications andResourceUpdatedNotifications. The
delay can be modified by overriding
ResourcesSupport.resourceUpdateThrottleDelay. - Add
Sink<String> protocolLogSinkparameters to server constructor and client
connection methods, which can be used to capture protocol messages for
debugging purposes. - Only send notifications if the peer is still connected. Fixes issues where
notifications are delayed due to throttling and the client has since closed. - Breaking: Fixed paginated result subtypes to use
nextCursorinstead of
cursoras the key for the next cursor. - Breaking: Change the
ProgressNotification.progressand
ProgressNotification.totaltypes tonuminstead ofintto align with the
spec. - Breaking: Change the
protocolVersionstring to aProtocolVersionenum,
which has all supported versions and whether or not they are supported. - Breaking: Change
InitializeRequestandInitializeResultto take a
ProtocolVersioninstead of a string. - Breaking: Change the
InitializeResult'sinstructionstoString?to reflect
that not all servers return instructions. - Breaking: Change
MCPBaseto accept aStreamChannel<String>instead of
aPeer, and construct its ownPeer. - Breaking: Add
protocolLogSinkoptional parameter to connect methods on
MCPClient. - Breaking: Move
channelparameter onMCPServer.newto a positional
parameter for consistency.