r/FlutterDev • u/stevenreyes20 • 24d ago
Discussion Can Claude Code run and test Flutter apps using an emulator?
I see that Claude can run React Native iOS apps using an emulator. I can't do that on android as far I know, I use my phone.
Does Claude support a Flutter emulator too, or is there some kind of MCP server or connector that would allow it to run and test Flutter apps in an emulator?
0
Upvotes
1
u/Dry-Trick-2234 24d ago
I use the official Dart MCP server with flutter_driver and integration_test to run integration tests on an Android emulator via adb. It works but you need to start the emulator yourself first, the MCP does not launch it. For iOS simctl handles the simulator side. What specific test scenario are you trying to automate?
2
u/HopeExpensive9215 24d ago
Sure, I use maestro mcp so the AI can do test too. maestro.dev
1
u/_kit_g 24d ago
Yes, there is flutter_driver and integration_test for that, plus the official dart mcp. These will give you some control over the dart part of your apps. For android, you can just use adb, you can use all of your phone that way.
I sometimes do some additional integration testing this way before my releases.
1
u/woolbobaggins 24d ago
It can run the commands to open the emulators, yeah. I use it like this
1
u/HovercraftThis6834 24d ago
you don't really need an mcp for android. I have it drive my real phone over usb with plain adb and it works fine for a flutter app: flutter build apk, adb install -r, am start to launch, then adb shell uiautomator dump to read the screen as text and input tap x y to press things. screencap only when it needs to actually see the layout, the text dump is way cheaper on tokens. an emulator is the same thing since adb doesn't care. one tip, tell it to ask before installing or tapping if you use the phone yourself, otherwise it will happily tap around while you're in another app
1
u/No_Percentage_837 23d ago
Check out https://github.com/mobile-next/mobile-mcp Really helped me