🔧 Troubleshooting
-
Connection Issues
- Ensure your Flutter app is running in debug mode
- Verify the port matches in both Flutter app and MCP server
- Check if the port is not being used by another process
- Run
flutter_mcp_cli doctor --jsonfor preflight diagnostics - Run
flutter_mcp_cli exec --name get_extension_rpcs --args '{}'before app-level inspection - Safest selector: use
arguments.connection.uriand paste exact Flutter machineapp.debugPort.wsUri - If you get
connection_selection_required, retry witharguments.connection.targetIdusing one URI fromavailableTargets(or callconnect_debug_appfirst) - Do not use
host:portfortargetId; use full VM websocket URI orarguments.connection.uri
-
AI Tool Not Detecting Inspector
- Restart the AI tool after configuration changes
- Verify the configuration JSON syntax
- Check the tool's logs for connection errors
-
Dynamic Tools Not Appearing
- Ensure
mcp_toolkitpackage is properly initialized in your Flutter app - Check that tools are registered using
MCPToolkitBinding.instance.addEntries() - Use
listClientToolsAndResourcesto verify registration - Hot reload your Flutter app after adding new tools
- Ensure
-
Missing
mcp_toolkitExtensions (Cannot Plug Into App)- Symptom:
get_extension_rpcsis missingext.mcp.toolkit.app_errors,ext.mcp.toolkit.view_details,ext.mcp.toolkit.view_screenshots, orext.mcp.toolkit.inspect_widget_at_point - Ensure startup includes
MCPToolkitBinding.instance..initialize()..initializeFlutterToolkit(); - Hot reload may not be enough after instrumentation changes; run hot restart or rerun the app
- If the app cannot be modified, do not claim screenshot/layout/error inspection works
- Symptom:
-
Blank Screenshots
- Ensure server runs with images enabled (
--images) - Keep app window visible and foreground; minimized/headless windows can produce blank captures
- Retry with
flutter_mcp_cli exec --name get_screenshots --args '{}'
- Ensure server runs with images enabled (
-
connection_selection_requiredErrors- This means multiple debug targets are available and the server needs an explicit target.
- Use the returned
availableTargetslist and retry withconnection.targetId. - Example:
"arguments": {"connection": {"targetId": "ws://127.0.0.1:59490/<token>/ws"}}
-
target_not_foundErrors- This means the provided
connection.targetIdwas not in current discovery results. - Retry with
arguments.connection.uriusing exactapp.debugPort.wsUrifrom Flutter machine output.
- This means the provided
-
First Explicit URI Connect Times Out (
connect_failed)- Some environments need longer than the default connect timeout for first handshake.
- Retry the same command once with exact tokenized URI.
- Verify with
flutter_mcp_cli doctor --json --target <ws_uri> --timeout-ms 10000.