@tanguito/android-dev-mcp
v1.2.0
Published
Generic Android automation and inspection MCP server powered by ADB.
Maintainers
Readme
Android Dev MCP
Generic Android MCP server for automation, inspection and debugging over ADB.
android-dev-mcp is a reusable MCP stdio server for Android development. It is designed for any Android app profile: internal apps, sample apps, games, QA builds, debug builds, and local experiments. It uses standard ADB only.
What can this MCP do?
- Launch and stop Android apps.
- Inspect UI with
uiautomatorXML dumps. - Find and tap UI nodes by text or resource id.
- Capture screenshots and short videos.
- Read and clear logcat.
- Install APKs.
- Run ADB shell commands.
- Send app-defined debug intents.
- Generate debugging reports.
- Run reusable workflows.
Features
- Device management with optional
deviceId. - App profiles in
config/apps.json. - Launch, force stop, APK install, shell commands, tap, swipe, and text input.
- Screenshots, UI dumps, video recording, logcat, state captures, and report bundles.
- UI search by text, resource id, class, package, clickable, and enabled state.
- Tap automation by UI node, visible text, or resource id.
- Wait-for-UI polling with failure reports.
- Debug broadcast intents configured per app.
- Declarative per-app workflows with execution reports.
- Copyable templates for common profile styles.
Installation
Requirements:
- Node.js 20 or newer.
- Android SDK Platform Tools installed with
adbinPATH. - USB debugging enabled and authorized on the device/emulator.
npm install
npm run buildRun locally:
npm run devUseful scripts:
npm run typecheck
npm run clean
npm run doctornpm Installation
Install from npm:
npm install -g @tanguito/android-dev-mcp
android-dev-mcpOne-off usage:
npx @tanguito/android-dev-mcpBoth forms require Android SDK Platform Tools and adb in PATH, plus an authorized Android device or emulator.
npm package: @tanguito/android-dev-mcp
5 Minute Setup
- Install Android SDK Platform Tools.
- Enable USB debugging on your Android device.
- Connect the phone and accept the authorization prompt.
- Confirm ADB:
adb devices- Install and build:
npm install
npm run build- Run the doctor:
npm run doctor- Configure your MCP client:
{
"mcpServers": {
"android-dev-mcp": {
"command": "node",
"args": ["C:/path/to/android-dev-mcp/dist/index.js"]
}
}
}- Run a first workflow:
{ "app": "system", "workflow": "systemUiSmoke", "deviceId": "SERIAL" }See MCP Client Setup and Troubleshooting.
Quick Start
Confirm ADB:
adb devicesAdd your app to config/apps.json:
{
"apps": {
"myapp": {
"package": "com.example.myapp",
"activity": ".MainActivity",
"logTags": ["MyApp"]
}
}
}Example MCP calls:
{ "app": "myapp", "deviceId": "SERIAL" }{ "resourceId": "com.example.myapp:id/play_button", "deviceId": "SERIAL" }{ "app": "myapp", "workflow": "appSmoke", "deviceId": "SERIAL" }Configuration
Profiles live in config/apps.json. The default config includes generic examples:
sampleApp: standard app profile with reusable workflows.demoDebugApp: debug intents and logcat tags.system: Android Settings smoke workflow.soundbend: example profile only.
For a clean starting point, copy one of:
templates/apps.basic.jsontemplates/apps.with-logcat.jsontemplates/apps.with-debug-intents.jsontemplates/apps.with-workflows.json
More detail: Add Your Android App.
When installed globally, the bundled example config is used if the current working directory does not contain config/apps.json. Add a project-local config/apps.json to override the bundled examples.
Tools
Core ADB:
adb_devicesandroid_launch_appandroid_force_stop_appandroid_install_apkandroid_run_shellandroid_tapandroid_swipeandroid_input_text
Inspection:
android_clear_logcatandroid_read_logcatandroid_screenshotandroid_ui_dumpandroid_capture_stateandroid_record_videoandroid_generate_report
UI automation:
android_find_uiandroid_tap_uiandroid_tap_textandroid_tap_resourceandroid_wait_for_ui
Project automation:
android_send_debug_intentandroid_run_workflow
Device control:
android_device_infoandroid_set_volumeandroid_clear_app_dataandroid_manage_permissionsandroid_set_bluetooth
App lifecycle:
android_list_packagesandroid_current_appandroid_app_infoandroid_open_app_settingsandroid_uninstall_appandroid_start_activityandroid_send_intent
Session capture:
android_start_sessionandroid_session_stepandroid_stop_sessionandroid_list_sessionsandroid_get_session_reportandroid_run_workflownow supportssession: truefor automatic evidence capture
Workflows
Workflows are linear JSON sequences. They do not support loops, conditions, dynamic code, or eval.
Generic examples included in profiles/templates:
appSmokelaunchAndCaptureuiSnapshotlogcatSnapshotinstallAndLaunchdebugCapture
Run:
{ "app": "sampleApp", "workflow": "appSmoke", "deviceId": "SERIAL" }Workflow runs write workflow-reports/TIMESTAMP-app-workflow/.
More detail: Workflows.
Stability & Compatibility
The MCP API contract is documented in API Contract, with version rules in Versioning.
- Node.js: 20 or newer, CI uses Node 22.
- Transport: MCP stdio.
- Runtime dependency: Android SDK Platform Tools with
adbinPATH. - Android validation: physical Android 15 device plus generic ADB workflows.
- Compatibility: existing tool names and common inputs like
app,deviceId, andoutputPathare treated as stable. - Tests: minimal
node:testcoverage for parsing, profiles, workflows, validation helpers, and activity parsing.
MCP Client Configuration
See MCP Client Setup for Claude Desktop, Cursor, OpenCode, and generic MCP stdio clients.
Local stdio shape:
{
"mcpServers": {
"android-dev-mcp": {
"command": "node",
"args": ["/absolute/path/to/android-dev-mcp/dist/index.js"]
}
}
}Future installed binary shape:
{
"mcpServers": {
"android-dev-mcp": {
"command": "android-dev-mcp",
"args": []
}
}
}Debug Intents
Debug intents are optional broadcast actions implemented by your app and configured in the profile.
{
"debugIntents": {
"dumpState": "com.example.myapp.DEBUG_DUMP_STATE"
}
}More detail and Kotlin/Java examples: Debug Intents.
Real Device Validation
Validated on a physical Android device:
- Model:
23129RA5FL - Android version:
15 - Android SDK:
35
Validated capabilities include device listing, app launch, screenshots, logcat, UI dumps, UI search, tap automation, debug intents, reports, video recording, package installation checks, and workflows.
Example Images
UI dump example:
MCP config example:
Example Profiles
SoundBend remains in config/apps.json as an example profile only. It demonstrates log tags, debug intents, and workflows, but the MCP server contains no SoundBend-specific logic.
Project Structure
config/apps.json Active app profiles
config/apps.example.json Profile examples
templates/ Copyable app profile templates
docs/ Setup and usage guides
src/adb.ts Central ADB wrapper
src/appProfiles.ts Profile loader
src/uiParser.ts Minimal uiautomator XML parser
src/workflows.ts Simple workflow runner
src/tools/ MCP tool registrationsGenerated artifacts are ignored by Git:
screenshots/ui-dumps/captures/recordings/reports/failure-reports/workflow-reports/
Privacy & Security
- Local-only MCP stdio server.
- Uses standard ADB commands only.
- Does not send data to cloud services.
- No telemetry, analytics, tracking, or external API calls.
- Does not open HTTP ports, WebSocket ports, or background network daemons.
- Generated screenshots, dumps, recordings, reports, and workflow artifacts stay on your machine and are ignored by Git.
Roadmap
See ROADMAP.md.
Community
Limitations
- Not Appium.
- No OCR, OpenCV, or visual AI.
- No accessibility service.
- No HTTP server, WebSocket server, or daemon.
- Workflow runner is intentionally linear and simple.
- UI parsing is flat and based on
uiautomatorXML nodes.
License
MIT. See LICENSE.
