Skip to main content
Glama

Dart MCP Server

by egyleader

Dart MCP サーバー

AIを活用した開発向けにDart SDKコマンドを公開する、分散型モデルコンテキストプロトコル(MCP)サーバーです。このサーバーは、モデルコンテキストプロトコル(MCP)を実装することで、AIコーディングアシスタントとDart/Flutter開発ワークフロー間のギャップを埋めます。

特徴

この MCP サーバーは、次の Dart SDK コマンドへのシームレスなアクセスを提供します。

指示説明
dart-analyzeDart コードのエラー、警告、および lint を分析する
dart-compileDart をさまざまな形式 (exe、AOT/JIT スナップショット、JavaScript) にコンパイルします。
dart-createテンプレートから新しい Dart プロジェクトを作成する
dart-docDartプロジェクトのAPIドキュメントを生成する
dart-fixDartソースコードに自動修正を適用する
dart-formatDartソースコードをスタイルガイドラインに従ってフォーマットする
dart-infoインストールされている Dart ツールに関する診断情報を表示します
dart-packageパッケージの操作 (取得、追加、アップグレード、古いパッケージなど)
dart-run引数渡しをサポートしたDartプログラムを実行する
dart-testフィルタリングとレポートオプションをサポートしたテストを実行する

主なメリット

  • インテリジェントなパス処理: 相対パスを絶対パスに自動的に解決し、作業ディレクトリに関係なくコマンドが正しく動作することを保証します。
  • プロジェクトの自動検出: ホームディレクトリやワークスペースなどの一般的な場所にある Dart/Flutter プロジェクトを識別します。
  • クロスプラットフォームサポート:macOS、Linux、Windowsで動作
  • ゼロ構成: 適切なデフォルト設定ですぐに使用可能
  • MCP 統合: Windsurf、Cline、その他のモデル コンテキスト プロトコル実装を含む、あらゆる MCP クライアントと互換性があります。

前提条件

  • Node.js : 18.x 以上
  • Dart SDK : 3.0 以上がインストールされ、PATH で利用可能

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Dart MCP Server を自動的にインストールするには:

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

npx の使用(推奨)

npx を使用すると、インストールせずにサーバーを直接実行できます。

npx @egyleader/dart-mcp-server

グローバルインストール

アクセスを容易にするために、サーバーをグローバルにインストールできます。

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

次に、次のコマンドを使用して実行します。

dart-mcp-server

ソースから

# 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

MCPクライアントとの統合

Windsurf / Codeium IDE の設定

この MCP サーバーを Windsurf または Codeium IDE で使用するには、 mcp_config.jsonファイル (通常は~/.codeium/windsurf/mcp_config.jsonにあります) に次のコードを追加します。

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

環境変数

  • DART_MCP_VERBOSE : デバッグのための詳細なログを有効にするには任意の値を設定します。

MCPツールの使用例

サーバーが提供するMCPツールの使用方法の例を以下に示します。これらの例では、各ツールに渡すことができるパラメータを示しています。

ダーツ分析

Dart コードのエラー、警告、および lint を分析します。

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

ダートコンパイル

Dart コードをさまざまな形式にコンパイルします。

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

サポートされている形式: exeaot-snapshotjit-snapshotkerneljs

ダーツ作成

テンプレートから新しい Dart プロジェクトを作成します。

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

projectName と出力に関する注意:

  • projectNameのみが指定されている場合は、プロジェクトが作成されるディレクトリ名として使用されます。
  • outputが指定されている場合は、プロジェクトが作成されるディレクトリとして使用されます。
  • Dart の実際のパッケージ/プロジェクト名は、Dart CLI によって最終的なディレクトリ名から派生されます。

サポートされているテンプレート: consolepackageserver-shelfweb

ダーツドキュメント

Dart プロジェクトの API ドキュメントを生成します。

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

ダーツフィックス

Dart ソース コードに自動修正を適用します。

{ "path": "lib", "apply": true, "options": ["--pedantic"] }

ダーツ形式

Dart ソース コードをスタイル ガイドラインに従ってフォーマットします。

{ "paths": ["lib/main.dart", "lib/models"], "setExitIfChanged": true, "options": ["--line-length=100"] }

ダーツ情報

インストールされている Dart ツールに関する診断情報を表示します。

{ "options": ["--verbose"] }

ダーツパッケージ

パッケージを操作する (pub コマンド):

{ "command": "get", "workingDir": ".", "args": ["--offline"] }

サポートされているコマンド: getupgradeoutdatedaddremovepublishdepsdowngradecacherunglobal

ダートラン

引数の受け渡しをサポートする Dart プログラムを実行します。

{ "script": "bin/server.dart", "workingDir": ".", "args": ["--port=8080", "--mode=production"] }

ダーツテスト

フィルタリングとレポートのオプションをサポートしたテストを実行します。

{ "path": "test", "workingDir": ".", "options": ["--name=login", "--platform=chrome"] }

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

ツールAPIリファレンス

ダーツ分析

ディレクトリまたはファイル内の Dart コードを分析します。

