Androidbuild Mcp

io.github.dev-jacksonPublished by GitHub account dev-jacksonv0.1.1Updated Oct 24, 2026

Build, deploy, drive and debug Android apps: Gradle, emulators, adb, logcat, UI automation

VerifiedSTDIODesktop onlyBrowser AutomationDeveloper Tools

Overview

AI-generated overview

A local MCP server that lets an AI assistant build, deploy, drive and debug Android apps through Gradle, emulators, adb, logcat and UI automation.

What you can do
Check the environment and inspect projects: doctor, project/module/variant discovery, app id and Gradle config, plus session defaults for project, module, variant and device. Build, test and check quality: APK builds with compact compiler errors, build-install-launch, unit and instrumented tests, lint, clean, coverage reports. Manage devices and emulators: list devices and AVDs, create, boot, wipe and kill emulators, set GPS location and appearance. Control app lifecycle: install, launch, stop, uninstall, clear data and read app info. Automate the UI: UI snapshots with tap coordinates, screenshots with optional annotation, tap, scroll, swipe, drag, long-press, typing, key presses and waiting
When to use it
Useful when an assistant should work on a real Android project end to end: compiling and fixing build errors, running tests, launching an app on an emulator or device, reproducing a bug through UI automation, or capturing logs, screenshots and screen recordings.
Requirements
Runs locally over stdio via npx (Node 18+). Needs the Android SDK (ANDROID_HOME or a default install), a JDK 17+ for Gradle builds, and adb/emulator tooling; an emulator or connected device is needed for deployment and UI work. Optional: Google's Android CLI for annotated screenshots and the ADBKeyboard IME for non-ASCII typing.
Before you install
Tools write to your machine and devices: they build, install, uninstall, clear app data, create and delete emulators, and send taps and keystrokes. Screen recording and log capture store files locally. Run it only against projects and devices you are willing to modify.

Installation

In SourceWeft

  1. Open Androidbuild Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

AndroidBuildMCP

[npm] [license]

Give your AI agent hands on Android. AndroidBuildMCP is an MCP server that lets any MCP client (Claude Code, Cursor, ...) build, deploy, drive and debug real Android apps: Gradle builds with readable errors, emulator management, adb deployment, logcat capture and full UI automation.

Quick start

Requirements: Node 18+, the Android SDK (ANDROID_HOME or a default install), and a JDK 17+ for Gradle builds.

No install step — npx fetches the server on first run.

Claude Code

bash
claude mcp add androidbuild -- npx -y @asjackson/androidbuild-mcp

Any other MCP client

json
{  "mcpServers": {    "androidbuild": {      "command": "npx",      "args": ["-y", "@asjackson/androidbuild-mcp"]    }  }}
Run from source instead
bash
git clone https://github.com/dev-jackson/androidbuild-mcp.gitcd androidbuild-mcpnpm install && npm run buildclaude mcp add androidbuild -- node /absolute/path/to/androidbuild-mcp/dist/index.js

Then ask your agent to run doctor — it checks the SDK, adb, emulator, Java and connected devices, and tells you exactly what is missing.

What your agent can do

  • Build and test — build_app compiles and returns compact file:line compiler errors instead of a thousand lines of Gradle noise. test_app / test_instrumented return parsed pass/fail summaries. Lint, clean, coverage (Kover/Jacoco) included.
  • Manage emulators — list, create, boot (waits for full boot, returns the serial), wipe, and kill AVDs. Set GPS location, dark mode, and a clean demo status bar for screenshots.
  • Deploy — build_run compiles, installs and launches in one call. Install/uninstall/clear-data/app-info via adb, with the right device auto-selected when only one is connected.
  • See the screen — snapshot_ui returns the UI as a compact list of named elements with tap coordinates (Compose semantics merged, noise filtered). screenshot returns an image; with annotate: true it draws numbered boxes using vision, catching text inside images and WebViews.
  • Touch the screen — tap, scroll, swipe, drag, long-press, type (keyboard-aware, with clear/submit), hardware keys, and wait_for_ui to poll until an element appears.
  • Read the logs — background logcat capture filtered to your app, one-shot dumps, and the crash buffer for stack traces.
  • Start new apps — scaffold_android_project generates a minimal Compose project that builds out of the box.

Session defaults (session_set_defaults) mean you configure project, module, variant and device once — every other call then works without arguments.

Tool reference

53 tools over stdio. Every tool takes plain arguments and returns text (or an image, for screenshot).

Environment and project

ToolDescription
doctorCheck SDK, adb, emulator, avdmanager, Java and connected devices; reports what is missing
discover_projectsFind Android/Gradle projects under a path
list_modulesList modules declared in settings.gradle(.kts)
list_variantsList build variants of a module
get_app_idRead the applicationId of a module
show_gradle_configShow Gradle, AGP, Kotlin and version-catalog entries

