dart-mcp-server-template

dart-mcp-server-template

3.5

A template repository for creating Dart server applications compatible with MCP (Model Control Protocol).

The Dart MCP Server Template is designed to facilitate the development of Dart server applications that are compatible with the Model Control Protocol (MCP). This template provides a comprehensive starting point, including Docker configuration for easy deployment, a streamable HTTP server implementation, and a well-organized project structure. It integrates with the mcp_dart package, allowing developers to focus on implementing custom server logic while leveraging the provided infrastructure. The template includes executable Dart files for starting the server via different transport methods, such as standard I/O, Server-Sent Events, and HTTP streaming. Additionally, it supports in-memory stream transport using the IOStreamTransport, enabling seamless communication between Dart clients and servers.

Features

  • {'name': 'Streamable HTTP Server', 'description': 'Provides a streamable HTTP server implementation for MCP, allowing efficient data streaming.'}
  • {'name': 'Docker Configuration', 'description': 'Includes Docker configuration for easy deployment and containerization of the server application.'}
  • {'name': 'Project Structure', 'description': 'Offers a basic project structure with lib, bin, and test directories for organized development.'}
  • {'name': 'Integration with mcp_dart', 'description': 'Seamlessly integrates with the mcp_dart package for enhanced MCP functionality.'}
  • {'name': 'Multiple Transport Methods', 'description': 'Supports various transport methods including standard I/O, Server-Sent Events, and HTTP streaming.'}

Usage with Different Platforms

docker

bash
# Build the Docker image
docker build -t my-mcp-server .

# Run the container
docker run -p 3000:3000 my-mcp-server