PluginBench
MCP Server
Maintained
MIT

io.github.martingeidobler/android MCP Server

io.github.martingeidobler/android

Control Android devices and emulators via ADB with screenshots, UI automation, and logcat for AI-assisted testing and debugging.

What is the io.github.martingeidobler/android MCP server?

The Android MCP Server is an MCP server that gives AI assistants the ability to control Android emulators and physical devices via ADB. It provides 25 tools for taking screenshots, inspecting UI hierarchies, automating touch interactions, managing apps, and reading device logs—enabling AI-driven testing, debugging, and documentation without modifying the target app.

This server bridges AI assistants to Android devices, letting Claude or other AI agents see and interact with Android apps as if they were a human tester. You can automate UI testing, document bugs with screenshots and logs, verify app behavior across screens, and perform smoke testing—all without writing test code or modifying your app.

How to install io.github.martingeidobler/android

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • ANDROID_HOME

    Path to Android SDK (auto-detected on macOS at ~/Library/Android/sdk)

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "android": {
      "command": "npx",
      "args": [
        "-y",
        "android-mcp-server"
      ],
      "env": {
        "ANDROID_HOME": "<YOUR_ANDROID_HOME>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • list_devices — List connected Android devices and emulators
  • list_avds — List available Android Virtual Devices
  • start_emulator — Start an AVD by name (waits up to 60s)
  • screenshot — Take screenshot for visual analysis with optional save to disk
  • get_ui_tree — Get UI element hierarchy with bounds, text, resource IDs, and state
  • tap — Tap at screen coordinates
  • tap_element — Tap element by resource-id, text, or content-desc
  • tap_and_wait — Tap element, wait for UI to settle, return new UI tree in single round trip
  • long_press — Long press at coordinates for context menus or drag handles
  • double_tap — Double tap at coordinates
  • multi_tap — Tap the same coordinates N times with fixed interval
  • tap_sequence — Multi-step action chain: taps, waits, text input, key presses, swipes in any order
  • type_text — Type text into focused input
  • press_key — Press key (back, home, enter, tab, delete, menu, etc.)
  • swipe — Swipe gesture between coordinates
  • scroll_to_element — Scroll until element is visible
  • wait_for_element — Wait for element to appear with timeout
  • get_logs — Get logcat output, filterable by package, log level, and time
  • clear_logs — Clear logcat buffer
  • get_device_info — Get model, Android version, API level, screen size, DPI

Use cases

  • Automate UI testing by navigating through app screens and verifying behavior without writing test code
  • Document bugs by capturing screenshots and logs after reproducing issues
  • Perform smoke testing by installing an APK, launching the app, and tapping through main screens to check for crashes
  • Verify app UI against design mockups by comparing screenshots and UI hierarchies across different screens
  • Debug app behavior by inspecting logs, UI state, and element properties while interacting with the app

io.github.martingeidobler/android MCP server FAQ

What is the Android MCP Server?

It's an MCP server that lets AI assistants control Android devices and emulators via ADB, enabling automated testing, debugging, and UI interaction without modifying the target app.

Is it free?

Yes, the Android MCP Server is open-source under the MIT license and free to use.

How do I install it in Cursor?

Add to your Cursor MCP config (~/.cursor/mcp.json) with the command `npx -y android-mcp-server`, optionally setting ANDROID_HOME if your SDK is not in the default location.

How do I install it in Claude Desktop?

Add to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS) with the npx command and optional ANDROID_HOME environment variable.

What prerequisites do I need?

Node.js 18+, Android SDK with platform-tools (ADB), and a running Android emulator or connected device.

Do I need to modify my app to use this server?

No, the server works with any Android app via ADB without requiring any SDK integration or app modifications.

README (reference)

Source of truth, from the repository.

Android MCP Server

npm version npm downloads License: MIT android-mcp-server MCP server Awesome MCP Servers SocketBadge

MCP server for controlling Android emulators and devices via ADB. Gives AI assistants the ability to see, interact with, and debug Android apps — taking screenshots, tapping elements, reading logs, and documenting bugs.

npm Package | GitHub | Issues

ezgif-3bbb68e918812643 ^ Sped up for better viewing. More demos and test cases.

Features

  • 25 tools for complete Android device control
  • Screenshot capture with intelligent compression (Sharp-based, max 1280px)
  • UI tree inspection — read element hierarchy with bounds, text, resource IDs, and state
  • Touch automation — tap, swipe, scroll, type text, press hardware keys
  • Element targeting — find and tap elements by resource-id, text, or content-desc
  • App lifecycle — install APKs, launch apps, inspect current activity
  • Logcat integration — filter by package, log level, or timestamp
  • Device management — list devices, start emulators, get device info
  • Compound actions — tap_and_wait combines tap + settle + UI tree in one round trip
  • Persistent ADB shell — reuses a single shell session for faster command execution
  • Device info caching — queries device properties once per session
  • Multi-device support — target specific devices by ID
  • Zero app modifications — works with any Android app via ADB, no SDK integration needed

Prerequisites

  • Node.js 18+
  • Android SDK with platform-tools (ADB) and emulator
  • A running Android emulator or connected device

Finding your ANDROID_HOME

The server auto-discovers the SDK at ~/Library/Android/sdk (macOS) or via ANDROID_HOME. If your SDK is elsewhere, set ANDROID_HOME in the MCP config (see below).

To check:

# macOS
ls ~/Library/Android/sdk/platform-tools/adb

# Or find it via Android Studio: Settings > Languages & Frameworks > Android SDK

Setup

<details> <summary><b>Claude Code</b></summary>
claude mcp add --scope user android -- npx -y android-mcp-server

This registers the server globally so it's available in all projects. Use --scope project instead to limit it to the current project.

If your SDK is not in the default location:

claude mcp add --scope user --env ANDROID_HOME=/path/to/sdk android -- npx -y android-mcp-server
</details> <details> <summary><b>Claude Desktop</b></summary>

Add to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "android": {
      "command": "npx",
      "args": ["-y", "android-mcp-server"],
      "env": {
        "ANDROID_HOME": "/path/to/android/sdk"
      }
    }
  }
}
</details> <details> <summary><b>VS Code</b></summary>

