package:dart_mcp v0.2.0
·
30 commits
to main
since this release
- Support protocol version 2025-03-26.
- Adds support for
AudioContent
. - Adds support for
ToolAnnotations
. - Adds support for
ProgressNotification
messages.
- Adds support for
- Save the
ServerCapabilities
object on theServerConnection
class to make
it easier to check the capabilities of the server. - Add default version negotiation logic.
- Save the negotiated
ProtocolVersion
in aprotocolVersion
field for both
MCPServer
and theServerConnection
classes. - Automatically disconnect from servers if version negotiation fails.
- Save the negotiated
- Added support for adding and listing
ResourceTemplate
s.- Handlers have to handle their own matching of templates.
- Added a
RootsTrackingSupport
server 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
ResourceListChangedNotification
s andResourceUpdatedNotification
s. The
delay can be modified by overriding
ResourcesSupport.resourceUpdateThrottleDelay
. - Add
Sink<String> protocolLogSink
parameters 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
nextCursor
instead of
cursor
as the key for the next cursor. - Breaking: Change the
ProgressNotification.progress
and
ProgressNotification.total
types tonum
instead ofint
to align with the
spec. - Breaking: Change the
protocolVersion
string to aProtocolVersion
enum,
which has all supported versions and whether or not they are supported. - Breaking: Change
InitializeRequest
andInitializeResult
to take a
ProtocolVersion
instead of a string. - Breaking: Change the
InitializeResult
'sinstructions
toString?
to reflect
that not all servers return instructions. - Breaking: Change
MCPBase
to accept aStreamChannel<String>
instead of
aPeer
, and construct its ownPeer
. - Breaking: Add
protocolLogSink
optional parameter to connect methods on
MCPClient
. - Breaking: Move
channel
parameter onMCPServer.new
to a positional
parameter for consistency.