Skip to content
pubscout

mcp_dart

2.4.4, released 5 days ago by leehack.com

Dart and Flutter SDK for building Model Context Protocol clients, servers, and AI tools.

WASM-ready
$ flutter pub add mcp_dart
Source repository

What it does

Implements the Model Context Protocol (MCP) specification to build servers, clients, and hosts that connect AI models to tools, resources, and prompts. It supports multiple transports including stdio, Streamable HTTP, and IO streams, alongside OAuth authentication hooks.

AI-written summary of version 2.4.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build a custom Model Context Protocol server or client in Dart or Flutter.
  • You want to expose Dart tools, resources, and prompts to AI agents via MCP.

Skip it when

  • You prefer the official Dart team ai package (dart_mcp) over this implementation.
  • You are not using the Model Context Protocol.

Strengths

  • Implements complete core client/server wire requirements for MCP specifications.
  • Supports multiple transports including stdio, Streamable HTTP, and custom streams across various platforms.

Weaknesses

  • Optional extensions like Tasks are not part of official core conformance claims.
  • Requires careful configuration for large messages or specific HTTP transport limits.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

Add the package using `dart pub add mcp_dart` or configure it via version constraints in pubspec.yaml.

final strict2026Server = McpServer(
  const Implementation(name: 'my-server', version: '1.0.0'),
  options: const McpServerOptions(protocol: McpProtocol.require2026),
);

Alternatives

Packages that do the same job and could replace mcp_dart.

  • genkit

    Generative AI library for Dart and Flutter supporting text generation, tools, and flows.

  • dart_mcp_server

    An MCP server for Dart projects, exposing developer tools to AI models.

  • anthropic_sdk_dart

    Dart client for the Anthropic API with streaming and tool support

  • ollama_dart

    Type‑safe Dart client for Ollama’s chat, generation, embeddings, audio and model management APIs.

Works with

Packages commonly used together with mcp_dart: ones it builds on, ones built on it, and its own family.