Skip to content
pubscout

mcp_server

3.1.1, released 3 weeks ago by makemind.dev

Dart implementation of Model Context Protocol (MCP) servers for LLM applications.

$ flutter pub add mcp_server
Source repository

What it does

Exposes data, tools, prompts, and resources to Large Language Model (LLM) applications through standardized protocols. Supports stdio, legacy SSE, and Streamable HTTP transports with built-in OAuth 2.1 authorization.

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

Use it when

  • You need to build an MCP server in Dart to serve resources, tools, or prompts to LLMs.
  • Your Flutter or Dart backend needs to securely expose local functionality or data via stdio or HTTP transports.

Skip it when

  • You are just writing a standard REST or GraphQL API without LLM integration needs.

Strengths

  • Supports every MCP protocol revision through 2026-07-28.
  • Includes multi-transport capabilities (stdio, SSE, Streamable HTTP).
  • Provides built-in JSON schema validation and OAuth 2.1 authorization.

Weaknesses

  • Niche domain specific strictly to the Model Context Protocol.
  • Requires careful security and session management configuration when exposed over HTTP.

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
7

No special build steps or native permissions required; works wherever dart:io is available.

import 'package:mcp_server/mcp_server.dart';

void main() {
  final server = Server(
    name: 'Example Server',
    version: '1.0.0',
    capabilities: ServerCapabilities.simple(
      tools: true,
      resources: true,
      prompts: true,
    ),
  );
  final transportResult = McpServer.createStdioTransport();
  final transport = transportResult.get();
  server.connect(transport);
}

Alternatives

Packages that do the same job and could replace mcp_server.

  • http2

    An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.

  • dart_mcp

    A Dart library for building Model Context Protocol (MCP) servers and clients.

  • relic

    Lightweight web server framework inspired by Shelf, with typed APIs and a high‑performance native Zig adapter.

  • shelf_web_socket

    Shelf handler that upgrades HTTP to WebSocket and provides a WebSocketChannel per connection.

Works with

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