Skip to main content
Glama

Android Pilot MCP

npm version License: MIT CI Node.js

A Model Context Protocol (MCP) server that gives AI-powered editors full control over Android development. Build, test, debug, and deploy Android apps entirely through natural language.

Works with Claude Code, Cursor, Windsurf, and any MCP-compatible client.

Read the full documentation

What Can It Do?

Just tell your AI editor what you want:

"Build my Android project"
"Create a new Compose project called MyApp with package com.example.myapp"
"List my connected devices"
"Install the debug APK and launch the app"
"Show error logs for tag CrashHandler"
"Take a screenshot of my device"
"Run lint and treat fatal issues as errors"
"Test deep link myapp://profile/123 on my device"

No manual adb commands. No switching between terminal and IDE. Your AI editor handles it all.

Related MCP server: DeepADB

What's New in 1.1.0

  • All 39 tools now use registerTool() with descriptive titles and tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so clients can reason about a tool before calling it.

  • Structured, machine-readable output on key tools (device_list, avd_list, app_permissions_list, device_info, gradle_build, gradle_list_tasks, lint_run, apk_permissions) alongside the usual human-readable text.

  • New MCP Resources for live device state and new MCP Prompts for common multi-step workflows.

  • Progress notifications, request cancellation, and elicitation confirmations for destructive actions — see Progress, Cancellation & Confirmations.

  • Android SDK detection now falls back to the standard Linux (~/Android/Sdk) and Windows (%LOCALAPPDATA%\Android\Sdk) install locations, in addition to the macOS default.

  • A missing or misconfigured SDK no longer crashes the server — tools return a clean error telling you to set ANDROID_HOME.

See CHANGELOG.md for the full list of changes.

39 Tools Across 7 Categories

Category

Tools

What It Covers

Build & Lint

6

Gradle build, task runner, clean, dependency tree, lint analysis

Device Management

15

Emulators, APK install, app lifecycle, permissions, WiFi ADB, file transfer

Debugging

7

Logcat, screenshots, screen recording, UI hierarchy, shell commands

Scaffolding

4

Project creation (Compose/XML), activities, fragments, Compose screens

APK Analysis

2

APK inspection, size, manifest, permissions audit

Intents & Deep Links

3

Send intents, broadcast events, test deep links

SDK Management

2

List/install SDK packages, system images, build tools

Quick Start

Install and run with npx (no install needed)

npx android-pilot-mcp

Or install globally

npm install -g android-pilot-mcp

Prerequisites

  • Node.js 20+

  • Android SDK with platform-tools (adb), emulator, and command-line tools

  • Java JDK 17+ (for Gradle builds)

The server looks for the Android SDK via ANDROID_HOME, ANDROID_SDK_ROOT, or the platform default install location: ~/Library/Android/sdk on macOS, ~/Android/Sdk on Linux, or %LOCALAPPDATA%\Android\Sdk on Windows. If none of these resolve to a real directory, the server still starts — tools just return a clean error telling you to set ANDROID_HOME instead of crashing.

Editor Setup

Claude Code

Add to .mcp.json (project) or ~/.claude/mcp.json (global):

{
  "mcpServers": {
    "android-pilot": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "android-pilot-mcp"]
    }
  }
}

Cursor

Add via Cursor Settings > MCP, or edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "android-pilot": {
      "command": "npx",
      "args": ["-y", "android-pilot-mcp"]
    }
  }
}

Windsurf

Add via Windsurf Settings > MCP:

{
  "mcpServers": {
    "android-pilot": {
      "command": "npx",
      "args": ["-y", "android-pilot-mcp"]
    }
  }
}

Other MCP Clients

Any MCP client with stdio transport support works. Point it at npx -y android-pilot-mcp.

Tool Reference

Build & Lint

Tool

Description

gradle_build

Run debug/release builds with optional module targeting

gradle_task

Run any Gradle task (test, lint, bundle, connectedAndroidTest, etc.)

gradle_list_tasks

List all available Gradle tasks

gradle_clean

Clean build output

gradle_dependencies

Show the dependency tree for a module

lint_run

Run Android Lint — returns warnings, errors, and suggestions with file locations

Device Management

Tool

Description

device_list

List connected devices and running emulators

avd_list

List available AVDs

