Skip to main content
roveflow init creates every file Roveflow needs. After that, you wire four small things into your own app code. The one-liner is the only truly unavoidable edit — the rest is optional or depends on your project already having certain helpers.
1

Add the registration call to main.dart

Import the tools file and call registerMcpInteractionTools() inside your kDebugMode block:
import 'package:<your_app>/core/mcp/mcp_interaction_tools.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  if (kDebugMode) {
    MCPToolkitBinding.instance
      ..initialize()
      ..initializeFlutterToolkit();
    await registerMcpInteractionTools();
  }

  runApp(const MyApp());
}
The registration only runs in debug mode. Release builds do not include the tools and pay zero runtime cost.
2

Add mcp_toolkit to pubspec

dependencies:
  mcp_toolkit: ^<latest>
Run flutter pub get. Roveflow uses MCPToolkitBinding for tool registration; it is the only runtime dependency the interaction tools pull in.
3

Provide a navigate.pop() helper

The bundled lib/core/mcp/mcp_interaction_tools.dart (written by roveflow init) imports a top-level navigate.pop() to back out of routes and modals. The CLI does not write this helper; add it yourself:
// lib/core/general_helpers/utils/navigation_util.dart
import 'package:flutter/widgets.dart';

final rootNavigatorKey = GlobalKey<NavigatorState>();

class _Navigate {
  void pop() => rootNavigatorKey.currentState?.pop();
}

final navigate = _Navigate();
Then attach the key in MaterialApp:
MaterialApp(
  navigatorKey: rootNavigatorKey,
  // ...
)
If your project already exposes a navigate.pop() helper elsewhere, point the import in mcp_interaction_tools.dart at that file instead of adding a new one.
4

Verify .mcp.json

roveflow init writes .mcp.json using env-var substitution:
{
  "mcpServers": {
    "flutter-inspector": {
      "command": "${ROVEFLOW_FLUTTER_INSPECTOR}",
      "args": ["--dart-vm-port=8181", "--resources", "--images"]
    }
  }
}
Make sure ROVEFLOW_FLUTTER_INSPECTOR is exported to the absolute path of your locally built flutter_inspector_mcp binary (see Build flutter_inspector_mcp). To avoid the env var, replace the command field with the absolute path directly.The flags matter:
  • --dart-vm-port=8181 must match the port you pass to flutter run (--vm-service-port=8181). If port 8181 is occupied by another Flutter process, change both to the same free port (e.g., 8182).
  • --resources enables the screenshot resource the agent uses for before/after assertions.
  • --images lets the agent read screenshot blobs back.
5

Fill in docs/roveflow/scenarios.md

roveflow init wrote a starter inventory. Replace cold-setup with your app’s real first-run flow — screen titles, login touches, onboarding dismissals — so the agent can reach a known home state from a clean install.Authoring guide: Authoring scenarios. Field reference: Scenario schema.

What you don’t have to touch

  • Widget code — the default navigation strategy uses visible text, the Flutter semantics tree, and vision reasoning. ValueKey is a tuning step, not a prerequisite.
  • Release builds — the registration only runs under kDebugMode.
  • CI config — Roveflow is informational today. Run it locally and pre-merge. Safe CI gating and the determinism knobs land next.

Verify

With the app running on a simulator in debug mode, in Claude Code:
/roveflow --only=cold-setup
If cold-setup passes, the wiring is good. If not, check Running smoke tests and the failure hints in Quickstart.