Android

io.github.martingeidobler由 GitHub 账号 martingeidobler 发布v1.2.1更新于 Oct 27, 2026

Control Android devices and emulators via ADB — screenshots, UI automation, and logcat.

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

通过 ADB 控制 Android 模拟器和真机,让助手截图、查看并点击界面元素、读取 logcat 日志。

可以做什么
  • 列出已连接设备和 AVD、启动模拟器、读取设备信息
  • 截取屏幕截图并读取界面元素层级
  • 点击、长按、双击、滑动、滚动、输入文字、按键,并按 resource-id、文本或 content-desc 定位元素
  • 读取和清空 logcat 日志,可按包名、日志级别和时间过滤
  • 安装 APK、启动应用、查看前台 Activity、拉取文件,并执行任意 ADB shell 命令
适用场景
适合在 UI 测试、冒烟测试和缺陷记录中操作 Android 应用,让助手看到界面、与之交互并结合日志分析问题。无需在应用中集成 SDK,适用于任意应用。
运行要求
通过 npx 在本地运行,需要 Node.js 18+、含 platform-tools(ADB)和模拟器的 Android SDK,以及正在运行的模拟器或已连接设备。SDK 路径在 macOS 上自动探测,否则通过环境变量 ANDROID_HOME 指定。
安装前请注意
助手会直接操作设备:安装 APK、启动应用、发送点击和文字输入、清空 logcat 缓冲区、把文件拉取到本地,并可执行任意 ADB shell 命令。建议只连接测试设备或模拟器,不要用于个人手机。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Android,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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:

bash
# macOSls ~/Library/Android/sdk/platform-tools/adb
# Or find it via Android Studio: Settings > Languages & Frameworks > Android SDK

Setup

Claude Code
bash
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:

bash
claude mcp add --scope user --env ANDROID_HOME=/path/to/sdk android -- npx -y android-mcp-server
Claude Desktop

Add to your Claude Desktop config file:

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

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

json
{  "mcp": {    "servers": {      "android": {        "command": "npx",        "args": ["-y", "android-mcp-server"],        "env": {          "ANDROID_HOME": "/path/to/android/sdk"        }      }    }  }}
Cursor

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

json
{  "mcpServers": {    "android": {      "command": "npx",      "args": ["-y", "android-mcp-server"],      "env": {        "ANDROID_HOME": "/path/to/android/sdk"      }    }  }}
Windsurf

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

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

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

json
{  "mcpServers": {    "android": {      "command": "npx",      "args": ["-y", "android-mcp-server"],      "env": {        "ANDROID_HOME": "/path/to/android/sdk"      }    }  }}
Build from source
bash
git clone https://github.com/martingeidobler/android-mcp-server.gitcd android-mcp-servernpm installnpm run buildclaude mcp add --scope user android -- node /path/to/android-mcp-server/dist/index.js

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

"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

"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

"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

"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.

来源:README.md,提交 15a4b90

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.2.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分