# Flutter MCP Toolkit

Drives and inspects Flutter debug apps using semantic snapshots, widget taps, and hot reload. Helpful for building autonomous testing and UI debugging workflows.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 392
- Author: Arenukvern
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Arenukvern/mcp_flutter/tree/HEAD/mcp_server_dart
- Updated: 2026-10-17
- HTML: https://affpapa.org/en/nevibecode/mcp/flutter-mcp-toolkit

## What it does

The server connects to a debug Flutter build and routes calls through tools prefixed with `fmt_`. It captures semantic UI snapshots, simulates taps, and enters text. Gestures follow a Playwright-style reference model: the agent requests a `semantic_snapshot`, gets a handle like `s_N`, and passes it to `fmt_tap_widget`.

Under the hood sits `flutter_mcp_core`. This layer powers both the MCP adapter and the `fmtk` CLI entrypoint. The server can trigger hot reloads with `fmt_hot_reload_and_capture`, dump render trees, and evaluate ad-hoc Dart code against the running root library.

Inspection requires modifying application code beforehand. You need to add `mcp_toolkit` and call `MCPToolkitBinding.instance.bootstrapFlutter(...)` at startup. Without Docker and an active debug process, the server cannot connect to the Dart VM.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp_server_dart -- docker run -i --rm ghcr.io/arenukvern/flutter-mcp-toolkit:7.0.1
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp_server_dart -- docker run -i --rm ghcr.io/arenukvern/flutter-mcp-toolkit:7.0.1
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp_server_dart": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/arenukvern/flutter-mcp-toolkit:7.0.1"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp_server_dart": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/arenukvern/flutter-mcp-toolkit:7.0.1"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp_server_dart docker run -i --rm ghcr.io/arenukvern/flutter-mcp-toolkit:7.0.1
```

## When to use it
- inspect and tap Flutter widgets using semantic reference handles
- run hot reload while taking screenshots and logging runtime errors
- scroll to off-screen elements using the bounded reveal_search helper
- evaluate ad-hoc Dart expressions directly in the running root library
- dump semantics, render, and focus trees for UI diagnostics

## Example prompts
- Take a semantic snapshot of the running Flutter app and tap the submit button.
- Enter text into input field `s_2` and scroll down to reveal the next section.
- Run `fmt_hot_reload_and_capture` to apply recent code changes and verify the view.

## Similar
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 9946
- [mobilerun](https://affpapa.org/en/nevibecode/mcp/mobilerun.md) — MCP server · ★ 9751
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11912
- [XcodeBuildMCP](https://affpapa.org/en/nevibecode/mcp/xcodebuildmcp.md) — MCP server · ★ 6505
- [ShipSwift](https://affpapa.org/en/nevibecode/mcp/shipswift.md) — MCP server · ★ 3244
- [agent-device](https://affpapa.org/en/nevibecode/mcp/agent-device.md) — MCP server · ★ 5149

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