Add to your VS Code settings (.vscode/settings.json):

{
  "mcp": {
    "servers": {
      "android": {
        "command": "npx",
        "args": ["-y", "android-mcp-server"],
        "env": {
          "ANDROID_HOME": "/path/to/android/sdk"
        }
      }
    }
  }
}
</details> <details> <summary><b>Cursor</b></summary>

Add to your Cursor MCP config (~/.cursor/mcp.json):

{
  "mcpServers": {
    "android": {
      "command": "npx",
      "args": ["-y", "android-mcp-server"],
      "env": {
        "ANDROID_HOME": "/path/to/android/sdk"
      }
    }
  }
}
</details> <details> <summary><b>Windsurf</b></summary>

Add to your Windsurf MCP config (~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "android": {
      "command": "npx",
      "args": ["-y", "android-mcp-server"],
      "env": {
        "ANDROID_HOME": "/path/to/android/sdk"
      }
    }
  }
}
</details> <details> <summary><b>Project config (.mcp.json)</b></summary>

Add to your project's .mcp.json (checked into version control so your team gets it too):

{
  "mcpServers": {
    "android": {
      "command": "npx",
      "args": ["-y", "android-mcp-server"],
      "env": {
        "ANDROID_HOME": "/path/to/android/sdk"
      }
    }
  }
}
</details> <details> <summary><b>Build from source</b></summary>
git clone https://github.com/martingeidobler/android-mcp-server.git
cd android-mcp-server
npm install
npm run build
claude mcp add --scope user android -- node /path/to/android-mcp-server/dist/index.js
</details>

