Adb_mcp_tools

by zhuhui132

179 downloads
Not rated
GitHub

About

Adbmcptools is an Android app automation testing and operation toolset based on the MCP (Mobile Control Protocol) framework. It integrates with ADB to enable control of connected Android devices through functions like app management, screen interactions, OCR text processing, and…

Details

Author
zhuhui132
Downloads
179
Categories
Other

- App control: launch, check status, reset apps
- Screen operations: screenshot, tap, swipe, long press, double tap
- Text processing: OCR recognition, text input, text search
- Smart operations: smart click, smart return
- Device and app information retrieval
- Layout analysis: hierarchy extraction, keyword extraction

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Adb_mcp_tools
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the package with pip install mcp-tools, ensure an Android device is connected and authorized via ADB (adb devices), then start the MCP service with python -m mcp_tools.server. Connect using an MCP client or configure the server in your MCP config JSON after cloning the repository.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "adb_mcp_tools": {
            "adb_mcp_tools": {
                "command": "uv",
                "args": [
                    "run",
                    "./mcp_tools/server.py"
                ]
            }
        }
    }
}

McpServers

{
    "adb_mcp_tools": {
        "command": "uv",
        "args": [
            "run",
            "./mcp_tools/server.py"
        ]
    }
}

MCP Tools

一个强大的 Android 应用自动化测试和操作工具集,基于 MCP (Mobile Control Protocol) 框架。

功能特点

- 应用控制:启动、检查状态、重置应用
- 屏幕操作:截图、点击、滑动、长按、双击
- 文本处理:OCR识别、文本输入、文本查找
- 智能操作:智能点击、智能返回
- 设备信息:获取设备信息、应用信息
- 布局分析:获取布局层级、关键词提取

安装

pip install mcp-tools

使用方法

1. 确保设备已通过 ADB 连接并授权:

adb devices

2. 启动 MCP 服务:

python -m mcp_tools.server

3. 使用 MCP 客户端连接服务:

from mcp.client import MCPClient

client = MCPClient('web-search')


4.git clone 后;配置mcp server config

  "adb_mcp_tools": {
          "command": "/uv",
          "args": [
              "run","./mcp_tools/server.py"
          ]
         
      }

主要工具函数

- start_app(package_name): 启动指定应用
- check_status(package_name): 检查应用状态
- smart_click(max_iterations, max_depth): 智能点击
- get_text_locations(): 获取文本位置
- click_text(text, fuzzy_match): 点击指定文本
- input_text(text, clear_first): 输入文本
- swipe(start_x, start_y, end_x, end_y): 滑动操作
- get_device_info(): 获取设备信息

配置

默认配置:
- 应用包名:com.wuba
- 日志目录:./logs
- 截图目录:./screenshots

依赖要求

- Python >= 3.7
- ADB 工具
- OpenCV
- Tesseract OCR
- 其他依赖见 setup.py

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

支持

如有问题,请提交 Issue 或联系作者。

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.