The Flutter Tools MCP Server provides tools for analyzing and modifying Dart/Flutter files:
- Get Diagnostics: Retrieve diagnostics information for Dart/Flutter files using the
get_diagnostics
tool. - Apply Fixes: Apply Dart fix suggestions to files using the
apply_fixes
tool.
Flutter Tools MCP Server
Overview
The flutter-tools
MCP server provides tools for interacting with the Flutter SDK. It offers two main tools: get_diagnostics
and apply_fixes
. These tools help in analyzing and fixing Dart/Flutter files.
Tools
get_diagnostics
Description: Get Flutter/Dart diagnostics for a file.
Input Schema:
Example Usage:
apply_fixes
Description: Apply Dart fix suggestions to a file.
Input Schema:
Example Usage:
Dependencies
@modelcontextprotocol/sdk
: ^1.0.0node-pty
: ^1.0.0which
: ^4.0.0
Dev Dependencies
@types/node
: ^18.19.0@types/which
: ^3.0.3typescript
: ^5.3.3
Scripts
build
: Compiles the TypeScript code and sets the executable permissions on the compiled JavaScript file.prepare
: Runs thebuild
script.watch
: Compiles the TypeScript code and watches for changes, recompiling automatically.
Installation
To install the MCP server, add the following configuration to your MCP settings file:
Replace /path/to/flutter-tools/build/index.js
with the actual path to the compiled JavaScript file.
Usage
- Ensure the Flutter SDK is installed and available in your PATH.
- Start the MCP server using the configured command.
- Use the
get_diagnostics
andapply_fixes
tools as needed.
Example
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables interaction with the Flutter SDK by providing tools to analyze and apply fixes to Dart and Flutter files.
Related Resources
Related MCP Servers
- -securityFlicense-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 -93921TypeScript
- AsecurityAlicenseAqualityEnables interaction with iOS simulators by providing tools to inspect UI elements, control UI interactions, and manage simulators through natural language commands.Last updated -6872829JavaScriptMIT License
- -securityAlicense-qualityEnables interaction with GitHub repositories through the GitHub API, allowing file operations, repository management, issue tracking, and code search through natural language commands.Last updated -32TypeScriptMIT License
- AsecurityAlicenseAqualityProvides tools for analyzing project structures, searching through codebases, managing dependencies, and performing file operations with advanced filtering capabilities.Last updated -65121TypeScriptMIT License