agentic_mcp 0.2.0 copy "agentic_mcp: ^0.2.0" to clipboard
agentic_mcp: ^0.2.0 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.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 formatJsonRpcRequest, JsonRpcNotification, JsonRpcResponse and a sealed JsonRpcMessage that makes classifying an incoming message an exhaustive switch. JsonRpcError.toException maps 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.
  • ClientMcpClient with lifecycle, response correlation, per-request timeouts, pagination followed to the end, capability checks before a call is made, cancellation propagated to the server as notifications/cancelled, and handlers for server-initiated requests such as roots/list.
  • ToolsMcpTool, mcpTools and registerMcpTools, turning a server's tools into ordinary Tool objects. 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.
  • ServerMcpServer publishing a ToolRegistry, including tool listing, execution through the framework's own ToolExecutor, resources through caller-supplied providers, and notifyToolsChanged. Tools requiring human approval are withheld by default.
  • TransportsMcpTransport port; McpHttpTransport (Streamable HTTP with session identifiers, an optional listening channel, and both JSON and event-stream responses); InMemoryTransport for tests and in-process servers; and StdioTransport in package: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.
  • EventsMcpSessionOpened (carrying the negotiated revision), McpToolsDiscovered (carrying the registered names), McpToolCalled and McpNotificationReceived.
2
likes
160
points
222
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A Model Context Protocol client and server for Dart. Remote MCP tools become ordinary agent tools, over stdio, HTTP or in-process transports.

Repository (GitHub)
View/report issues
Contributing

Topics

#ai #mcp #model-context-protocol #tools #agentic

License

MIT (license)

Dependencies

agentic_core, agentic_llm, agentic_tools, http, meta

More

Packages that depend on agentic_mcp