avd_create

Create a new AVD with system image and device profile

emulator_start

Start an emulator (cold boot, headless, wipe data options)

emulator_stop

Stop a running emulator

apk_install

Install an APK on a device

app_launch

Launch an app by package name

app_stop

Force stop a running app

app_clear_data

Clear all app data (equivalent to Clear Storage)

app_permission

Grant or revoke a runtime permission

app_permissions_list

List all permissions with granted/denied status

adb_wifi_connect

Switch to WiFi ADB

adb_wifi_disconnect

Disconnect WiFi ADB

file_push

Push a file to the device

file_pull

Pull a file from the device

Debugging

Tool

Description

logcat_read

Read logcat with tag, priority, time, and text filters

logcat_clear

Clear the logcat buffer

device_screenshot

Capture a screenshot as PNG

device_info

Get device model, OS version, screen density, and more

device_shell

Execute an ADB shell command

ui_dump

Dump UI hierarchy as XML via UI Automator

screen_record

Record the screen as MP4 (duration is clamped to 1-180 seconds)

Scaffolding

Tool

Description

project_create

Create a new Android project with Kotlin + Gradle KTS (Compose or XML)

scaffold_activity

Generate an Activity with optional XML layout

scaffold_fragment

Generate a Fragment with optional XML layout

scaffold_compose_screen

Generate a Compose screen with preview and optional ViewModel

APK Analysis

Tool

Description

apk_analyze

Inspect size, version, SDK targets, DEX references, manifest

apk_permissions

List all permissions declared in an APK

Tool

Description

intent_send

Send an intent with action, data URI, component, extras, and flags

broadcast_send

Send a broadcast intent

deeplink_test

Test a deep link URI on a connected device

SDK Management

Tool

Description

sdk_list

List installed or available SDK packages

sdk_install

Install SDK packages (platforms, system images, build tools)

MCP Resources

Beyond tools, the server exposes read-only MCP Resources for live device state, so a client can read this data directly without invoking a tool call:

Resource URI

Description

android://devices

Currently connected devices and emulators (adb devices -l)

android://avds

Available AVD names on this machine

android://logcat/{deviceId}

Last 200 lines of logcat for a specific device

android://uidump/{deviceId}

UI Automator XML hierarchy dump for a specific device

MCP Prompts

The server also ships ready-made MCP Prompts — pre-written, parameterized instructions that chain multiple tools into a common workflow. Editors with prompt support can surface these as slash commands or quick actions:

Prompt

Description

debug-crash

Reproduce, capture, and diagnose a crash for an installed app

setup-emulator

Install a system image and create/start an AVD

install-and-test-apk

Analyze, install, launch, and check logs for an APK

ui-inspect

Capture the UI hierarchy and a screenshot to locate elements

performance-check

Build release, inspect APK size, and watch runtime logs for perf issues

release-preflight

Clean build, lint, and analyze the APK before a release

Tool Annotations & Structured Output

Every tool is registered with a title and MCP tool annotations — readOnlyHint, destructiveHint, idempotentHint, and openWorldHint — so a client can tell at a glance whether a tool is safe to call automatically, destructive enough to confirm first, or interacts with something outside the local system (e.g. adb_wifi_connect, network SDK downloads).

Several tools also return structured, machine-readable output (outputSchema / structuredContent) in addition to their human-readable text response: device_list, avd_list, app_permissions_list, device_info, gradle_build, gradle_list_tasks, lint_run, and apk_permissions.

Progress, Cancellation & Confirmations

  • Progress notifications — long-running tools (gradle_build, emulator_start, sdk_install, screen_record) send MCP progress notifications while they work, so a client can show live status instead of a silent wait.

  • Cancellation — those same tools accept an AbortSignal from the client, so an in-flight build, emulator boot, SDK install, or recording can be cancelled cleanly.

  • Elicitation confirmations — destructive operations (app_clear_data, overwriting an existing AVD with avd_create, and the license auto-accept in sdk_install) ask for confirmation via MCP elicitation on clients that support it. On clients that don't support elicitation, the server falls back to proceeding without a prompt rather than failing.

Documentation

Full documentation with guides, tool reference, and a prompt cookbook is available at:

https://sitharaj88.github.io/android-pilot-mcp

