Android MCP Server

by minhalvp
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides programmatic control over Android devices through ADB, enabling screenshot capture, UI layout analysis, package management, and execution of arbitrary ADB commands.

  • Repository hosting for the android-mcp-server, allowing users to clone and use the server implementation.

안드로이드 MCP 서버

ADB(Android Debug Bridge)를 통해 Android 기기에 대한 프로그래밍 방식 제어를 제공하는 MCP(Model Context Protocol) 서버입니다. 이 서버는 Claude 데스크톱 및 코드 편집기(예: Cursor )와 같은 MCP 클라이언트에서 액세스할 수 있는 다양한 Android 기기 관리 기능을 제공합니다.

특징

  • 🔧 ADB 명령 실행
  • 📸 기기 스크린샷 캡처
  • 🎯 UI 레이아웃 분석
  • 📱 장치 패키지 관리

필수 조건

  • 파이썬 3.x
  • ADB(Android Debug Bridge) 설치 및 구성
  • Android 기기 또는 에뮬레이터(테스트되지 않음)

설치

  1. 저장소를 복제합니다.

지엑스피1

  1. 종속성 설치: 이 프로젝트는 프로젝트 관리를 위해 uv 사용합니다.
uv sync

구성

서버는 간단한 YAML 구성 파일( config.yaml )을 사용하여 대상 Android 장치를 지정합니다.

구성 사용자 정의

  1. 새로운 구성 파일을 만듭니다.
touch config.yaml
  1. 기기를 구성하세요:
device: name: "google-pixel-7-pro:5555" # Your device identifier from 'adb devices'

용법

이 서버를 사용하려면 MCP 클라이언트가 필요합니다. Claude Desktop 앱은 MCP 클라이언트의 한 예입니다. Claude Desktop에서 이 서버를 사용하려면 다음 단계를 따르세요.

  1. Claude Desktop 구성 파일을 찾으세요.
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. mcpServers 섹션에 Android MCP 서버 구성을 추가합니다.
{ "mcpServers": { "android": { "command": "path/to/uv", "args": ["--directory", "path/to/android-mcp-server", "run", "server.py"] } } }

바꾸다:

  • uv 실행 파일의 실제 경로를 path/to/uv 로 지정합니다.
  • 이 저장소를 복제한 절대 경로를 포함하는 path/to/android-mcp-server

https://github.com/user-attachments/assets/c45bbc17-f698-43e7-85b4-f1b39b8326a8

사용 가능한 도구

서버는 다음 도구를 제공합니다.

def get_packages() -> str: """ Get all installed packages on the device. Returns: str: A list of all installed packages on the device as a string """
def execute_adb_command(command: str) -> str: """ Executes an ADB command and returns the output. Args: command (str): The ADB command to execute Returns: str: The output of the ADB command """
def get_uilayout() -> str: """ Retrieves information about clickable elements in the current UI. Returns a formatted string containing details about each clickable element, including their text, content description, bounds, and center coordinates. Returns: str: A formatted list of clickable elements with their properties """
def get_screenshot() -> Image: """ Takes a screenshot of the device and returns it. Returns: Image: the screenshot """
def get_package_action_intents(package_name: str) -> list[str]: """ Get all non-data actions from Activity Resolver Table for a package Args: package_name (str): The name of the package to get actions for Returns: list[str]: A list of all non-data actions from the Activity Resolver Table for the package """

기여하다

기여를 환영합니다!

감사의 말

-
security - not tested
F
license - not found
-
quality - not tested

ADB를 통해 Android 기기를 프로그래밍 방식으로 제어할 수 있는 서버로, Claude Desktop과 같은 MCP 클라이언트에서 액세스할 수 있는 스크린샷 캡처, UI 레이아웃 분석, 패키지 관리와 같은 기능을 제공합니다.

  1. Features
    1. Prerequisites
      1. Installation
        1. Configuration
          1. Customizing Configuration
        2. Usage
          1. Available Tools
        3. Contributing
          1. Acknowledgments
            ID: noi5kgoh33