Android Pilot MCP
Full control over Android development: builds and runs Android projects with Gradle, creates Compose/XML projects and scaffolds activities, fragments and Compose screens, manages emulators and AVDs, installs APKs, launches/stops/clears apps and grants or revokes runtime permissions, reads logcat, takes screenshots and screen recordings, dumps the UI hierarchy, runs adb shell commands, pushes/pulls files, inspects APKs and their permissions, sends intents/broadcasts and tests deep links, and lists or installs SDK packages and system images.
Drives Gradle for Android projects: runs debug/release builds with optional module targeting, executes arbitrary Gradle tasks (test, lint, bundle, connectedAndroidTest), lists available tasks, cleans build output, and prints the dependency tree for a module.
Click on "Deploy 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 Pilot MCP Build my Android project and launch it on the connected emulator"
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 Pilot MCP
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.
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-mcpOr install globally
npm install -g android-pilot-mcpPrerequisites
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 |
| Run debug/release builds with optional module targeting |
| Run any Gradle task (test, lint, bundle, connectedAndroidTest, etc.) |
| List all available Gradle tasks |
| Clean build output |
| Show the dependency tree for a module |
| Run Android Lint — returns warnings, errors, and suggestions with file locations |
Device Management
Tool | Description |
| List connected devices and running emulators |
| List available AVDs |
| Create a new AVD with system image and device profile |
| Start an emulator (cold boot, headless, wipe data options) |
| Stop a running emulator |
| Install an APK on a device |
| Launch an app by package name |
| Force stop a running app |
| Clear all app data (equivalent to Clear Storage) |
| Grant or revoke a runtime permission |
| List all permissions with granted/denied status |
| Switch to WiFi ADB |
| Disconnect WiFi ADB |
| Push a file to the device |
| Pull a file from the device |
Debugging
Tool | Description |
| Read logcat with tag, priority, time, and text filters |
| Clear the logcat buffer |
| Capture a screenshot as PNG |
| Get device model, OS version, screen density, and more |
| Execute an ADB shell command |
| Dump UI hierarchy as XML via UI Automator |
| Record the screen as MP4 (duration is clamped to 1-180 seconds) |
Scaffolding
Tool | Description |
| Create a new Android project with Kotlin + Gradle KTS (Compose or XML) |
| Generate an Activity with optional XML layout |
| Generate a Fragment with optional XML layout |
| Generate a Compose screen with preview and optional ViewModel |
APK Analysis
Tool | Description |
| Inspect size, version, SDK targets, DEX references, manifest |
| List all permissions declared in an APK |
Intents & Deep Links
Tool | Description |
| Send an intent with action, data URI, component, extras, and flags |
| Send a broadcast intent |
| Test a deep link URI on a connected device |
SDK Management
Tool | Description |
| List installed or available SDK packages |
| 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 |
| Currently connected devices and emulators ( |
| Available AVD names on this machine |
| Last 200 lines of logcat for a specific device |
| 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 |
| Reproduce, capture, and diagnose a crash for an installed app |
| Install a system image and create/start an AVD |
| Analyze, install, launch, and check logs for an APK |
| Capture the UI hierarchy and a screenshot to locate elements |
| Build release, inspect APK size, and watch runtime logs for perf issues |
| 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
AbortSignalfrom 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 withavd_create, and the license auto-accept insdk_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 toolsadb_wifi_connectConnect ADB over WiFiAIdempotent
Connect to a device over WiFi ADB. Switches to TCP/IP mode, detects IP, and connects wirelessly
Inputs: port, deviceId.
adb_wifi_disconnectDisconnect ADB WiFiCIdempotent
Disconnect a WiFi ADB connection
Inputs: address.
apk_analyzeAnalyze APKARead-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 PermissionsBRead-onlyIdempotent
List all permissions declared in an APK file
Inputs: apkPath (required). Returns: permissions
app_clear_dataClear App DataBDestructiveIdempotent
Clear all data for an installed app (equivalent to clearing storage in settings)
Inputs: packageName (required), deviceId.
app_launchLaunch AppBIdempotent
Launch an Android application on a connected device by package name
Inputs: packageName (required), deviceId, activityName.
app_permissionSet App PermissionBIdempotent
Grant or revoke a runtime permission for an app
Inputs: action (required), permission (required), packageName (required), deviceId.
app_permissions_listList App PermissionsARead-onlyIdempotent
List all permissions for an installed app, showing which are granted and which are denied
Inputs: packageName (required), deviceId. Returns: permissions
app_stopStop AppBIdempotent
Force stop an application on a connected Android device
Inputs: packageName (required), deviceId.
avd_createCreate AVDCDestructive
Create a new Android Virtual Device (AVD) with specified configuration
Inputs: name (required), package (required), force, device.
avd_listList AVDsARead-onlyIdempotent
List all available Android Virtual Devices (AVDs)
Inputs: no named parameters. Returns: avds
broadcast_sendSend BroadcastCDestructive
Send an Android broadcast intent
Inputs: action (required), extras, deviceId, component.
deeplink_testTest Deep LinkBDestructive
Test a deep link URI on a connected Android device. Opens the URI with ACTION_VIEW
Inputs: uri (required), deviceId, packageName.
device_infoGet Device InfoARead-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 DevicesARead-onlyIdempotent
List all connected Android devices and running emulators with their status
Inputs: no named parameters. Returns: devices
device_screenshotCapture ScreenshotBRead-onlyIdempotent
Capture a screenshot from a connected Android device and return it as a base64-encoded PNG
Inputs: deviceId, savePath.
device_shellRun Shell CommandCDestructive
Execute an arbitrary ADB shell command on a connected Android device. Use with caution
Inputs: command (required), deviceId.
emulator_startStart EmulatorADestructive
Start an Android emulator by AVD name. Returns once the device has booted or after timeout
Inputs: avdName (required), coldBoot, noWindow, wipeData.
emulator_stopStop EmulatorCIdempotent
Stop a running Android emulator
Inputs: deviceId (required).
file_pullPull FileBDestructiveIdempotent
Pull a file from a connected Android device to the local machine
Inputs: localPath (required), remotePath (required), deviceId.
file_pushPush FileCDestructiveIdempotent
Push a local file to a connected Android device
Inputs: localPath (required), remotePath (required), deviceId.
gradle_buildRun Gradle BuildCIdempotent
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 BuildBDestructiveIdempotent
Clean the build output of an Android project
Inputs: projectDir (required).
gradle_dependenciesShow Gradle DependenciesCRead-onlyIdempotent
Show the dependency tree for an Android project module
Inputs: projectDir (required), module, configuration.
gradle_list_tasksList Gradle TasksBRead-onlyIdempotent
List all available Gradle tasks in an Android project
Inputs: projectDir (required), module. Returns: tasks
gradle_taskRun Gradle TaskCDestructive
Run an arbitrary Gradle task in an Android project
Inputs: task (required), projectDir (required), args.
intent_sendSend IntentCDestructive
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 LintAIdempotent
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 LogcatBDestructiveIdempotent
Clear the logcat buffer on a connected Android device
Inputs: deviceId.
logcat_readRead LogcatCRead-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 PackagesCIdempotent
Install Android SDK packages (system images, build tools, platforms, etc.)
Inputs: packages (required).
sdk_listList SDK PackagesARead-onlyIdempotent
List installed or available Android SDK packages, system images, and build tools
Inputs: installed.
ui_dumpDump UI HierarchyARead-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
Scored across 39 tools
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.
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.
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.
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
Related MCP Connectors
Remote MCP server to control your Android phone from AI assistants with per-app permissions.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseBqualityDmaintenanceAn 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.14126 npm21MIT
- AlicenseBqualityBmaintenanceA 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.20924Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn 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.3MIT
- FlicenseAqualityDmaintenanceAn MCP server designed for Android development, enabling AI assistants to directly control Android devices for screenshots, UI analysis, app management, and more.19-