Price Per TokenPrice Per Token
Dart MCP Server

Dart MCP Server

by egyleader

GitHub 6 3 uses
0

About

Dart MCP Server bridges AI coding assistants with Dart/Flutter development workflows by exposing the full Dart SDK command suite through the Model Context Protocol. Key capabilities include: - Code analysis and automated fixing via `dart-analyze` and `dart-fix` - Code formatting with `dart-format` according to Dart style guidelines - Compilation to multiple formats including executables, AOT/JIT snapshots, and JavaScript - Project scaffolding through `dart-create` with built-in templates - Test execution with filtering and reporting options via `dart-test` - Package management (get, add, upgrade, outdated) through `dart-package` - Documentation generation using `dart-doc` - Program execution with `dart-run` supporting argument passing The server features intelligent path handling that automatically resolves relative paths to absolute paths, project auto-detection for Dart/Flutter projects in common locations, and works across macOS, Linux, and Windows with zero configuration required. It integrates with MCP-compatible clients including Windsurf, Cline, and Claude Desktop.

README

Dart MCP Server

[](https://www.npmjs.com/package/@egyleader/dart-mcp-server) [](https://opensource.org/licenses/MIT) [](https://smithery.ai/server/@egyleader/dart-mcp)

A distributable Model Context Protocol (MCP) server that exposes Dart SDK commands for AI-powered development. This server bridges the gap between AI coding assistants and Dart/Flutter development workflows by implementing the Model Context Protocol (MCP).

Features

This MCP server provides seamless access to the following Dart SDK commands:

| Command | Description | |---------|-------------| | dart-analyze | Analyze Dart code for errors, warnings, and lints | | dart-compile | Compile Dart to various formats (exe, AOT/JIT snapshots, JavaScript) | | dart-create | Create new Dart projects from templates | | dart-doc | Generate API documentation for Dart projects | | dart-fix | Apply automated fixes to Dart source code | | dart-format | Format Dart source code according to style guidelines | | dart-info | Show diagnostic information about the installed Dart tooling | | dart-package | Work with packages (get, add, upgrade, outdated, etc.) | | dart-run | Run Dart programs with support for passing arguments | | dart-test | Run tests with support for filtering and reporting options |

Key Benefits

  • Intelligent Path Handling: Automatically resolves relative paths to absolute paths, ensuring commands work correctly regardless of working directory
  • Project Auto-Detection: Identifies Dart/Flutter projects in common locations like home directories and workspaces
  • Cross-Platform Support: Works on macOS, Linux, and Windows
  • Zero Configuration: Works out of the box with sensible defaults
  • MCP Integration: Compatible with any MCP client, including Windsurf, Cline, and other Model Context Protocol implementations
  • Prerequisites

  • Node.js: 18.x or higher
  • Dart SDK: 3.0 or higher installed and available in your PATH
  • Installation

    Installing via Smithery

    To install Dart MCP Server for Claude Desktop automatically via Smithery:

    npx -y @smithery/cli install @egyleader/dart-mcp --client claude
    

    Using npx (recommended)

    The server can be run directly without installation using npx:

    npx @egyleader/dart-mcp-server
    

    Global Installation

    For easier access, you can install the server globally:

    npm install -g @egyleader/dart-mcp-server
    

    Then run it using:

    dart-mcp-server
    

    From Source

    # Clone the repository
    git clone https://github.com/egyleader/dart-mcp-server.git
    cd dart-mcp-server

    Install dependencies

    npm install

    Build the project

    npm run build

    Run the server

    node dist/index.js

    Integration with MCP Clients

    Windsurf / Codeium IDE Configuration

    To use this MCP server with Windsurf or Codeium IDE, add the following to your mcp_config.json file (typically located at ~/.codeium/windsurf/mcp_config.json):

    {
      "mcpServers": {
        "dart": {
          "command": "npx",
          "args": [
            "-y",
            "@egyleader/dart-mcp-server"
          ]
        }
      }
    }
    

    Environment Variables

  • DART_MCP_VERBOSE: Set to any value to enable verbose logging for debugging
  • MCP Tool Usage Examples

    Here are examples of how to use the MCP tools provided by the server. These examples show the parameters that can be passed to each tool.

    dart-analyze

    Analyze Dart code for errors, warnings, and lints:

    {
      "path": "lib/main.dart",
      "options": ["--fatal-infos", "--fatal-warnings"]
    }
    

    dart-compile

    Compile Dart code to various formats:

    {
      "path": "lib/main.dart",
      "format": "exe",
      "output": "build/app",
      "options": ["--verbose"]
    }
    

    Supported formats: exe, aot-snapshot, jit-snapshot, kernel, js

    dart-create

    Create a new Dart project from a template:

    {
      "projectName": "my_awesome_app",
      "template": "console",
      "output": "projects/my_awesome_app",
      "options": ["--force"]
    }
    

    Note on projectName and output:

  • If only projectName is provided, it's used as the directory name where the project is created.
  • If output is provided, it's used as the directory where the project is created.
  • The actual package/project name in Dart is derived from the final directory name by the Dart CLI.
  • Supported templates: console, package, server-shelf, web

    dart-doc

    Generate API documentation for a Dart project:

    {
      "path": ".",
      "output": "doc",
      "options": ["--exclude", "lib/generated"]
    }
    

    dart-fix

    A

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81