Android Puppeteer Mcp

io.github.pedro-rivas由 GitHub 账号 pedro-rivas 发布v1.0.1更新于 Oct 24, 2026

MCP server for Android automation with UI interaction, screenshots, and device control

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

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手检查和操控 Android 设备与模拟器:带标注的截图、点击、滑动、文字输入和录屏

可以做什么
列出已连接的 Android 设备和模拟器,获取屏幕尺寸以及可交互 UI 元素的详细信息,并在截图上叠加编号标注。按坐标点击、长按、滑动、滚动和拖拽,按硬件返回键,并向聚焦的输入框输入文字。开始和停止屏幕录制,保存为本地文件,用于文档或测试记录。多台设备连接时可按设备 ID 指定目标。
适用场景
适合需要助手操作真实 Android 手机或模拟器的场景,例如 UI 测试、应用走查或脚本化交互,以及需要会话截图或录屏留档时。
运行要求
以本地 Python 包运行(Python 3.10+),依赖 uiautomator2、ADB,以及开启 USB 调试的 Android 10+ 设备或模拟器;录屏需要 scrcpy。宿主机可为 Windows、macOS 或 Linux。未声明 API 密钥或环境变量。
安装前请注意
助手可以点击、输入、滑动和导航已连接的设备,可能改变应用状态或提交数据;截图和视频会写入本地目录。USB 调试会授予较广的设备控制权限,部分功能需要网络连接与设备通信。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-name: io.github.pedro-rivas/android-puppeteer-mcp


Android Puppeteer is a lightweight, visual-first MCP (Model Context Protocol) server that enables AI agents to interact with Android devices through intelligent UI element detection and automated interactions. Built on uiautomator2, it provides comprehensive Android automation capabilities including visual element detection, touch interactions, text input, and video recording.

🎥 Watch the demo in action

Features

  • Visual Element Detection Automatically detects and annotates interactive UI elements with numbered overlays for precise targeting.

  • Comprehensive Touch Interactions Support for tap, long press, swipe, scroll, and drag gestures with coordinate-based precision.

  • Multi-Device Support Connect to multiple Android devices or emulators simultaneously with device-specific targeting.

  • Video Recording Integration Built-in screen recording capabilities using scrcpy for documentation and testing workflows.

  • Real-Time UI Analysis Live UI hierarchy parsing and element information extraction for dynamic interaction strategies.

  • MCP Protocol Integration Seamless integration with Claude Desktop and other MCP-compatible AI platforms.

Supported Operating Systems

  • Android 10+
  • Windows, macOS, Linux (host systems)

Installation

Prerequisites

  • Python 3.10+
  • uiautomator2
  • Android 10+ (Emulator or Physical Device)
  • ADB (Android Debug Bridge)
  • scrcpy (for video recording features)

Getting Started

  1. Clone the repository
shell
git clone https://github.com/pedro-rivas/android-puppeteer-mcp.gitcd android-puppeteer
  1. Install dependencies
shell
uv python install 3.10uv sync
  1. Setup Android device
shell
# Enable USB debugging on your Android device# For emulator, ensure it's runningadb devices  # Verify device connection
  1. Connect to the MCP server

  2. Locate your Claude Desktop configuration file:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  3. Add the following JSON to your Claude Desktop config:

    json
    {  "mcpServers": {    "android-puppeteer": {      "command": "path/to/uv",      "args": [        "--directory",        "path/to/android-puppeteer",        "run",        "puppeteer.py"      ]    }  }}

    Replace:

    • path/to/uv with the actual path to your uv executable
    • path/to/android-puppeteer with the absolute path to where you have cloned this repo
  4. Restart Claude Desktop

Restart your Claude Desktop. You should see "android-puppeteer" listed as an available integration.


Available Tools

Android Puppeteer provides the following tools for comprehensive Android device interaction:

Device Management

  • list_emulators: List all available Android emulators and devices with their status and dimensions
  • get_device_dimensions: Get the screen dimensions of a specific Android device
  • get_ui_elements_info: Get detailed information about all interactive UI elements on screen

Visual Interaction

  • take_screenshot: Capture annotated screenshots with numbered UI element overlays
  • press: Tap on specific coordinates with optional long press duration
  • long_press: Perform long press gestures on specific coordinates

Navigation & Input

  • press_back: Press the hardware back button
  • swipe: Perform directional or custom coordinate swipes
  • type_text: Type text into focused input fields with optional text clearing
  • scroll_element: Scroll specific UI elements in any direction

Recording & Documentation

  • record_video: Start screen recording with customizable quality settings
  • stop_video: Stop active screen recordings and save to local storage

Usage Examples

Basic Device Interaction

python
# Take an annotated screenshotscreenshot = await take_screenshot()
# Tap on a specific element (element 5 from screenshot)await press(x=500, y=300)
# Type text into an input fieldawait type_text("Hello, Android!")
# Swipe to scroll downawait swipe(direction="down")

Multi-Device Automation

python
# List available devicesdevices = await list_emulators()
# Target specific deviceawait take_screenshot(device_id="emulator-5554")await press(x=200, y=400, device_id="emulator-5554")

Video Recording Workflow

python
# Start recordingawait record_video(filename="test_session.mp4")
# Perform automation stepsawait press(x=300, y=500)await type_text("Automated test input")
# Stop recordingawait stop_video()

Project Structure

android-puppeteer/    puppeteer.py          # Main MCP server implementation    main.py              # Entry point    pyproject.toml       # Project configuration    ss/                  # Screenshots directory    videos/              # Video recordings directory    README.md           # This file

Important Notes

  • Device Permissions: Ensure USB debugging is enabled on target Android devices
  • Network Access: Some features require network connectivity for device communication
  • Storage: Screenshot and video files are saved locally in ss/ and videos/ directories
  • Performance: Response times depend on device performance and network latency

Troubleshooting

Common Issues

  1. Device not found: Verify ADB connection with adb devices
  2. Permission denied: Check USB debugging and device authorization
  3. Screenshot failures: Ensure device screen is unlocked and accessible
  4. Video recording issues: Verify scrcpy installation and device compatibility

Debug Mode

Run the server directly for debugging:

shell
uv run puppeteer.py

License

This project is licensed under the MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and ensure code quality
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Related Projects


Star this repo if you find it useful!

来源:README.md,提交 94bf75f

工具

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

版本历史

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

评分

已满足适用检查项的 40%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

    请在仓库或注册中心条目中声明许可证。