flutter-dev-mcp
Provides tools for Flutter development including testing (with compact summaries and detailed error retrieval), app lifecycle management (run, hot reload, hot restart, kill, logs), static analysis, building for various targets, dependency management, and code generation, all with output limits and sanitized inputs for agent use.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@flutter-dev-mcp run flutter analyze on the project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
flutter-dev-mcp
An MCP (Model Context Protocol) server that gives AI coding agents first-class Flutter development tools.
Why?
Flutter CLI tools are designed for humans, not agents. flutter test dumps hundreds of lines of output that overwhelm context windows. flutter run requires interactive terminal access for hot reload. flutter analyze produces unstructured text. This MCP server wraps the Flutter CLI into structured, agent-friendly tools with sensible output limits.
Key design decisions:
Test results are two-phase:
flutter_testreturns a compact summary of failures.flutter_get_resultfetches full error details for specific tests. This prevents a single test run from blowing the context window.All outputs are capped at 24KB to stay within typical tool response limits.
flutter runis managed: The server holds the process, exposes hot reload/restart/logs/kill as separate tools, so the agent doesn't need terminal access.Inputs are sanitized: All commands use array-based process spawning (no shell). Project paths are normalized and validated. Package names and device IDs are checked for flag injection.
Related MCP server: MTDevKit
Tools at a glance
Tool | Parameters | Description |
| project_dir, [test_path], [test_name], [extra_args] | Run tests and return a compact summary of failures only. Use |
| test_run_id, test_ids | Get full error details for specific test IDs from a previous |
| project_dir, [device], [is_debug], [dont_detach], [extra_args] | Start a Flutter app on |
| run_id | Hot reload a running app. |
| run_id | Hot restart a running app. |
| run_id | Kill a running app. Graceful shutdown, force-kills after 5s. |
| run_id | Get logs from a running app. Returns the most recent output, capped at 24KB. |
| project_dir | Run static analysis. Returns structured issues with severity, file, line, column, and rule name. |
| [wireless] | List available devices (simulators, emulators, physical). Skips wireless scan by default. |
| project_dir | Delete build artifacts. Useful when builds get into a bad state. |
| project_dir | Resolve and download dependencies. |
| project_dir, packages, [dev] | Add one or more packages. Supports |
| project_dir | Generate localization files from ARB files. |
| project_dir, target, [debug], [extra_args] | Build the app for a target platform (apk, ios, web, macos, etc.). |
| project_dir, [delete_conflicting] | Run |
Parameters in [brackets] are optional.
Install
Requires Node.js 18+ and Flutter SDK on your PATH.
npm install -g flutter-dev-mcpOr run directly with npx (recommended):
npx -y flutter-dev-mcpOptions
--limit-tools Only expose tools that provide significant benefit over
direct CLI usage (testing, app lifecycle, logs). Omits
analyze, devices, clean, pub get/add, gen-l10n, build,
and build_runner, which agents can run via shell.Configuration
Claude Code (CLI)
Easy: claude mcp add flutter-dev -- npx -y flutter-dev-mcp
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"flutter-dev": {
"command": "npx",
"args": ["-y", "flutter-dev-mcp"]
}
}
}Codex / Other agents
Any agent that supports MCP can use this server. Point it at the stdio transport:
npx -y flutter-dev-mcpThe server communicates over stdin/stdout using the MCP JSON-RPC protocol.
Tools
Testing
flutter_test
Run tests and get a summary of failures.
Parameter | Type | Required | Description |
| string | yes | Path to the Flutter project |
| string | no | Specific test file or directory |
| string | no | Filter by test name (plain string match) |
| string[] | no | Additional flags (e.g. |
Returns a test_run_id and an array of failed tests with short error excerpts. Pass the test_run_id to flutter_get_result for full details.
flutter_get_result
Get full error output for specific test IDs from a previous run.
Parameter | Type | Required | Description |
| number | yes | From a previous |
| number[] | yes | Test IDs to get details for |
Output is capped at 24KB total. If a single test exceeds that, its error is truncated. If multiple tests would exceed it, only tests that fit are returned.
App lifecycle
flutter_run
Start a Flutter app and get a run_id for subsequent commands.
Parameter | Type | Required | Default | Description |
| string | yes | Path to the Flutter project | |
| string | no |
| Device ID (e.g. |
| boolean | no |
| Debug mode (true) or release mode (false) |
| boolean | no |
| Wait for app to exit instead of returning after start |
| string[] | no |
| Additional flags (e.g. |
flutter_hot_reload
Trigger a hot reload on a running app.
Parameter | Type | Required | Description |
| number | yes | From a previous |
flutter_hot_restart
Trigger a hot restart on a running app.
Parameter | Type | Required | Description |
| number | yes | From a previous |
flutter_kill
Kill a running app. Sends q for graceful shutdown, force-kills after 5s.
Parameter | Type | Required | Description |
| number | yes | From a previous |
flutter_logs
Get logs from a running app. Returns the most recent output, capped at 24KB.
Parameter | Type | Required | Description |
| number | yes | From a previous |
Analysis
flutter_analyze
Run static analysis. Returns structured issues with severity, file location, and lint rule name.
Parameter | Type | Required | Description |
| string | yes | Path to the Flutter project |
flutter_devices
List available devices.
Parameter | Type | Required | Default | Description |
| boolean | no |
| Include wireless devices (slower) |
Build
flutter_build
Build the app for a target platform. Can take a long time for release builds.
Parameter | Type | Required | Default | Description |
| string | yes | Path to the Flutter project | |
| string | yes | Build target: | |
| boolean | no |
| Debug mode (true) or release mode (false) |
| string[] | no |
| Additional flags (e.g. |
Dependencies & codegen
flutter_pub_get
Resolve and download dependencies.
Parameter | Type | Required | Description |
| string | yes | Path to the Flutter project |
flutter_pub_add
Add packages to the project.
Parameter | Type | Required | Default | Description |
| string | yes | Path to the Flutter project | |
| string[] | yes | Package names (e.g. | |
| boolean | no |
| Add as dev dependency |
flutter_clean
Delete build artifacts. Useful when builds get into a bad state.
Parameter | Type | Required | Description |
| string | yes | Path to the Flutter project |
flutter_gen_l10n
Generate localization files from ARB files.
Parameter | Type | Required | Description |
| string | yes | Path to the Flutter project |
flutter_build_runner
Run dart run build_runner build for code generation (freezed, json_serializable, drift, etc.).
Parameter | Type | Required | Default | Description |
| string | yes | Path to the Flutter project | |
| boolean | no |
| Delete conflicting outputs before building |
Building from source
git clone <repo-url>
cd flutter-dev-mcp
npm install
npm run build
node dist/index.jsLicense
MIT
Available Tools
15 toolsflutter_analyzeA
Run static analysis on a Flutter project. Returns all errors, warnings, and info-level issues with file locations and rule names.
Inputs: project_dir (required).
flutter_buildB
Build a Flutter app for a target platform (e.g. apk, ios, web, macos). Can take a long time.
Inputs: target (required), project_dir (required), debug, extra_args.
flutter_build_runnerA
Run build_runner to generate code (freezed, json_serializable, drift, etc.).
Inputs: project_dir (required), delete_conflicting.
flutter_cleanA
Run flutter clean to delete build artifacts. Useful when builds get into a bad state.
Inputs: project_dir (required).
flutter_devicesA
List available Flutter devices (simulators, emulators, physical devices).
Inputs: wireless.
flutter_gen_l10nB
Generate localization files from ARB files.
Inputs: project_dir (required).
flutter_get_resultA
Get full error details for specific test IDs from a previous flutter_test run. Output is capped at 24KB.
Inputs: test_ids (required), test_run_id (required).
flutter_hot_reloadB
Trigger a hot reload on a running Flutter app.
Inputs: run_id (required).
flutter_hot_restartC
Trigger a hot restart on a running Flutter app.
Inputs: run_id (required).
flutter_killA
Kill a running Flutter app.
Inputs: run_id (required).
flutter_logsA
Get logs from a running Flutter app. Returns the most recent logs, capped at 24KB.
Inputs: run_id (required).
flutter_pub_addB
Add one or more packages to the project's dependencies.
Inputs: packages (required), project_dir (required), dev.
flutter_pub_getB
Run flutter pub get to resolve and download dependencies.
Inputs: project_dir (required).
flutter_runA
Start a Flutter app. Returns a run_id for use with hot_reload, hot_restart, and logs tools.
Inputs: project_dir (required), device, is_debug, extra_args, +1 more.
flutter_testA
Run flutter tests and return a summary of failed tests. Use flutter_get_result to get full error details for specific test IDs.
Inputs: project_dir (required), test_name, test_path, extra_args.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Every tool targets a distinct Flutter workflow action: testing, result retrieval, running, hot reload/restart, killing, logs, analysis, devices, cleaning, pub operations, localization generation, code generation, and building. The complementary relationship between flutter_test and flutter_get_result is clearly described and should not cause confusion. No two tools appear to do the same thing.
All tools follow a consistent flutter_ prefix with lowercase snake_case naming. Most tools use an imperative verb or a recognizable Flutter CLI command, making the pattern predictable and easy to navigate. Even noun-style names like flutter_logs and flutter_devices fit the overall flutter_<command> convention.
Fifteen tools is at the upper end of the ideal range but every tool corresponds to a meaningful, non-redundant Flutter development capability. The count is well-scoped for a comprehensive Flutter development server without feeling bloated. Each tool earns its place by covering a distinct phase of the development workflow.
The tool surface covers the main Flutter lifecycle well: testing, running, hot reload/restart, logs, analysis, dependency management, code generation, localization, and building. Minor gaps exist such as no flutter_pub_remove, flutter_clean_list, or project scaffolding tool, but these are unlikely to block common agent workflows. The core development loop is fully supported.
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides AI agents with tools to build, deploy, and manage Flutter applications, including APK/AAB generation, keystore management, and CI/CD integration.1MIT
- FlicenseAqualityDmaintenanceAn MCP server that scaffolds Flutter projects from a custom clean-architecture Bitbucket template, enabling AI agents to create, list, and inspect Flutter projects via natural language.3-
- AlicenseBqualityDmaintenanceAn MCP server that lets AI agents see, tap, type, scroll, and assert inside live Flutter apps — no pre-written tests required.28MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that lets AI agents drive real mobile-app automation on connected devices, enabling natural-language test tasks, test case generation, and app/build management for Android and iOS.-