Session defaults

ToolDescription
session_set_defaultsSet default project, module, variant, serial and appId for all later calls
session_show_defaultsShow the current defaults
session_clear_defaultsClear all defaults, or only the listed keys

Build, test and quality

ToolDescription
build_appBuild an APK; returns compact file:line compiler errors
build_runBuild, install and launch in one call
test_appRun JVM unit tests with a parsed pass/fail summary
test_instrumentedRun instrumented tests on a device
lintRun Android Lint and summarize the report
cleanRun gradle clean
get_apk_pathLocate the most recent APK without building
stop_gradleStop the project's Gradle daemons
get_coverage_reportRun Kover/Jacoco and summarize line coverage per package
get_file_coverageShow covered/uncovered lines of one source file

Devices and emulators

ToolDescription
list_devicesList devices with serial, state, model, Android version, API level
list_avdsList AVDs and which are running
boot_emulatorBoot an AVD and wait for full boot; returns the serial
kill_emulatorShut down a running emulator
create_avdCreate an AVD from an installed system image
delete_avdDelete an AVD
set_emulator_locationSet GPS location
set_appearanceSwitch dark/light mode
statusbar_demo_modeClean status bar for screenshots

App lifecycle

ToolDescription
install_appInstall an APK (adb install -r)
launch_appLaunch by application id, resolving the launcher activity
stop_appForce-stop a running app
uninstall_appUninstall an app
clear_app_dataReset an app to fresh-install state
get_app_infoVersion, target/min SDK, install path, running PID

UI automation

ToolDescription
snapshot_uiDump the UI as named elements with exact tap coordinates
screenshotCapture the screen; annotate: true draws numbered boxes
tap_elementTap element #N from the last annotated screenshot
tapTap at pixels or screen percentages
scrollScroll in a direction with a safe computed swipe
swipeSwipe between two points
dragDrag from one point to another
long_pressLong-press, holding 1000 ms
type_textType into the focused field, waiting for the keyboard
key_pressPress BACK, HOME, ENTER, DPAD_*, or any keycode
key_sequencePress several keys in order
wait_for_uiPoll until an element appears

Logs and recording

ToolDescription
get_logsOne-shot logcat dump, filterable by app and tag
get_crash_logsCrash buffer: Java exceptions, native crashes, ANRs
start_log_captureStart background logcat capture to a file
stop_log_captureStop capture and return the file plus the last lines
record_video_startStart screen recording (max 3 minutes)
record_video_stopStop recording and pull the MP4

Scaffolding

ToolDescription
scaffold_android_projectCreate a minimal Compose app that builds out of the box

Tapping accurately

Everything adb-side shares one coordinate space (device pixels), but MCP clients often display screenshots scaled — estimating pixel positions by eye from the image sends taps to the wrong place. Three safe ways to hit the target:

  1. snapshot_ui — returns exact device-pixel centers for every named element. Preferred.
  2. screenshot { annotate: true } + tap_element { element: N } — tap by the number drawn on the image; the mapping is resolved on the original PNG, so client-side scaling cannot distort it.
  3. tap { xPct, yPct } — screen percentages (0-1), also available on long_press/swipe/drag. Resolution-independent.

Raw tap { x, y } still works when you have real pixel coordinates.

Reliability

Every tool was exercised against real emulators and real projects — happy paths and corner cases — before release; the scenario-by-scenario evidence is in qa-results.md. Some of the details that keep agent flows from misfiring:

  • type_text waits for the soft keyboard before injecting (typing right after focusing a field silently drops the first characters otherwise).
  • scroll computes a long, slow swipe from the screen size — short fast swipes get ignored by some lists. long_press holds 1000 ms, which launchers require.
  • Taps outside the screen are rejected with the actual screen size instead of silently doing nothing.
  • Text-heavy screens (e-book WebViews and the like) are capped and searchable with snapshot_ui { filter } instead of flooding the context.
  • Build/test/device failures come back as short, actionable messages with the next tool to call.

Optional extras

  • Google's Android CLI enables screenshot { annotate: true }. doctor prints the one-line installer for your OS.
  • The ADBKeyboard IME enables non-ASCII type_text (adb alone is ASCII-only). Install its APK once; the server uses it automatically.

Development

bash
npm installnpm test            # unit tests (no real processes spawned)npm run dev         # run the server from sourcenpm run build       # compile to dist/

License

MIT — see LICENSE.

Conceptually inspired by XcodeBuildMCP; independent implementation built around the Android toolchain.

Source: README.md at commit 98055b2

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts