mcpField
D
DartMCP

DartMCP

Local
github.com/G1JoshiDeveloper Tools0Updated 53w ago

About DartMCP

DartMCP is a Dart implementation of MCP with both server and client components. It is for developers building Dart-based AI agent integrations, with support for tools, prompts, resources, and notifications.

Key features

  1. 01Dart MCP server and client components
  2. 02stdio and custom-channel communication
  3. 03Support for tools, prompts, and resources
  4. 04Streams for server notifications
  5. 05Cross-platform Dart support

Use cases

  1. 01Building MCP servers for Dart applications
  2. 02Connecting Dart applications to MCP servers
  3. 03Receiving updates about tools, resources, and logs

MCP support

Implements both sides of MCP: its server handles client connections and requests, while its client connects to MCP servers and receives notifications.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

DartMCP

A Dart implementation of the Model Context Protocol (MCP) for AI agent interactions.

Overview

DartMCP is a Model Context Protocol (MCP) implementation in Dart, providing both server and client components for building interoperable AI/LLM tools and services.

Requirements
  • Dart SDK 3.9.2+
  • Works on any platform supported by Dart (macOS, Linux, Windows)
Project Structure

The project is organized into two main components:

  • lib/src/server.dart: The server implementation
  • lib/src/client.dart: The client implementation
Dependencies
Installation
  1. Add DartMCP to your project:
dependencies:
  dart_mcp: ^0.3.3
  1. Install dependencies:
dart pub get

Server

The DartMCP server component provides a Model Context Protocol server implementation in Dart. It enables AI agents and tools to interact with Dart applications using the standard MCP protocol.

Features
  • Built with Dart 3.9.2+
  • Implements MCP protocol over standard I/O or custom channels
  • Includes support for logging, prompts, resources, and tools
  • Cross-platform support
Getting Started
  1. Implement your server logic using Server from lib/src/server.dart.
  2. Run your server as a Dart application:
dart run path/to/your_server.dart
Server Component Details

The server component is responsible for:

  • Handling incoming MCP connections
  • Managing model context and state
  • Processing client requests
  • Maintaining state synchronization

Location: lib/src/server.dart

Client

The DartMCP client component allows Dart applications to connect to and interact with MCP-compatible AI agents and servers.

Features
  • Built with Dart 3.9.2+
  • Implements MCP client over standard I/O or custom channels
  • Simple API for initializing and communicating with MCP servers
  • Streams for server notifications (tools, resources, logs, etc.)
Getting Started
  1. Use the Client class from lib/src/client.dart in your Dart application.
  2. Example usage:
import 'package:dartmcp/dartmcp.dart';

void main() {
  var client = Client();
  client.main();
}
Client Component Details

The client component provides:

  • Connection management to MCP servers
  • Model context synchronization
  • Real-time updates handling
  • Client-side state management

Location: lib/src/client.dart

Example

See example/dartmcp_example.dart for a minimal usage example.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.