Includes:

  • Step-by-step setup guides

  • Detailed tool reference for all 39 tools

  • MCP Resources and MCP Prompts reference

  • Prompt cookbook with 65+ copy-paste prompts

  • Real-world workflows (build, debug, deploy)

  • Architecture overview

Contributing

See CONTRIBUTING.md for development setup, coding standards, and pull request guidelines.

License

MIT License. See LICENSE for details.

Available Tools

39 tools
adb_wifi_connectConnect ADB over WiFiA
Idempotent

Connect to a device over WiFi ADB. Switches to TCP/IP mode, detects IP, and connects wirelessly

Inputs: port, deviceId.

adb_wifi_disconnectDisconnect ADB WiFiC
Idempotent

Disconnect a WiFi ADB connection

Inputs: address.

apk_analyzeAnalyze APKA
Read-onlyIdempotent

Analyze an APK file: size, version, SDK targets, DEX references, and optionally full file listing and manifest

Inputs: apkPath (required), detail.

apk_installInstall APKB

Install an APK file on a connected Android device or emulator

Inputs: apkPath (required), deviceId, reinstall, grantPermissions.

apk_permissionsAPK PermissionsB
Read-onlyIdempotent

List all permissions declared in an APK file

Inputs: apkPath (required). Returns: permissions

app_clear_dataClear App DataB
DestructiveIdempotent

Clear all data for an installed app (equivalent to clearing storage in settings)

Inputs: packageName (required), deviceId.

app_launchLaunch AppB
Idempotent

Launch an Android application on a connected device by package name

Inputs: packageName (required), deviceId, activityName.

app_permissionSet App PermissionB
Idempotent

Grant or revoke a runtime permission for an app

Inputs: action (required), permission (required), packageName (required), deviceId.

app_permissions_listList App PermissionsA
Read-onlyIdempotent

List all permissions for an installed app, showing which are granted and which are denied

Inputs: packageName (required), deviceId. Returns: permissions

app_stopStop AppB
Idempotent

Force stop an application on a connected Android device

Inputs: packageName (required), deviceId.

avd_createCreate AVDC
Destructive

Create a new Android Virtual Device (AVD) with specified configuration

Inputs: name (required), package (required), force, device.

avd_listList AVDsA
Read-onlyIdempotent

List all available Android Virtual Devices (AVDs)

Inputs: no named parameters. Returns: avds

broadcast_sendSend BroadcastC
Destructive

Send an Android broadcast intent

Inputs: action (required), extras, deviceId, component.

device_infoGet Device InfoA
Read-onlyIdempotent

Get detailed information about a connected Android device including model, OS version, screen density, and more

Inputs: deviceId. Returns: model, cpuAbi, buildId, hardware, +8 more

device_listList DevicesA
Read-onlyIdempotent

List all connected Android devices and running emulators with their status

Inputs: no named parameters. Returns: devices

device_screenshotCapture ScreenshotB
Read-onlyIdempotent

Capture a screenshot from a connected Android device and return it as a base64-encoded PNG

Inputs: deviceId, savePath.

device_shellRun Shell CommandC
Destructive

Execute an arbitrary ADB shell command on a connected Android device. Use with caution

Inputs: command (required), deviceId.

emulator_startStart EmulatorA
Destructive

Start an Android emulator by AVD name. Returns once the device has booted or after timeout

Inputs: avdName (required), coldBoot, noWindow, wipeData.

emulator_stopStop EmulatorC
Idempotent

Stop a running Android emulator

Inputs: deviceId (required).

file_pullPull FileB
DestructiveIdempotent

Pull a file from a connected Android device to the local machine

Inputs: localPath (required), remotePath (required), deviceId.

file_pushPush FileC
DestructiveIdempotent

Push a local file to a connected Android device

Inputs: localPath (required), remotePath (required), deviceId.

gradle_buildRun Gradle BuildC
Idempotent

Run a Gradle build for an Android project. Supports debug/release variants and optional module targeting

Inputs: projectDir (required), module, variant, stacktrace. Returns: success, exitCode, truncated

gradle_cleanClean Gradle BuildB
DestructiveIdempotent

Clean the build output of an Android project

Inputs: projectDir (required).

gradle_dependenciesShow Gradle DependenciesC
Read-onlyIdempotent