Available Tools

Device Management

ToolDescription
list_devicesList connected Android devices and emulators
list_avdsList available Android Virtual Devices
start_emulatorStart an AVD by name (waits up to 60s)

Screenshot & UI Analysis

ToolDescription
screenshotTake screenshot for visual analysis. Optional save_path to save to disk
get_ui_treeGet UI element hierarchy with bounds, text, resource IDs, and state

Interaction

ToolDescription
tapTap at screen coordinates
tap_elementTap element by resource-id, text, or content-desc
tap_and_waitTap element, wait for UI to settle, return new UI tree — single round trip
long_pressLong press at coordinates (context menus, drag handles)
double_tapDouble tap at coordinates
multi_tapTap the same coordinates N times with a fixed interval (spam tapping)
tap_sequenceMulti-step action chain: taps, waits, text input, key presses, swipes in any order
type_textType text into focused input
press_keyPress key (back, home, enter, tab, delete, menu, etc.)
swipeSwipe gesture between coordinates
scroll_to_elementScroll until element is visible
wait_for_elementWait for element to appear (with timeout)

Diagnostics

ToolDescription
get_logsGet logcat output, filterable by package, log level, and time
clear_logsClear logcat buffer (call before reproducing a bug for clean output)
get_device_infoGet model, Android version, API level, screen size, DPI

App Management

ToolDescription
launch_appLaunch app by package name
install_apkInstall APK file
get_current_activityGet foreground app and activity
pull_filePull a file from the device to local filesystem
adb_shellRun arbitrary ADB shell command

Example Workflows

Bug documentation

<!-- TODO: Add GIF demo -->

"Clear the logs, open the settings screen, tap the save button, then show me the logs and a screenshot"

Claude will: clear_logs → launch_app → tap_element → get_logs(package_name="com.example.app", level="E") → screenshot(save_path="./bugs/settings-crash.png")

UI testing

<!-- TODO: Add GIF demo -->

"Navigate through the login flow and verify each screen matches the designs"

Claude will use screenshot + get_ui_tree to see and understand each screen, tap_element/type_text to interact, and its vision capabilities to compare against mockups or descriptions.

Smoke testing

<!-- TODO: Add GIF demo -->

"Install the APK, launch the app, and tap through the main screens to check nothing crashes"

Claude will: install_apk → launch_app → navigate with tap_element → get_logs(level="E") to check for errors after each screen.

Element interaction

<!-- TODO: Add GIF demo -->

"Open Settings, search for 'display', tap the first result, then go back"

Claude will: launch_app(package_name="com.android.settings") → tap_and_wait(by="text", value="Search settings") → type_text("display") → tap_and_wait(by="text", value="Display") → press_key(key="back")

Demos & Prompting Guide

  • DEMOS.md — copy-paste prompt scenarios you can try right now
  • PROMPTING.md — best practices, performance tips, and common pitfalls

How It Works

The server communicates over stdio using the Model Context Protocol. All device interaction goes through ADB — no modifications to your app are required. Screenshots are captured in memory, compressed, and returned as base64 images that the AI can see and analyze visually.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT - see LICENSE.

Related MCP servers

EU Horizon Europe grant & consortium partner intelligence over 27k+ CORDIS projects, 59k orgs.

MCP server for querying PostgreSQL databases

Connect AI agents to Marvenn for outbound growth via email, voice, and LinkedIn.

View repository →

Turn your AI coding IDE into a design engineer with design systems, UI principles, and accessibility review.

249
TypeScript
MIT
View repository →

Verified cloud cost forecasting for AI agents. AWS, GCP, Azure pricing matrix.

0
TypeScript
View repository →
OPOpenClaw FinOps logo

OpenClaw FinOps

Maintained

Verified cloud cost forecasting for AI agents. AWS, GCP, Azure pricing matrix.

0
TypeScript
View repository →