{ path?: string; // Directory or file to analyze options?: string[]; // Additional options for the dart analyze command }

例:

{ path: "lib", options: ["--fatal-infos", "--fatal-warnings"] }

ダートコンパイル

Dart をさまざまな形式にコンパイルします。

{ format: 'exe' | 'aot-snapshot' | 'jit-snapshot' | 'kernel' | 'js'; // Output format path: string; // Path to the Dart file to compile output?: string; // Output file path options?: string[]; // Additional compilation options }

例:

{ format: "exe", path: "bin/main.dart", output: "bin/app" }

ダーツ作成

新しい Dart プロジェクトを作成します。

{ template: 'console' | 'package' | 'server-shelf' | 'web'; // Project template projectName: string; // Name of the project to create output?: string; // Directory where to create the project options?: string[]; // Additional project creation options }

注記:

  • outputが指定されている場合、そのディレクトリにプロジェクトが作成されます。
  • projectNameのみが指定されている場合は、それがディレクトリ名として使用されます。
  • 実際の Dart パッケージ名は、最終的なディレクトリ名から派生されます。

例:

{ template: "package", projectName: "my_dart_library", output: "projects/my_dart_library" }

ダーツドキュメント

Dart プロジェクトの API ドキュメントを生成します。

{ path?: string; // Directory containing the Dart package to document output?: string; // Output directory for the generated documentation options?: string[]; // Additional documentation options }

例:

{ path: ".", output: "doc/api" }

ダーツフィックス

Dart ソース コードに自動修正を適用します。

{ path?: string; // Directory or file to apply fixes to apply?: boolean; // Whether to apply the suggested fixes (default: true) options?: string[]; // Additional fix options }

例:

{ path: "lib", apply: true, options: ["--pedantic"] }

ダーツ形式

Dart ソース コードを慣用的にフォーマットします。

{ paths: string[]; // Files or directories to format setExitIfChanged?: boolean; // Return exit code 1 if there are formatting changes (default: false) options?: string[]; // Additional format options }

例:

{ paths: ["lib", "test"], setExitIfChanged: true, options: ["--line-length=80"] }

ダーツ情報

インストールされているツールに関する診断情報を表示します。

{ options?: string[]; // Additional info options }

例:

{ options: ["--verbose"] }

ダーツパッケージ

パッケージを操作します (pub コマンド)。

{ command: 'get' | 'upgrade' | 'outdated' | 'add' | 'remove' | 'publish' | 'deps' | 'downgrade' | 'cache' | 'run' | 'global'; // Pub subcommand args?: string[]; // Arguments for the pub subcommand workingDir?: string; // Working directory for the command }

例:

// Add a package { command: "add", args: ["rxdart"], workingDir: "my_project" } // Get dependencies { command: "get", workingDir: "my_project" }

ダートラン

Dart プログラムを実行します。

{ script: string; // Path to the Dart script to run args?: string[]; // Arguments to pass to the script workingDir?: string; // Working directory for the command }

例:

{ script: "bin/main.dart", args: ["--verbose"], workingDir: "my_project" }

ダーツテスト

プロジェクトのテストを実行します。

{ path?: string; // Path to the test file or directory options?: string[]; // Additional test options workingDir?: string; // Working directory for the command }

例:

{ path: "test", options: ["--coverage", "--name=auth"], workingDir: "my_project" }

発達

# Watch mode for development pnpm run dev # Build for production pnpm run build

エラー処理

サーバーは包括的なエラー処理を実装します。

  • コマンド実行エラーは適切にキャプチャされフォーマットされます
  • パス解決の問題は詳細な診断とともに報告されます
  • 長時間実行操作のタイムアウト処理
  • Dartコマンドからの適切な終了コードの伝播

貢献

詳細な貢献ガイドラインについては、 CONTRIBUTING.md を参照してください。

コミット形式は次のとおりです:

<type>[optional scope]: [JIRA-123(optional)] <description>

例:

feat(tools): [DART-456] add support for dart test tags

ライセンス

マサチューセッツ工科大学

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

AIを活用した開発向けにDart SDKコマンドを公開する、分散型モデルコンテキストプロトコル(MCP)サーバーです。このサーバーは、モデルコンテキストプロトコル(MCP)を実装することで、AIコーディングアシスタントとDart/Flutter開発ワークフロー間のギャップを埋めます。

  1. 特徴
    1. 主なメリット
  2. 前提条件
    1. インストール
      1. Smithery経由でインストール
      2. npx の使用(推奨)
      3. グローバルインストール
      4. ソースから
    2. MCPクライアントとの統合
      1. Windsurf / Codeium IDE の設定
      2. 環境変数
    3. MCPツールの使用例
      1. ダーツ分析
      2. ダートコンパイル
      3. ダーツ作成
      4. ダーツドキュメント
      5. ダーツフィックス
      6. ダーツ形式
      7. ダーツ情報
      8. ダーツパッケージ
      9. ダートラン
      10. ダーツテスト
    4. ライセンス
      1. 貢献
        1. ツールAPIリファレンス
          1. ダーツ分析
          2. ダートコンパイル
          3. ダーツ作成
          4. ダーツドキュメント
          5. ダーツフィックス
          6. ダーツ形式
          7. ダーツ情報
          8. ダーツパッケージ
          9. ダートラン
          10. ダーツテスト
        2. 発達
          1. エラー処理
            1. 貢献
              1. ライセンス

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.
                  Last updated -
                  17
                  77
                  7
                  TypeScript
                  Apache 2.0
                  • Apple
                  • Linux
                • -
                  security
                  F
                  license
                  -
                  quality
                  Implements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.
                  Last updated -
                  90
                  Python
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  An official AI Model Context Protocol server that enables AI assistants to interact with Dart project management by creating/managing tasks and documents through prompts and tools.
                  Last updated -
                  307
                  80
                  JavaScript
                  MIT License
                  • Linux
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol (MCP) server that enables AI assistants to control and interact with Android devices, allowing for device management, app debugging, system analysis, and UI automation through natural language commands.
                  Last updated -
                  29
                  143
                  Python
                  Apache 2.0
                  • Linux
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/egyleader/dart-mcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server