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 分

    請在儲存庫或註冊中心條目中宣告授權條款。