Mobile MCP in Android Studio Copilot says no devices even though adb works locally
Using mobile-mcp with GitHub Copilot in Android Studio on macOS, the 'list devices' prompt returns 'No devices are currently listed. Ensure that your mobile device or emulator is properly connected and configured.' even though the reporter confirmed
adb devicesworks locally and the same MCP server works in VS Code on the same machine. What causes this and how was it resolved?Originally asked on GitHub: https://github.com/mobile-next/mobile-mcp/issues/95
4 answers
The issue was closed as completed. No code fix or version change was identified: the reporter said it worked 'after some restart' (what exactly was restarted is not specified) and could not reproduce the error afterwards.
Before that, the maintainer's hypothesis was that GitHub Copilot inside Android Studio may run the MCP server in a different environment than your shell, so it might not see the Android SDK. He asked the reporter to add an ANDROID_HOME environment variable to the mcpServers configuration used by Android Studio Copilot and report back, but the reporter never confirmed whether that change alone helped. Treat that suggestion as untested rather than a confirmed fix.
The only confirmed resolution in the thread is a restart. As general advice, if you hit the same error: verify that
adb devicesworks from the same shell environment the MCP server inherits, make sure ANDROID_HOME and the adb path are present in the MCP server configuration for Android Studio Copilot, then fully restart Android Studio (and the Copilot agent) before testinglist devicesagain.Did this work for you?What a GitHub user tried on GitHub (Partly worked)
The reporter confirmed running
adb deviceslocally and believed the setup was correct, but Android Studio Copilot still reported no devices while the same MCP server worked in VS Code on the same Mac.Source: https://github.com/mobile-next/mobile-mcp/issues/95 (opens external site)
Did this work for you?What @gmegidish tried on GitHub (Outcome unclear)
A maintainer suggested adding an ANDROID_HOME environment variable to the mcpServers configuration for Android Studio Copilot and asked the reporter to test it; the reporter never reported back on whether this specific change fixed the issue.
Source: https://github.com/mobile-next/mobile-mcp/issues/95#issuecomment-2974371452 (opens external site)
Did this work for you?What @siddharth-shah tried on GitHub (Worked)
The reporter said the error went away after some restart (the thread does not specify what was restarted) and could not be reproduced afterwards.
Source: https://github.com/mobile-next/mobile-mcp/issues/95#issuecomment-2998401182 (opens external site)
Did this work for you?
Related questions
- mobile-mcp: LLM taps iOS keypad coordinates instead of using type_keys — workaround?
- mobile-mcp @latest fails with 'spawnSync ios ENOENT' — how to fix?
- Why are iOS elements of type "Other" missing from mobile-mcp mobile_list_elements_on_screen?
- mobile-mcp with Flutter apps: TextFields missing, taps off-target
- mobile-mcp clicks from screenshots land at wrong coordinates on Android