Show the dependency tree for an Android project module

Inputs: projectDir (required), module, configuration.

gradle_list_tasksList Gradle TasksB
Read-onlyIdempotent

List all available Gradle tasks in an Android project

Inputs: projectDir (required), module. Returns: tasks

gradle_taskRun Gradle TaskC
Destructive

Run an arbitrary Gradle task in an Android project

Inputs: task (required), projectDir (required), args.

intent_sendSend IntentC
Destructive

Send an Android intent to start an activity with optional action, data URI, component, and extras

Inputs: action (required), data, flags, extras, +2 more.

lint_runRun Android LintA
Idempotent

Run Android Lint analysis on a project and return warnings, errors, and suggestions with file locations

Inputs: projectDir (required), fatal, module. Returns: success, exitCode

logcat_clearClear LogcatB
DestructiveIdempotent

Clear the logcat buffer on a connected Android device

Inputs: deviceId.

logcat_readRead LogcatC
Read-onlyIdempotent

Read Android logcat output with optional filtering by tag, priority level, or search string

Inputs: tag, grep, lines, since, +2 more.

project_createCreate ProjectB

Create a new Android project with Kotlin and Gradle KTS, optionally with Jetpack Compose

Inputs: parentDir (required), packageName (required), projectName (required), minSdk, +4 more.

scaffold_activityScaffold ActivityB

Generate a new Activity Kotlin file from a template and add it to an existing Android project

Inputs: projectDir (required), packageName (required), activityName (required), layout, +1 more.

scaffold_compose_screenScaffold Compose ScreenA

Generate a new Jetpack Compose screen file with a composable function and preview

Inputs: projectDir (required), screenName (required), packageName (required), module, +1 more.

scaffold_fragmentScaffold FragmentB

Generate a new Fragment Kotlin file from a template

Inputs: projectDir (required), packageName (required), fragmentName (required), layout, +1 more.

screen_recordRecord ScreenB

Record the device screen as an MP4 video and save it locally

Inputs: savePath (required), deviceId, duration.

sdk_installInstall SDK PackagesC
Idempotent

Install Android SDK packages (system images, build tools, platforms, etc.)

Inputs: packages (required).

sdk_listList SDK PackagesA
Read-onlyIdempotent

List installed or available Android SDK packages, system images, and build tools

Inputs: installed.

ui_dumpDump UI HierarchyA
Read-onlyIdempotent

Dump the current screen's UI hierarchy (view tree) as XML using UI Automator. Useful for understanding what's displayed on screen

Inputs: deviceId, compressed.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 39 tools

    Disambiguation4/5

    Tools are mostly distinct across device, app, Gradle, emulator, APK, and project domains. A few intentional overlaps exist: gradle_build/gradle_clean versus gradle_task, deeplink_test versus intent_send, and device_shell as a catch-all; descriptions make boundaries clear, but an agent could still choose the generic task runner over specialized tools.

    Naming Consistency5/5

    Names follow a predictable noun-first resource_action pattern throughout, such as device_list, app_stop, apk_install, and gradle_build. Minor singular/plural differences like app_permission versus app_permissions_list are readable and consistent, with no mixed camelCase or vague verbs.

    Tool Count2/5

    39 tools is well above the typical 3-15 well-scoped range. Although the server covers many Android subdomains, the count is heavy and forces an agent to sift through a large surface with some near-overlapping options.

    Completeness4/5

    The surface covers a broad Android lifecycle: devices/emulators, app install/launch/stop/permissions/data, logcat, Gradle, lint, APK analysis, scaffolding, intents, and SDK packages. Notable gaps include app uninstall/package listing and direct UI interaction such as tap/swipe/text, though device_shell can work around most of these.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that enables AI assistants to build, test, and debug Android applications by interacting directly with the Android development environment. It provides tools for managing emulators, executing Gradle tasks, running ADB commands, and performing UI automation via accessibility trees.
      14
      126 npm
      21
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      A comprehensive MCP server that enables AI agents to interact with Android devices through Android Debug Bridge (ADB), offering 198 tools for device control, app management, diagnostics, and more.
      209
      24
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that wraps Android ADB functionality into AI assistant tools, enabling device management, shell execution, file operations, app management, media capture, and log analysis via natural language.
      3
      MIT