Flutter 工具 MCP 服务器
概述
flutter-tools MCP 服务器提供了与 Flutter SDK 交互的工具。它主要提供两个工具: get_diagnostics和apply_fixes 。这两个工具有助于分析和修复 Dart/Flutter 文件。
工具
获取诊断
**描述:**获取文件的 Flutter/Dart 诊断。
输入模式:
示例用法:
应用修复
**描述:**将 Dart 修复建议应用于文件。
输入模式:
示例用法:
依赖项
@modelcontextprotocol/sdk: ^1.0.0node-pty: ^1.0.0which:^4.0.0
开发依赖项
@types/node:^18.19.0@types/which:^3.0.3typescript:^5.3.3
脚本
build:编译 TypeScript 代码并在编译后的 JavaScript 文件上设置可执行权限。prepare:运行build脚本。watch:编译 TypeScript 代码并监视更改,然后自动重新编译。
安装
要安装 MCP 服务器,请将以下配置添加到您的 MCP 设置文件中:
将/path/to/flutter-tools/build/index.js替换为已编译 JavaScript 文件的实际路径。
用法
确保 Flutter SDK 已安装并在您的 PATH 中可用。
使用配置的命令启动 MCP 服务器。
根据需要使用
get_diagnostics和apply_fixes工具。
例子
local-only server
The server can only run on the client's local machine because it depends on local resources.
通过提供工具来分析和修复 Dart 和 Flutter 文件,实现与 Flutter SDK 的交互。
Related Resources
Related MCP Servers
- -security-license-qualityEnables interaction with GitHub through the GitHub API, supporting file operations, repository management, advanced search, and issue tracking with comprehensive error handling and automatic branch creation.Last updated -3,2641
- Asecurity-licenseAqualityProvides tools for analyzing project structures, searching through codebases, managing dependencies, and performing file operations with advanced filtering capabilities.Last updated -6121MIT License
- Asecurity-licenseAqualityA real-time server that provides Flutter/Dart documentation and pub.dev package information to AI assistants, ensuring they generate accurate and up-to-date Flutter code.Last updated -852MIT License
- -security-license-qualityProvides advanced Flutter development tools via Model Context Protocol with features including widget analysis, documentation search, performance optimization, and code generation.Last updated -17