Flutter Tools MCP Server

local-only server

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

Integrations

  • Provides diagnostic capabilities and fix suggestions for Dart files as part of the Flutter SDK integration

  • Allows for analyzing and fixing Dart/Flutter files through diagnostic tools and applying fixes

플러터 도구 MCP 서버

개요

flutter-tools MCP 서버는 Flutter SDK와 상호 작용하는 데 필요한 도구를 제공합니다. get_diagnosticsapply_fixes 두 가지 주요 도구를 제공하며, 이 도구들은 Dart/Flutter 파일을 분석하고 수정하는 데 도움이 됩니다.

도구

진단 받기

설명: 파일에 대한 Flutter/Dart 진단을 받습니다.

입력 스키마:

지엑스피1

사용 예:

{ "name": "get_diagnostics", "arguments": { "file": "/path/to/your/file.dart" } }

적용_수정

설명: Dart 수정 제안을 파일에 적용합니다.

입력 스키마:

{ "type": "object", "properties": { "file": { "type": "string", "description": "Path to the Dart/Flutter file" } }, "required": ["file"] }

사용 예:

{ "name": "apply_fixes", "arguments": { "file": "/path/to/your/file.dart" } }

종속성

  • @modelcontextprotocol/sdk : ^1.0.0
  • node-pty : ^1.0.0
  • which : ^4.0.0

개발 종속성

  • @types/node : ^18.19.0
  • @types/which : ^3.0.3
  • typescript : ^5.3.3

스크립트

  • build : TypeScript 코드를 컴파일하고 컴파일된 JavaScript 파일에 대한 실행 권한을 설정합니다.
  • prepare : build 스크립트를 실행합니다.
  • watch : TypeScript 코드를 컴파일하고 변경 사항을 감시하며 자동으로 다시 컴파일합니다.

설치

MCP 서버를 설치하려면 MCP 설정 파일에 다음 구성을 추가하세요.

{ "mcpServers": { "flutter-tools": { "command": "node", "args": ["/path/to/flutter-tools/build/index.js"], "env": {} } } }

/path/to/flutter-tools/build/index.js 컴파일된 JavaScript 파일의 실제 경로로 바꿉니다.

용법

  1. Flutter SDK가 설치되어 있고 PATH에서 사용할 수 있는지 확인하세요.
  2. 구성된 명령을 사용하여 MCP 서버를 시작합니다.
  3. 필요에 따라 get_diagnosticsapply_fixes 도구를 사용합니다.

node /path/to/flutter-tools/build/index.js

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Dart 및 Flutter 파일을 분석하고 수정 사항을 적용하는 도구를 제공하여 Flutter SDK와의 상호 작용을 활성화합니다.

  1. Overview
    1. Tools
      1. get_diagnostics
      2. apply_fixes
    2. Dependencies
      1. Dev Dependencies
        1. Scripts
          1. Installation
            1. Usage
              1. Example
                ID: 4v3bx1viov