mcp_dart 2.2.0
mcp_dart: ^2.2.0 copied to clipboard
Dart and Flutter SDK for building Model Context Protocol (MCP) servers, clients, hosts, and AI tools.
2.2.0 #
Documentation #
- Added interoperability, Flutter recipe, and migration cookbook guides, and expanded MCP Apps example guidance with host compatibility notes.
- Added an MCP 2025-11-25 spec coverage matrix that maps high-risk requirements to unit tests, TypeScript interop tests, CLI conformance cases, and known follow-up gaps.
- Added deployment-oriented security coverage for Streamable HTTP Host/Origin allowlists, auth gating, compatibility-toggle trade-offs, and OAuth PKCE S256 example flow, including TypeScript SDK OAuth interop coverage.
- Documented first-class OAuth protected-resource metadata and bearer challenge
support for
StreamableMcpServer. - Refreshed example documentation for current stdio, weather, Streamable HTTP, Flutter, Jaspr, and MCP Apps flows, including non-credentialed smoke commands.
- Refreshed additional guide snippets for request timeouts, task capability
pre-advertisement, progress reporting, local documentation links, and
documented
dart runtargets. - Improved pub.dev discoverability metadata with a clearer package description, documentation link, topics, platform declarations, and package page summary copy.
Spec Alignment #
- Preserved the MCP
Result._metafield across typed result serializers, including initialization, roots, resources, prompts, completion, elicitation, tools, tasks, sampling, and empty results. - Aligned stable completions support with MCP 2025-11-25 by advertising
{"completions": {}}and moving the old completion list-changed helper to an explicit experimental notification namespace. - Aligned URL-mode elicitation responses with MCP 2025-11-25: URL accept
results now serialize only the user
action, while completion still usesnotifications/elicitation/complete.ElicitResult.fromJson()now rejects actions outsideaccept,decline, andcancel. - Changed titled
JsonEnumoutput to JSON Schema 2020-12-nativeoneOfor array-itemanyOfconst/title entries while continuing to parse legacyenumNamespayloads. - Added first-class MCP OAuth client discovery for
StreamableHttpClientTransportthrough optionalOAuthAuthorizationCodeProvidersupport: bearer challenge parsing, protected-resource metadata discovery, authorization-server/OIDC metadata discovery, PKCE S256 authorization URLs withresource, and token exchange withcode_verifierandresource. - Added
OAuthAuthorizationCodeTokensfor token response metadata returned by the authorization-code exchange path without changing the baseOAuthTokensAPI shape used by existing providers and subclasses. - Added
StreamableMcpAuthenticationResultfor high-level Streamable HTTP servers that need to distinguish allow, unauthorized, and OAuthinsufficient_scope403 responses while preserving the existing boolauthenticatorpath. - Tightened MCP/JSON-RPC boundary validation for request IDs, progress tokens,
cancellation request IDs, and sampling tool-use capability gating so malformed
wire values and unsupported
sampling.toolsrequests fail before handler code runs. - Added optional
StreamableMcpServerOAuth protected-resource support that serves OAuth Protected Resource Metadata and returns spec-shapedWWW-Authenticate: Bearer ... resource_metadata=...challenges for failed authentication, including an explicit public metadata URL for reverse-proxy deployments, while preserving legacy generic-auth403behavior when the option is not configured. - Enforced MCP task related-metadata and progress rules by overwriting reserved related-task metadata from the SDK's source task id, preserving unrelated handler metadata, and rejecting repeated/decreasing progress values before sending invalid progress notifications.
- Added MCP
completion/completewire support forcontext.argumentsandPromptReference.title, including context-aware server completion callbacks for prompt and resource-template completions. - Enforced explicit task-augmented request negotiation via
tasks.requests.*: task-based tool calls requiretasks.requests.tools.call, server-initiated task sampling requirestasks.requests.sampling.createMessage, and server-initiated task elicitation requirestasks.requests.elicitation.create. - Enforced MCP lifecycle ordering for incoming protocol messages: servers now
reject operation requests before
initializeand beforenotifications/initialized, and clients now reject server-initiated operation requests before sendingnotifications/initialized. - Validated
elicitation/createparameters as the MCP 2025-11-25 form/URL union, including URL-only client handler registration and unsupported elicitation-mode rejection. - Added MCP 2025-11-25 stable metadata coverage for
Resource.size,Root._meta, stableicons, resource annotations, and tool annotations. Legacy singulariconfields and non-stable annotation helper fields remain parse-compatible but are no longer emitted on stable schema objects. - Enforced stable
Tool.inputSchemaandTool.outputSchemaroot-object shapes at parse and serialization boundaries while preserving the existingJsonSchema-typed public fields for source compatibility. - Aligned JSON-RPC response ID handling with the MCP schema: result responses
require a string or integer
id, error responses may omitid, and malformed response IDs fail during parsing. - Stopped serializing non-stable server capability fields such as top-level
elicitationandtasks.listChanged; legacy payloads still parse for compatibility. - Tightened MCP form elicitation validation to require object-root
requestedSchemavalues with primitive property schemas, restrictedElicitResult.contentto spec-supported primitive values, and validated URL-required error data. - Kept task
_metaonly where MCP permits result or notification metadata: bare nestedTaskvalues in task lists and task creation results no longer serialize_meta. - Refused OAuth authorization-code discovery when the authorization server
metadata omits
code_challenge_methods_supportedor does not advertiseS256. - Added Streamable HTTP resumability priming events so server-initiated SSE
streams with an
EventStorebegin with an eventidand emptydataframe, matching the MCPLast-Event-IDreconnection guidance.
Compatibility Notes (Potentially Breaking) #
- MCP 2025-11-25 wire validation is stricter:
- Stable metadata serializers no longer emit legacy singular
iconfields,ResourceAnnotations.title,ToolAnnotations.priority, orToolAnnotations.audience; those fields still parse into deprecated Dart accessors for one compatibility window. - Missing required result arrays such as
resources,resourceTemplates,contents,prompts,tools,roots, andtasksnow fail during parsing. Empty arrays remain valid when the required key is present. Tool.inputSchema,Tool.outputSchema, and form elicitationrequestedSchemavalues must serialize as root JSON objects. Primitive root schemas are rejected at the MCP wire boundary.- Successful JSON-RPC responses with
id: nullare rejected. Error responses may omitid; legacyid: nullerror payloads still parse, but serialize by omitting the field. - OAuth authorization-code discovery now requires advertised PKCE
S256support; clients refuse servers that omitcode_challenge_methods_supported.
- Stable metadata serializers no longer emit legacy singular
- Stable completion list-changed wire behavior is removed:
ServerCapabilitiesCompletions(listChanged: true)remains source-compatible and still parses legacy payloads, but serializes as the stable MCPcompletions: {}capability.sendCompletionListChanged()is deprecated and emitsnotifications/experimental/completions/list_changedinstead of the non-spec stable method.
- URL-mode elicitation result echoes are no longer emitted:
- Deprecated
ElicitResult.urlandElicitResult.elicitationIdfields remain parse-compatible for legacy payloads, buttoJson()omits them. - Invalid
ElicitResult.actionvalues now fail during parsing.
- Deprecated
- Lifecycle and elicitation validation are stricter:
- Peers that send operation requests before initialization completes now
receive
invalidRequesterrors instead of reaching request handlers. - Invalid form/URL
elicitation/createparameter combinations now fail during parsing or serialization. - No public API signatures were removed or renamed; this is a behavioral wire-protocol compatibility change.
- Peers that send operation requests before initialization completes now
receive
- Task cancellation now returns the final task state:
tasks/cancelresponses now serialize the cancelledTaskrequired by MCP 2025-11-25 instead of an empty result object.- New spec-compliant APIs expose that result explicitly:
onCancelTaskWithResult,CancelTaskCallback,CancelTaskResultHandler.cancelTaskWithResult, andTaskClient.cancelTaskWithResultreturn the cancelledTask. - Legacy APIs remain source-compatible for one compatibility window:
onCancelTask,ToolTaskHandler.cancelTask, andTaskClient.cancelTaskare deprecated shims. The server-side legacy shims still return a full cancelledTaskon the wire by resolving the post-cancel task throughonGetTask/getTask. TaskClient.cancelTaskWithResultexpects a task-shaped result and will reject older non-compliant servers that still return{}. DeprecatedTaskClient.cancelTaskremains available when callers intentionally need the legacy empty-result behavior.Task.fromJson()requires MCP-required task fields (createdAt,lastUpdatedAt, andttl), and theTaskconstructor now requiresttl,createdAt, andlastUpdatedAtso serialization is non-throwing for valid task instances.TaskStatusNotification.fromJson()likewise requires the full MCPNotificationParams & Taskshape (taskId,status,ttl,createdAt, andlastUpdatedAt), and task status notifications always serialize the requiredttlkey even when it isnull.Task.toJson()continues to serialize requiredttleven when it isnull, and now omits optionalpollIntervalwhen it is not set.- Task stores now treat terminal tasks (
completed,failed,cancelled) as immutable, preventing later status or result overwrites.
- Streamable HTTP session/replay semantics are stricter:
- Custom
sessionIdGeneratoroutput must now be non-empty visible ASCII without spaces or control characters; invalid generated IDs fail initialization before anMCP-Session-Idheader is written. - Concurrent standalone GET SSE streams no longer receive broadcast copies of each server-originated message. Messages are routed to one active stream so resumability can preserve the MCP stream ownership boundary.
- Custom
EventStoreimplementations must return non-empty visible-ASCII SSE event IDs without spaces or control characters, scopeLast-Event-IDreplay to the owning live transport/session stream, and reject unknown or foreign event IDs instead of replaying unrelated stream history.
- Custom
Compatibility Notes #
- Custom transports remain source-compatible while string request routing is available:
Transport.send(... relatedRequestId: ...)keeps the existingint?signature for third-party custom transports and middleware.- Transports that route by JSON-RPC request ID can opt into
RequestIdAwareTransport.sendWithRequestId(... relatedRequestId: ...)to receive the full MCP/JSON-RPC request ID shape (Stringorint). - Middleware wrappers that implement
RequestIdAwareTransportshould forward throughsendPreservingRequestId(...)so string IDs are not dropped.
Reliability #
- Scoped Streamable HTTP SSE resumability to the stream identified by
Last-Event-ID, allowing multiple concurrent GET SSE streams per session without replaying events from unrelated streams. - Routed each server-originated standalone GET SSE message to one active stream instead of broadcasting the same JSON-RPC message across concurrent streams, and retried another active stream when the selected target was stale.
- Returned
404 Session not foundfor stale, unknown, or terminated Streamable HTTP session IDs across high-level and bare transports, retried client initialization once without a stale preconfigured session ID, refreshed stale sessions with single-flight reinitialization before retrying post-initialize requests, and stopped old SSE reconnect loops after a session reset. - Honored
RequestOptions.resetTimeoutOnProgressandmaxTotalTimeouttogether so progress notifications can reset inactivity timers without bypassing the absolute total timeout cap. - Supported string progress tokens end-to-end for outgoing requests that supply
a custom
progressToken, while preserving generated integer tokens for the defaultRequestOptions.onprogresspath. - Preserved string JSON-RPC request IDs when handler code sends nested requests, notifications, or cancellation notifications, keeping related-request routing compatible with clients that use string IDs.
- Improved JSON Schema parsing and validation for
const, enum-only schemas, titled enumconstentries, and simpletypearray unions such as nullable schemas. - Fixed browser example interoperability by allowing the MCP protocol-version header in CORS preflight responses, mapping Flutter prompt input to advertised prompt arguments, and using typed DOM inputs in the Jaspr client.
Tooling #
- Added
mcp_dart conformancewith built-in JSON-RPC and protocol-version fixture checks, deterministic JSON-RPC fuzz cases, exact-case filtering, and JSON output for CI/scripts. - Added a
mcp_dart conformance --suite specgate for MCP 2025-11-25 lifecycle, capability, elicitation, task-metadata, and progress-token raw-wire checks. - CI now runs
mcp_dart conformance --suite all --jsonso JSON-RPC and protocol-version fixtures are checked with the spec suite. - Added local non-credentialed example smoke tests for stdio, iostream, required-field schema preservation, CLI inspect, completions, and MCP Apps metadata examples.
- Added Markdown documentation guards for broken local links and documented
dart runtargets.
2.1.1 #
Compatibility Notes (Potentially Breaking) #
JsonEnumwire format is now standard JSON Schema:JsonEnum.toJson()emits standard JSON Schema enum forms instead of the legacytype: 'enum'/valuesshape.- Legacy serialized enum input using
valuesis still accepted when parsing.
Reliability #
- Fixed
JsonEnumtool/input schema serialization to use standard JSON Schema enum output, improving compatibility with downstream consumers that reject the legacytype: 'enum'/valuesshape. - Serialized concurrent stdio transport writes so overlapping requests no longer
trip Dart
IOSinkwrite/flush errors.
Documentation #
- Updated installation snippets and schema/stdio transport guidance for the 2.1.1 release.
2.1.0 #
Compatibility Notes (Potentially Breaking) #
- Streamable HTTP defaults are stricter:
- DNS rebinding protection is enabled by default for Streamable HTTP server entry points.
- Unsupported
MCP-Protocol-Versionrequest headers are rejected by default. - JSON-RPC batch POST payloads are rejected by default.
- Use compatibility toggles to preserve legacy behavior during rollout:
strictProtocolVersionHeaderValidation: falserejectBatchJsonRpcPayloads: falseenableDnsRebindingProtection: false
- Sampling response shape can now be multi-block:
SamplingMessage.contentandCreateMessageResult.contentmay be either a single block or a list.- Prefer normalized access via
contentBlocks.
- Enum expansion:
StopReasonnow includestoolUse; exhaustiveswitchstatements may need an additional branch.
Features #
- Added SDK runtime logging helper APIs:
setMcpLogHandler,resetMcpLogHandler, andsilenceMcpLogs. - Added
Logger.resetHandler()to restore the default internal log output. - Added backward-compatible sampling/content API shims while keeping 2025-11-25 wire-format compliance:
CreateMessageRequest.toolChoicesupports legacy map and typedToolChoiceSamplingMessage.contentandCreateMessageResult.contentaccept single or array content forms with normalizedcontentBlocksaccessResourceLink.annotationssupports map form with typedparsedAnnotationsaccessor
- Added Streamable HTTP compatibility toggles:
strictProtocolVersionHeaderValidationrejectBatchJsonRpcPayloads
- Added related-task metadata compatibility behavior by dual-writing
io.modelcontextprotocol/related-taskand legacyrelatedTaskkeys.
Documentation #
- Added runtime logging guidance with
package:loggingintegration examples using import aliases. - Updated transport logging middleware examples to match SDK logger methods (
debug/info/warn/error). - Added
doc/migration_2025_11_25_compat.mdwith compatibility-mode and API migration guidance. - Updated transport/client/quick-reference docs for strict defaults and compatibility toggles.
Reliability #
- Fixed Streamable HTTP
Acceptheader parsing to handle repeated/multi-value headers without throwingHttpException, improving compatibility with clients that send duplicated or splitAcceptvalues. - Centralized DNS rebinding validation across Streamable HTTP and legacy SSE server entry points.
- Added interop coverage for Dart/TypeScript sampling flows (
sampling.toolscapability and tool-choice propagation).
2.0.0 #
Breaking Changes #
- JSON Schema API:
JsonObject.additionalPropertiesandJsonSchema.object(additionalProperties: ...)now useObject?instead ofbool?.additionalPropertiesmay now be eitherboolorJsonSchema, matching the JSON Schema specification.
Features #
- MCP Apps Support:
- Added typed MCP Apps metadata models and helpers (
McpUiToolMeta,McpUiResourceMeta,McpUiCsp,McpUiPermissions) with extension capability helpers forio.modelcontextprotocol/ui. - Added TypeScript-style server helpers (
registerAppTool,registerAppResource,getUiCapability) and metadata normalization for_meta.ui.resourceUriand legacy_meta['ui/resourceUri']. - Added MCP Apps server examples for helper-based and manual metadata wiring.
- Added typed MCP Apps metadata models and helpers (
Compatibility #
- Host Rendering:
- Updated MCP Apps weather examples to use host-safe tool names (
weather_get_current), include explicitresource_linktool output, and demonstrate host-rendered UI updates from tool input/result notifications.
- Updated MCP Apps weather examples to use host-safe tool names (
Documentation #
- Added and expanded MCP Apps documentation across guides and quick reference, including host compatibility guidance for tool naming constraints.
Reliability #
- JSON Schema Parsing:
- Fixed
JsonObject.fromJsonto accept untyped map values foradditionalProperties(for example{}decoded asMap<dynamic, dynamic>), so schema objects are not silently dropped.
- Fixed
1.3.0 #
- Spec Alignment:
- Added
ResourceLink(resource_link) content type support. - Added icon metadata support with
McpIcon,IconTheme, and optionaliconsfields across tools/prompts/resources/templates. - Added
ResourceAnnotations.lastModified(ISO 8601). - Added MCP
extensionscapability support for client/server initialization capability negotiation.
- Added
- Security:
- Added optional DNS rebinding protection to streamable HTTP/SSE server entry points via host/origin allowlists.
- Reliability:
- Tightened null handling for JSON-RPC tool params and task store TTL parsing paths.
- Fixed URI template matching for RFC 6570 multi-variable operators (for example
{?status,assignee}) soresources/readresolves templated URIs correctly. - Fixed tool metadata passthrough so registered
meta(including nested_metavalues) is preserved intools/listresponses. - Improved URI template variable typing and protocol cancellation reason typing.
- Docs:
- Updated transport, client, server, tools, and quick-reference docs for new fields and security options.
1.2.2 #
- Fix pana analysis issues
1.2.1 #
-
Features:
- Progress Notifications: Implemented full support for progress tracking.
- Added
RequestHandlerExtra.sendProgress()helper for servers to report progress. - Added
RequestOptions.onprogresscallback for clients to receive progress updates. - Updated
ProgressandProgressNotificationtypes to include optionalmessagefield (compliant with 2025-11-25 spec).
- Added
- Protocol Improvements:
JsonRpcMessage.fromJsonnow supports custom/unknown methods instead of throwing.- Fixed
JsonRpcRequestmetadata extraction to correctly handle nested_metainparams. - Updated
ToolAnnotationsto maketitleoptional, preventing deserialization errors when the field is missing.
- Progress Notifications: Implemented full support for progress tracking.
-
Fixes:
- StreamableHTTP: Prevented the client from attempting to "reconnect" to short-lived POST response streams (used for tool calls). This fixes an issue where multiple tool calls could exhaust the browser's connection limit by spawning zombie reconnection attempts.
-
Examples:
- New Jaspr Client: Added a comprehensive web client example (
example/jaspr-client) built with Jaspr, featuring:- Interactive UI for Tools, Resources, Prompts, and Tasks.
- Real-time connection management.
- Visual task progression and sampling dialogs.
- Anthropic Client: Fixed issues in the Anthropic client example.
- Task Server: Added CORS headers and logging to
simple_task_interactive_server.dart. - Updated examples to remove deprecated API usage.
- New Jaspr Client: Added a comprehensive web client example (
-
Documentation:
- Overhauled documentation (
doc/) to match current API (v1.1.2+). - Added
AGENTS.mdwith comprehensive developer guidelines.
- Overhauled documentation (
-
Testing:
- Updated
test/types_test.dartandtest/types_edge_cases_test.dartto correct expectations for unknown methods.JsonRpcMessage.fromJsonreturns a genericJsonRpcRequest(orJsonRpcNotification) for unknown methods instead of throwing, aligning tests with existing library behavior.
- Updated
1.2.0 #
Breaking Changes #
Tip
All breaking changes below are auto-fixable. Run dart fix --apply to automatically update your code.
- Renamed Core Classes:
Clientis nowMcpClientto avoid conflicts with other libraries (likehttp).ClientOptionsis nowMcpClientOptions.ServerOptionsis nowMcpServerOptions.
- Renamed Request/Notification Parameters:
ReadResourceRequestParams->ReadResourceRequestGetPromptRequestParams->GetPromptRequestElicitRequestParams->ElicitRequestCreateMessageRequestParams->CreateMessageRequestLoggingMessageNotificationParams->LoggingMessageNotificationCancelledNotificationParams->CancelledNotificationProgressNotificationParams->ProgressNotificationTaskCreationParams->TaskCreation
1.1.2 #
- Fixed StdioClientTransport stderr handling: Corrected process mode to always use
ProcessStartMode.normalto ensure stdin/stdout piping works correctly. Fixed inverted stderr mode logic wherestderrMode: normalnow properly exposes stderr via getter (without internal listening), andstderrMode: inheritStdionow manually pipes stderr to parent process.
1.1.1 #
- Structured Content Support: Added explicit
structuredContentfield toCallToolResultwith automatic backward compatibility support.CallToolResult.fromStructuredContentnow automatically populates bothstructuredContent(for modern clients) andcontent(as JSON string for legacy clients).- Updated validation logic to correctly validate
structuredContentpayload against tool schema.
1.1.0 #
Breaking Changes #
- Protocol Version Update: Updated default protocol version to
2025-11-25. - Strict Capabilities Typing:
ServerCapabilitiesandClientCapabilitiesfields (tasks, sampling, elicitation, etc.) are now strictly typed objects instead ofMap<String, dynamic>orbool.- Updated
ServerCapabilitiesto useServerCapabilitiesTasks,ServerCapabilitiesTools, etc. - Updated
ClientCapabilitiesto useClientCapabilitiesTasks,ClientCapabilitiesElicitation,ClientCapabilitiesSampling, etc. - Migration: Update capability declarations to use the new typed classes (e.g.,
ServerCapabilities(tasks: ServerCapabilitiesTasks(listChanged: true))).
- Updated
- File Removal:
lib/src/server/mcp.darthas been removed. Uselib/src/server/mcp_server.dart(exported vialib/src/server/module.dart) instead. - Transport Interface Change:
Transport.sendnow accepts an optional named parameterrelatedRequestId. Custom transports must update their method signature. - Client Validation:
Client.callToolnow strictly validates tool outputs against their defined JSON schema (if present). Mismatches will throw anMcpError(ErrorCode.invalidParams). - API Refactoring:
McpServer.tool,resource, andpromptare deprecated. UseregisterTool,registerResource, andregisterPromptinstead.McpServer.registerTooluses a new callback signature:FutureOr<CallToolResult> Function(Map<String, dynamic> args, RequestHandlerExtra extra).- The deprecated
McpServer.toolretains the old named-parameter signature for backward compatibility.
- Tool Schema Definitions:
ToolInputSchema(akaJsonObject) now requires properties to be defined usingJsonSchemaobjects (e.g.,JsonSchema.string()) instead of raw Maps. - Tool Listing Types:
ListToolsRequestParamshas been replaced byListToolsRequest(update any code passingparams:toClient.listToolsor constructingJsonRpcListToolsRequest). - Tool Result Structured Content:
CallToolResultno longer uses a dedicatedstructuredContentfield in its API; structured results are represented as additional top-level fields (CallToolResult.extra).CallToolResult.fromStructuredContentnow takes a singleMap<String, dynamic>argument. - RequestHandlerExtra Signature Changes:
RequestHandlerExtra.sendNotificationandRequestHandlerExtra.sendRequesthave updated signatures (added task-related metadata/options). Update any server callbacks that call these helpers directly.
Features #
- Task Management System:
- Implemented comprehensive Task support in
lib/src/server/tasks/. - Introduced
TaskStoreabstract interface withInMemoryTaskStoreas the default implementation. - Added strictly typed
TaskResultHandlerandTaskSession. - Introduced
TaskMessageQueuefor handling task messages.
- Implemented comprehensive Task support in
- McpServer Enhancements:
- Added
McpServerhigh-level support for tasks viatasks(...)method. - Integrated
notifyTaskStatusintoMcpServer. - Added
McpServersupport forsampling/createMessage. - Exposed
onErrorhandler setter/getter onMcpServer.
- Added
- StreamableMcpServer:
- Added
StreamableMcpServerclass for simplified Streamable HTTP server creation (handlesserverFactory, event store, and connection management).
- Added
- Client Enhancements:
- Added
onTaskStatuscallback toClient. - Simplified client request handlers for sampling and elicitation.
- Added
Fixes #
- Fixed
Taskserialization. - Fixed capabilities recognition in
McpServer. - Added comprehensive tests for StreamableMcpServer and Task features.
1.0.2 #
- Fix pana analysis issues
- Fix Web support for StreamableHTTP client
1.0.1 #
- Fix Documentation links in README.md
1.0.0 #
- Update protocol version to 2025-06-18
- Add Elicitation support (server-initiated input collection)
- API:
McpServer.elicitUserInput()(server) |Client.onElicitRequest(client handler) - Types: ElicitRequestParams (
message,requestedSchema), ElicitResult (action,content), ClientCapabilitiesElicitation - Uses
elicitation/createmethod (Inspector-compatible) - Accepts JSON Schema Maps for flexible schema definition
- Helpers:
.accepted,.declined,.cancelledgetters on ElicitResult - Example: elicitation_http_server.dart
- Tests: elicitation_test.dart
- API:
- CRITICAL FIX: Logger → stderr (prevents JSON-RPC corruption in stdio)
- Comprehensive Test Coverage: Added 203 new tests across 4 phases (+13.1% overall coverage: 56.9% → 70.0%)
- Phase 1: External API coverage (Server MCP, URI templates, Client/Server capabilities) - 108 tests
- Phase 2: Transport coverage (Stdio, SSE, HTTPS) - 38 tests
- Phase 3: Types & edge cases (Protocol lifecycle, error handling) - 45 tests
- Phase 4: Advanced scenarios (Protocol timeouts/aborts, Streamable HTTPS integration) - 12 tests
- Fixed critical URI template variable duplication bug
- Fixed McpError code preservation in request handlers
- All 351 tests passing ✅
0.7.0 #
- Add support for Completions capability per MCP 2025-06-18 spec
- Add ServerCapabilitiesCompletions class for explicit completions capability declaration
- Update ServerCapabilities to include completions field
- Update client capability check to use explicit completions capability instead of inferring from prompts/resources
- Add integration tests and example for completions capability usage
0.6.4 #
- Fix issue with StreamableHTTP server not setting correct content-type for SSE
0.6.3 #
- Replace print statements with lightweight logging implementation
0.6.2 #
- Remove trailing CR before processing the lines
0.6.1 #
- Fix issue with CallToolResult not including metadata
0.6.0 #
- Add ToolInputSchema and ToolOutputSchema support in server.tool()
- Deprecate inputSchemaProperties and outputSchemaProperties in server.tool()
- Update examples to use ToolInputSchema and ToolOutputSchema
0.5.3 #
- Support Web Client for StreamableHTTP
0.5.2 #
- Preserve required fields in ToolInputSchema
0.5.1 #
- Add support for OutputScheme (https://modelcontextprotocol.io/specification/draft/server/tools#output-schema)
0.5.0 #
- Protocol version 2025-03-26
0.4.3 #
- Fix SSE behavior on StreamableHTTP
- Added sendNotification and sendRequest to extra for server callbacks
0.4.2 #
- Add Tool Annotation
- Remove additionalProperties from all models
- Add AudioContent
0.4.1 #
- Add IOStreamTransport to connect a client and server via dart streams in a single application
0.4.0 #
- Add support for StreamableHTTP client
- Add support for StreamableHTTP server
0.3.6 #
- Improve pub.dev points
0.3.5 #
- Lower min dart sdk to 3.0.0
0.3.4 #
- Fix Sampling result parsing error
0.3.3 #
- Add Gemini MCP Client Example
- Add Anthropic MCP Client Example
- Add Weather MCP Server Example
0.3.2 #
- Add SSE Server Manager for easier SSE server implementation
0.3.1 #
- Add Client support (stdio)
- Add resource and prompts example to stdio server and client
0.3.0 #
- Full refactor of the codebase to match it with the Typescript SDK implementation.
0.2.0 #
- Make it no need to call trasnport.connect()
0.1.1 #
- Add examples visible in pub.dev
0.1.0 #
- Add SSE support
0.0.2 #
- Expose more types
0.0.1 #
- Initial version.