Skip to content

Commit 1a33d89

Browse files
committed
docs: add Flutter Driver example to MCP server page
Add a third usage example showing how to connect to a running Flutter app and interact with its UI using Flutter Driver via the MCP server.
1 parent 50cce75 commit 1a33d89

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/content/ai/mcp-server.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,29 @@ is now a single request.
391391

392392
[`package:fl_chart`]: {{site.pub-pkg}}/fl_chart
393393

394+
### Interact with a running app using Flutter Driver
395+
396+
You can use the Dart and Flutter MCP server to connect to a running
397+
Flutter app and interact with its UI—taking screenshots, tapping
398+
buttons, entering text, and scrolling.
399+
400+
Launch your app with `--print-dtd` and ask your AI assistant:
401+
402+
> Connect to my running Flutter app using the DTD URI from the
403+
> terminal output, then take a screenshot and tap "Sign In".
404+
405+
The AI agent connects via the `dtd` tool, takes a screenshot with
406+
`flutter_driver_command`, and taps the button—all without you
407+
writing test code.
408+
409+
:::note
410+
Your app must call `enableFlutterDriverExtension()` before `runApp()`
411+
for Flutter Driver commands to work. See the
412+
[full setup guide][flutter-driver-guide] for details.
413+
:::
414+
415+
[flutter-driver-guide]: https://github.com/dart-lang/ai/blob/main/pkgs/dart_mcp_server/README.md#connect-to-a-running-flutter-app
416+
394417
## Provide feedback
395418

396419
If you encounter any issues or have feedback about the

0 commit comments

Comments
 (0)