dart_mcp
A package for making MCP servers and clients.
0.5.2
354K downloads/mo
#628 most downloaded on pub.dev
dart-lang/ai
What this package is like to depend on
Last release 1 months ago
29 Jun 2026
Release timing varies
gaps range from 2 weeks to 4 months
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
14 releases · first in 2025
5 releases in the last 12 months
see the full history below
Release timeline
14 releases · Mar 2025 to Jun 2026
2026
Releases
latest 14-
0.5.229 Jun 2026Release notes
Open source →- Update
listRootsto normalize URIs to file: scheme variants when given raw
file paths. This fixes non-spec compliant clients.
Release notes
Open source →- Update
listRootsto normalize URIs to file: scheme variants when given raw file paths. This fixes non-spec compliant clients.
- Update
-
0.5.128 Apr 2026Release notes
Open source →- Always send a properties object for tool input schemas, see https://github.com/dart-lang/ai/issues/170.
-
0.5.002 Mar 2026Release notes
Open source →- Initial support for protocol version 2025-11-25.
- Added support for
Icons inImplementation,Tool,Resource,ResourceTemplate, andPrompt. - Added support for
ToolChoicein samplingCreateMessageRequest. - Added support for URL-based elicitations in
ElicitRequest.- Separated
ElicitationSupportintoElicitationFormSupportandElicitationUrlSupportmixins, which will affect which capabilities your server advertises. The originalElicitationSupportmixin is now deprecated (and is an alias forElicitationFormSupport). - Added
onElicitationCompleteextension getter toElicitRequest, which will listen fornotifications/elicitation/completenotifications. - If a tool call fails with the
urlElicitationRequirederror code, and the client supports URL based elicitations, the client will automatically handle the elicitation and retry the tool call if the elicitation succeeds.
- Separated
- Added an
McpErrorCodesnamespace for MCP error codes. For now only contains theurlElicitationRequirederror code. - Added examples for URL based elicitations, including handling
urlElicitationRequirederrors. - Added
descriptionfield toImplementation. - Does not add support for Tasks yet.
- Added support for
EnumSchemasubtypes, matching the spec. This includes multi select enums and enums with titles. Validation is also supported. - Added
Meta? metaparam toElicitRequest.
- Added support for
- Added
ConstSchematype for constant values, with validation. - BREAKING:
- Change many fields of
ResourceLinkto be nullable, and their associated parameters to be optional. This brings us in line with the specification. - The
WithElicitationHandlerinterface is now private and implemented by theElicitationFormSupportandElicitationUrlSupportmixins. - Added a required
ServerConnection serverparameter to theElicitationSupport.handleElicitationmethod. ElicitRequest.requestedSchemais now nullable (for url mode).EnumSchemais now a union type with 4 subtypes, matching the spec changes.
- Change many fields of
- Initial support for protocol version 2025-11-25.
-
0.4.113 Jan 2026Release notes
Open source →- Expose various private methods on MCP server mixins as public methods, with
@mustCallSuperannotations. This allows intercepting calls for logging, metrics, or other purposes. - Fix the
resourceparameter type onEmbeddedResourceto beResourceContentsinstead ofContents.- Note: This is technically breaking but the previous API would not have been possible to use in a functional manner, so it is assumed that it had no usage previously.
- Fix the
typegetter onEmbeddedResourceto read the actual type field. - Add
toJsonmethod to theCreateMessageResultof a sampling request.
- Expose various private methods on MCP server mixins as public methods, with
-
0.4.012 Nov 2025Release notes
Open source →- Update the tool calling example to include progress notifications.
- Breaking: Update APIs to accept nullable parameters when the parameters are not required for that method. This is only breaking if you override these methods.
-
0.3.328 Jul 2025Release notes
Open source →- Fix
PingRequesthandling when it is sent from a non-Dart client. - Deprecate
ElicitationAction.rejectand replace it withElicitationAction.decline.- In the initial elicitations schema this was incorrectly listed as
reject. - This package still allows
rejectand treats it as an alias fordecline. - The old
rejectenum value was replaced with a static constant equal exactly todecline, so switches are not affected.
- In the initial elicitations schema this was incorrectly listed as
- Add
titleparameter toPromptconstructor. - Only execute sub-processes in a shell if they are
.batfiles.
- Fix
-
0.3.217 Jul 2025Release notes
Open source →- Deprecate the
EnumSchematype in favor of theStringSchemawith anenumValuesparameter. TheEnumSchematype was not MCP spec compatible.- Also deprecated the associated JsonType.enumeration which doesn't exist in the JSON schema spec.
- Deprecate the
-
0.3.117 Jul 2025Release notes
Open source →- Fixes communication problem when a
MCPServeris instantiated without instructions. - Fix the
contentargument toPromptMessageto be a singleContentobject. - Add new
package:dart_mcp/stdio.dartlibrary with astdioChannelutility for creating a stream channel that separates messages by newlines. - Added more examples.
- Deprecated the
WithElicitationHandlerinterface - the method this required is now defined directly on theElicitationSupportmixin which matches the pattern used by other mixins in this package. - Change the
schemaparameter for elicitation requests to anObjectSchemato match the spec. - Deprecate the
Elicitationsserver capability, this doesn't exist in the spec.
- Fixes communication problem when a
-
0.3.002 Jul 2025Release notes
Open source →- Added error checking to required fields of all
Requestsubclasses so that they will throw helpful errors when accessed and not set. - Added enum support to Schema.
- Add more detail to type validation errors.
- Remove some duplicate validation errors, errors are only reported for the
leaf nodes and not all the way up the tree.
- Deprecated a few validation error types as a part of this, including
propertyNamesInvalid,propertyValueInvalid,itemInvalidandprefixItemInvalid.
- Deprecated a few validation error types as a part of this, including
- Added a
customvalidation error type. - Breaking: Auto-validate schemas for all tools by default. This can be
disabled by passing
validateArguments: falsetoregisterTool. - Updates to the latest MCP spec, 2025-06-08
- Adds support for Elicitations to allow the server to ask the user questions.
- Adds
ResourceLinkas a tool return content type. - Adds support for structured tool output.
- Breaking: Change
MCPClient.connectStdioServersignature to accept stdin and stdout streams instead of starting processes itself. This enables custom process spawning (such as using package:process), and also enables the client to run in browser environments. - Fixed a problem where specifying
--log-filewould cause the server to stop working.
- Added error checking to required fields of all
-
0.2.218 Jun 2025Release notes
Open source →- Refactor
ClientImplementationandServerImplementationto the sharedImplementationtype to match the spec. The old names are deprecated but will still work until the next breaking release. - Add
clientInfofield toMCPServer, assigned during initialization. - Move the
donefuture from theServerConnectionintoMCPBaseso it is available to theMPCServerclass as well.
- Refactor
-
0.2.123 May 2025Release notes
Open source →- Fix the
protocolLogSinksupport when usingMCPClient.connectStdioServer. - Update workflow example to show thinking spinner and input and output token usage.
- Update file system example to support relative paths.
- Fix a bug in notification handling where leaving off the parameters caused a type exception.
- Added
--help,--log, and--modelflags to the workflow example. - Fixed a bug where the examples would only connect to a server with the latest protocol version.
- Handle failed calls to
listRootsin theRootsTrackingSupportmixin more gracefully. Previously this would leave therootsfuture hanging indefinitely, but now it will log an error and set the roots to empty. - Added validation for Schema extension.
- Fixed an issue where getting the type of a Schema with a null type would throw.
- Fix the
-
0.2.005 May 2025Release notes
Open source →- 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 bothMCPServerand 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 overridingResourcesSupport.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 ofcursoras the key for the next cursor. - Breaking: Change the
ProgressNotification.progressandProgressNotification.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 aProtocolVersioninstead of a string. - Breaking: Change the
InitializeResult'sinstructionstoString?to reflect that not all servers return instructions. - Change the
MCPServer.fromStreamChannelconstructor to make theinstructionsparameter optional. - Breaking: Change
MCPBaseto accept aStreamChannel<String>instead of aPeer, and construct its ownPeer. - Breaking: Add
protocolLogSinkoptional parameter to connect methods onMCPClient. - Breaking: Move
channelparameter onMCPServer.newto a positional parameter for consistency.
- Support protocol version 2025-03-26.
-
0.1.011 Apr 2025Release notes
Open source →- Initial release, supports all major MCP functionality for both clients and servers, at protocol version 2024-11-05.
- APIs may change frequently until the 1.0.0 release based on feedback and needs.
-
0.1.0-wip26 Mar 2025 pre-releaseNothing published for this version