agentic_mcp 0.3.1
agentic_mcp: ^0.3.1 copied to clipboard
A Model Context Protocol client and server for Dart. Remote MCP tools become ordinary agent tools, over stdio, HTTP or in-process transports.
Changelog #
0.3.1 #
- Updated package documentation for the published 0.3.x release line.
0.3.0 #
Added #
- The streamable-HTTP transport sends
traceparentfor the run it is carrying traffic for, so an MCP server's spans join the calling run's trace instead of starting one of their own. The client sets it during initialisation, the same way it sets the negotiated protocol revision.
0.2.0 #
- MCP tools return untrusted content: whatever a remote server returns was written outside the application. Behaviour change, so this ships in 0.2.0 only: a tool that is not read-only, called after one of these tools returned, now needs approval.
0.1.1 #
- Shortened the package description to the 60-180 character window pana scores against. Search engines truncate anything longer, so the ten points it withheld were pointing at a real defect: the useful half of the sentence was never being shown.
0.1.0 #
Initial release of the Model Context Protocol layer.
Added #
- Wire format —
JsonRpcRequest,JsonRpcNotification,JsonRpcResponseand a sealedJsonRpcMessagethat makes classifying an incoming message an exhaustive switch.JsonRpcError.toExceptionmaps protocol codes onto the framework's hierarchy, so retry policies and circuit breakers keep working across an MCP boundary. - Protocol — method-name constants,
McpImplementation,McpCapabilities(reading{}as "supported", keeping unknown capabilities rather than discarding them) and version negotiation across three revisions. - Client —
McpClientwith lifecycle, response correlation, per-request timeouts, pagination followed to the end, capability checks before a call is made, cancellation propagated to the server asnotifications/cancelled, and handlers for server-initiated requests such asroots/list. - Tools —
McpTool,mcpToolsandregisterMcpTools, turning a server's tools into ordinaryToolobjects. Server annotations tighten the resulting spec and never loosen it; a caller can always demand more approval than the server asked for, and never less. - Server —
McpServerpublishing aToolRegistry, including tool listing, execution through the framework's ownToolExecutor, resources through caller-supplied providers, andnotifyToolsChanged. Tools requiring human approval are withheld by default. - Transports —
McpTransportport;McpHttpTransport(Streamable HTTP with session identifiers, an optional listening channel, and both JSON and event-stream responses);InMemoryTransportfor tests and in-process servers; andStdioTransportinpackage:agentic_mcp/io.dart, kept apart so the main library stays usable on the web. - Content translation — MCP content blocks to and from
ContentPart, preserving unknown block types as text rather than dropping them. - Events —
McpSessionOpened(carrying the negotiated revision),McpToolsDiscovered(carrying the registered names),McpToolCalledandMcpNotificationReceived.