Skip to content

Conversation

stefanoamorelli
Copy link

@stefanoamorelli stefanoamorelli commented Oct 7, 2025

Adds hot_restart tool support to the dart_mcp_server Flutter launcher, enabling hot restart functionality for running Flutter applications while maintaining the current session.

This implementation is based on the changes from gemini-cli-extensions/flutter#1 and addresses issue #254.


Closes #254

Add tool definition with input schema for process ID
and output schema for success status
Send 'R' command to Flutter process stdin to trigger
hot restart while maintaining app session
@stefanoamorelli stefanoamorelli changed the title feat: add hot_restart support to Flutter launcher [Feat] Add hot_restart support to dart_mcp_server Oct 7, 2025
@gspencergoog
Copy link
Contributor

Thanks for the submission @stefanoamorelli !

And thank you for your previous submission for the flutter_launcher MCP server, we really appreciate the effort. That code would have worked well there (except it's going away), but probably isn't the right approach here in this MCP server.

Here, hot restart should work similarly to hot reload, in that it should use the connection to the DTD to send a restart rather than using the process ID as an identifier and interacting with the flutter run process. This MCP server knows more about how to connect to the DTD and talk to it, and since there's already a hotReload command, it makes sense to also have hotRestart use the same mechanisms.

Because that's significantly different from your approach here, and because it's actually pretty obscure how to request it, I went ahead and built a separate PR to add this part.

So I'm going to go ahead and close this PR in favor of #297 which does the same thing, but using the DTD instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a hot restart tool

2 participants