Android DevTools MCP
This server lets an AI agent inspect and control Android emulators or physical devices via ADB, enabling a Chrome DevTools-style UI automation workflow.
List connected devices (
android_list_devices): Enumerate all ADB-connected emulators and physical devices, including offline and unauthorized ones.Capture UI hierarchy (
android_take_snapshot): Capture a compact semantic UI Automator tree to identify and target UI nodes by resource ID, text, content description, class, and state flags.Take screenshots (
android_take_screenshot): Capture the current Android display as a PNG image.Inspect app state (
android_get_app_state): Retrieve the foreground package/activity, process state, and display metadata.Tap the screen (
android_tap): Tap explicit screen coordinates or a safely revalidated node from the latest snapshot (verifying the node still occupies the same bounds before acting).Type text (
android_type_text): Type ADB-safe ASCII text into the focused UI field, with an option to clear existing content first.Swipe gestures (
android_swipe): Perform a swipe gesture between two screen coordinates with a configurable duration.Press keys (
android_press_key): Send Android key events by name (e.g., Back, Home, Enter, Delete, directional keys) or by numeric keycode.Wait for UI state (
android_wait_for): Poll the semantic UI hierarchy until a matching node exists, disappears, or reaches a specific state (enabled, checked, selected, focused).Read app logs (
android_get_logs): Retrieve bounded, filtered logcat output scoped to a specific application's current process IDs, with configurable log level and line limits.
Allows interaction with Android devices (emulators or physical devices) via ADB, enabling UI inspection, tapping, text input, swiping, key events, and log retrieval.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Android DevTools MCPtake a snapshot of the current UI"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Android DevTools MCP
An MCP server that lets an agent inspect and operate an already-running Android emulator or physical device through ADB.
It provides a Chrome-DevTools-style workflow:
Capture a semantic UI snapshot or screenshot.
Identify a UI node.
Tap the revalidated node, type text, swipe, or press a key.
Inspect the resulting UI, foreground activity, and application logs.
The server talks to Android through ADB, not directly to QEMU. This keeps the same interface usable with Android Studio emulators, headless emulators, third-party QEMU frontends, and physical devices.
Requirements
Node.js 20 or later
Android SDK Platform Tools with
adbavailable onPATH, orADB_PATHset to the executableA booted device visible in
adb devices -lUSB debugging authorization accepted for physical devices
The server attaches to existing devices. It does not start AVDs, install APKs, or launch applications.
Related MCP server: Android MCP Server
Build and run
npm install
npm run build
node dist/cli.jsThe process uses MCP stdio, so its standard output is reserved for protocol messages. Operational messages are written to standard error.
Example MCP client configuration for this checkout:
{
"mcpServers": {
"android-devtools": {
"command": "node",
"args": [
"<path-to-repo>/dist/cli.js"
],
"env": {
"ANDROID_SERIAL": "emulator-5554"
}
}
}
}ANDROID_SERIAL is optional when exactly one ready device is connected. Use
ADB_PATH when adb is not on PATH.
Tools
Tool | Purpose |
| List ready, offline, and unauthorized ADB devices |
| Return a compact semantic UI hierarchy |
| Return the current display as PNG |
| Inspect foreground activity, process, and display state |
| Tap coordinates or a revalidated snapshot node |
| Clear and type into the focused field |
| Perform a coordinate-based swipe |
| Send Android key events |
| Wait for a selector and semantic state |
| Return bounded logcat lines for an app's current PIDs |
Snapshot selectors use exact AND matching over resource ID, text, content description, class, and state flags. Node IDs are scoped to one snapshot. Before a node tap, the server captures a fresh hierarchy and verifies that the same semantic node still occupies the same bounds. It returns a stale or ambiguous-target error instead of tapping when that check fails.
Verification
npm run check
npm test
npm run buildThere is also an opt-in smoke test for a disposable emulator. It sends the Home key and reads the current launcher's logs:
$env:ANDROID_MCP_TEST_SERIAL = "emulator-5554"
npm run test:deviceLimitations
UI Automator exposes the accessibility/semantic tree, not Android Studio's private Layout Inspector data.
Canvas-rendered interfaces, games, protected windows, and some WebViews may only be inspectable through screenshots and coordinates.
Compose elements need usable semantics to appear as distinct nodes.
Text entry intentionally accepts only ADB-safe ASCII: letters, numbers, spaces, and
.,_@+-/:=. Unicode input requires an optional device-side input method or instrumentation component and is not part of this release.Network tracing, CPU/memory profiling, frame timing, AVD lifecycle, and APK management are outside the current black-box scope.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xleepy/android-emulator-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server