NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #5075 most downloaded on pub.dev
Dart implementation of Model Context Protocol (MCP) client. Supports protocol revisions 2024-11-05 / 2025-03-26 / 2025-06-18 / 2025-11-25 with per-version capability negotiation, OAuth 2.1, and stdio / SSE / Streamable HTTP transports.
Last release 1 months ago
13 Aug 2026
Release timing varies
gaps range from 2 weeks to 4 months
Nearly every release is documented
notes for 18 of 20 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
20 releases · first in 2025
Client.connect fails when the transport reports a wire error instead of waiting out the 30-second request timeout. Requests in flight are completed wi
Client.connect fails when the transport reports a wire error instead of
waiting out the 30-second request timeout. Requests in flight are completed
with that error rather than left pending. An unreachable endpoint now fails
in milliseconds.StreamableHttpTransportConfig.headers is set when the transport is built and spread onto every request unchanged. Anything that expires cannot live th
StreamableHttpTransportConfig.headers is set when the transport is built and spread onto every request unchanged. Anything that expires cannot live there: a host holding a short-lived attestation or session credential has no way to attach it, because by the time a request goes out the value it captured is stale.
headersProvider is asked on every outbound request — POST, the SSE GET stream, and the session-terminating DELETE — and receives (url, method) so one provider can serve several transports and decide per destination. RequestHeadersProvider and reservedHeaderNames are exported with the transport.
Three properties make it safe to hand to host code, including a page script:
Content-Type, Accept, MCP-Session-Id, MCP-Protocol-Version, Mcp-Method, Mcp-Name, Last-Event-ID) are dropped rather than honoured, matched case-insensitively. A supplied MCP-Session-Id would otherwise fail the exchange in a way that reads as the server's fault.headersProviderTimeout (5s default), contributes nothing and the request goes without it. Failing the request instead would report a hook problem as an unreachable server. What the origin then says about the missing credential is the accurate answer, and it comes from the origin.lastHeadersProviderError records the last one, because "the origin refused us" and "we never attached what the origin wanted" look identical on the wire and send a debugger to different places.Explicitly configured headers win over supplied ones: a host that set a value meant it, and the provider is the general case yielding to the specific one.
Additive — no existing name or signature changed, and a transport with no provider behaves exactly as before. Ten regressions assert against a real socket, since the header map is assembled inside the transport and a mocked client would only be checking our own arrangement. Both guards mutation-checked.
One column per month.
Two cuts. The transport split changes behavior only on platforms without dart:io — the STDIO and legacy SSE implementations are the same code, moved t
Two cuts. The transport split changes behavior only on platforms without
dart:io — the STDIO and legacy SSE implementations are the same code, moved to
the native branch of a conditional export. The conformance work adds methods and
makes the protocol revision selectable; it removes nothing.
Found by running this client against the official reference server: the calls
simply did not exist on Client.
ping() — and an inbound ping is now answered with an empty result. The
server side already handled ping; the client neither sent nor answered one,
so a server keepalive got Method not found back.complete(ref, argument, {context}) for completion/complete.Client.protocolVersion was final, fixed at build time. A client could not
speak a revision a peer offered, and could not be exercised against more than
one. It is now a constructor parameter, carried through McpClientConfig,
McpClient.createClient and copyWith, defaulting to this build's default
version.
2026-07-28The Streamable HTTP transport mirrors Mcp-Method, and for the operations that
name a target Mcp-Name, into headers on the stateless path, using the
specification's base64 sentinel when a value cannot be carried as plain ASCII.
The values are derived from the body, never assumed: a mirror that disagrees
with the body is a rejectable mismatch.
ClientTransport moved to src/transport/client_transport.dart so both
platform branches implement one type. src/transport/transport.dart is now a
barrel that resolves StdioClientTransport and SseClientTransport per
platform.src/transport/legacy_sse.dart instead of being exported individually.
mcp_client.dart exports the barrel; the class names it re-exports are
unchanged.dart:io, constructing a transport that requires it now
fails with an explicit McpError naming the unsupported transport and
pointing at StreamableHttpClientTransport, instead of surfacing an opaque
platform error from deep inside the implementation. An unavailable capability
is reported, never silently substituted.example/mcp_client_example_2.dart — non-English log strings replaced with
English.Additive, backward-compatible (all new fields optional/named; ==/hashCode unchanged; behavior changes are negotiated-version gated). No public API rem
Additive, backward-compatible (all new fields optional/named; ==/hashCode
unchanged; behavior changes are negotiated-version gated). No public API removed.
ResourceTemplate.icons (was dropped on resource templates).CreateMessageRequest.tools / toolChoice
(SamplingToolChoice builders) + CreateMessageResult.toolCalls (SEP-1577).elicitation.dart): EnumSchema (titled/untitled
enumNames), single- and multi-select enums (SEP-1330), URL-mode elicitation
(SEP-1036), primitive default values (SEP-1034); raw-map path preserved.Implementation.description on ClientInfo / ServerInfo.WwwAuthenticateChallenge.parse +
discoverFrom401), OIDC Discovery 1.0 (PR#797), Client ID Metadata Documents
(SEP-991, OAuthConfig.clientIdMetadataUrl), incremental scope step-up (SEP-835).CallToolResult.isStreaming — non-standard hint, honored nowhere. Standard
streaming = enable via a tool (tools/call) + deliver via a reactive resource
(Client.listen/subscriptions/listen, or legacy subscribeResource).
Retained + serialized for backward compatibility; removed in 3.0.connect(statelessMode: true), default off)_meta reverse-DNS keys (McpRequestMeta), server/discover (Client.discover()),
Multi-Round-Trip (InputRequiredResult), subscriptions/listen (Client.listen),
Extensions framework (ClientCapabilities.extensions), Tasks extension
(getTask / updateTask / cancelTask), RFC 9207 iss validation.Tool / Resource / ResourceTemplate .fromJson no longer require description (optional per the MCP spec; missing → ''). A server omitting it made tools/
Tool / Resource / ResourceTemplate .fromJson no longer require
description (optional per the MCP spec; missing → ''). A server omitting
it made tools/list / resources/list parsing throw a Null cast.Big-Bang spec normalization. Supports protocol revisions 2024-11-05, 2025-03-26, 2025-06-18, and 2025-11-25 with per-version capability gating. Pairs
Big-Bang spec normalization. Supports protocol revisions 2024-11-05, 2025-03-26, 2025-06-18, and 2025-11-25 with per-version capability gating. Pairs with mcp_server 2.0.
client.createMessage(...) (which sent a request to the server) is removed. Sampling is server-initiated per spec — register a handler with client.onSamplingRequest((req) async { ... }) so the host LLM fulfils it.client.listRoots() (which sent a request to the server) is removed. The server requests roots from the client; configure them locally with client.addRoot(...) / client.removeRoot(...) and read via client.roots. Override the default response handler with client.onListRoots(...). roots/add and roots/remove JSON-RPC methods (non-spec) are deleted.client.cancelOperation(opId) (which sent a cancel request) is removed; use client.notifyCancelled(requestId, reason: ...) which emits the spec notifications/cancelled notification.setLoggingLevel now sends logging/setLevel (camelCase) per spec — was logging/set_level.client.healthCheck() removed — health/check is non-spec; expose health via your transport (e.g. an HTTP /health endpoint).onSamplingResponse listener removed — the non-spec sampling/response notification path is gone, replaced by the standard request/response shape.client.onSamplingRequest(handler) — register a host LLM completion handler.client.onElicitationRequest(handler) — register a user-input handler (spec 2025-06-18 elicitation/create).client.onListRoots(handler) — override the default roots/list response.client.notifyCancelled(requestId, {reason}) and client.notifyProgress(token, progress, {total, message}) — spec notifications.ClientCapabilities.elicitation flag.McpProtocol.v2025_06_18 and McpProtocol.v2025_11_25 constants. defaultVersion advances to v2025_11_25.McpProtocol.supportsBatching / supportsElicitation / requiresProtocolHeader.Tool.title / Tool.outputSchema / Tool.icons / Tool.meta. CallToolResult.structuredContent. AudioContent. ResourceLinkContent.README cleanup — removed "MCP Family" section, installation block, dev.to articles, and donation links.
Zero breaking changes - fully backward compatible, opt-in only
ToolMetadata - Lightweight tool representation (name + description only)ToolRegistry - Cache layer for tool definitions with metadata extractionClientToolMetadataExtension - Extension for easy metadata accessAdded terminateOnClose parameter to StreamableHTTP transport configuration
terminateOnClose parameter to StreamableHTTP transport configuration
true to maintain backward compatibilityfalse to allow reconnection after disconnect without server session terminationhasSession() checkFixed SSE endpoint parsing issue where endpoint data was incorrectly processed as null
Breaking Changes and Major Update to 2025-03-26 Protocol
Breaking Changes and Major Update to 2025-03-26 Protocol
New Features
Technical Improvements
Client event monitoring system using Dart's Stream API
onConnect stream for server connection eventsonDisconnect stream for server disconnection eventsonError stream for error eventsServerInfo class for connection detailsDisconnectReason enum for disconnect causesdispose() method for proper resource cleanupNothing published for this version
Nothing published for this version
* Bug Fixed
* Bug Fixes
SSE Transport Connection Issues: Fixed critical issue with Server-Sent Events (SSE) connection where the client could not properly process JSON-RPC re
Protocol Update: Full support for all features of the 2024-11-05 protocol specification
* Bug fixes
Created Model Context Protocol (MCP) client implementation for Dart
Your coding agent can read these notes before it upgrades. Set up the MCP server →