Android DevTools MCP

Android DevTools MCP

Enables an agent to inspect and interact with Android emulators or physical devices via ADB, capturing UI snapshots, tapping nodes, typing text, and reading app logs.

Category
Visit Server

README

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:

  1. Capture a semantic UI snapshot or screenshot.
  2. Identify a UI node.
  3. Tap the revalidated node, type text, swipe, or press a key.
  4. 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 adb available on PATH, or ADB_PATH set to the executable
  • A booted device visible in adb devices -l
  • USB debugging authorization accepted for physical devices

The server attaches to existing devices. It does not start AVDs, install APKs, or launch applications.

Build and run

npm install
npm run build
node dist/cli.js

The 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": [
        "T:\\repos\\andoid-devtools\\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
android_list_devices List ready, offline, and unauthorized ADB devices
android_take_snapshot Return a compact semantic UI hierarchy
android_take_screenshot Return the current display as PNG
android_get_app_state Inspect foreground activity, process, and display state
android_tap Tap coordinates or a revalidated snapshot node
android_type_text Clear and type into the focused field
android_swipe Perform a coordinate-based swipe
android_press_key Send Android key events
android_wait_for Wait for a selector and semantic state
android_get_logs 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 build

There 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:device

Limitations

  • 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured