Android MCP
Android MCP
모든 AI 에이전트에서 Android 완벽 제어 — Claude, OpenCode, Windsurf, Cursor 등 7개의 범주별 MCP 도구 · 90fps 라이브 뷰어 · WiFi ADB · 설치할 앱 없음
빠른 데모
android_screen(action="screenshot") # PNG capture
android_screen(action="ocr") # visible text
android_interact(action="tap", params={"x": 540, "y": 960}) # tap
android_interact(action="find", params={"text": "Send"}) # find + tap
android_system(action="battery") # battery info
android_screen(action="viewer") # 90fps interactive window on PCRelated MCP server: DeepADB
아키텍처
AI Agent (Claude / OpenCode / Windsurf / Cursor…)
↓ MCP Protocol (stdio)
server.py ← 7 categorical tools
↓
device_manager.py ← device selection, multi-device
↓
backends/
├── adb_backend.py ← PRIMARY : uiautomator2 + direct ADB
└── companion_backend.py ← FALLBACK : Flutter app WebSocket
↓
N Android phones / emulatorsADB 백엔드 (기본) — 개발자 모드가 활성화된 모든 기기에서 작동합니다.
휴대폰에 설치할 것이 없습니다. uiautomator2 + ADB 명령어를 사용합니다.
컴패니언 백엔드 (대체) — 네트워크에서 ADB를 사용할 수 없을 때 사용하는 선택적 Flutter 앱입니다.
요구 사항
Python 3.10+
ADB (PATH에 포함되어야 함,
winget install Google.PlatformTools)Android: 개발자 모드 + USB 디버깅 (또는 WiFi 디버깅)
설치
git clone https://github.com/Steph-ux/android-mcp
cd android-mcp
pip install -r requirements.txt
# Initialize uiautomator2 (once per device)
python -m uiautomator2 init라이브 뷰어 90fps (선택 사항)
winget install Genymobile.scrcpy
python viewer.pyMCP 구성
# Generate the correct JSON for your AI client
python mcp_config.py --client claude # Claude Desktop
python mcp_config.py --client opencode # OpenCode
python mcp_config.py --client windsurf # Windsurf
python mcp_config.py --client cursor # Cursor
python mcp_config.py --write # write directly to config filesClaude Desktop 예시 (claude_desktop_config.json):
{
"mcpServers": {
"android-mcp": {
"command": "C:/Python312/python.exe",
"args": ["D:/path/to/android-mcp/server.py"],
"type": "stdio"
}
}
}USB 없는 WiFi 연결 (Android 11+)
# On the phone: Settings → Developer options → Wireless debugging → Pair device
adb pair 192.168.1.42:38765 # enter the code shown on the phone
adb connect 192.168.1.42:5555전체 가이드 → WIFI_PAIRING.md
7가지 MCP 도구
호출 규칙: android_xxx(action="...", params={...}, device_id="serial")
device_id는 항상 선택 사항입니다 (현재 선택된 기기를 사용).
android_device — 기기 관리
작업 | 매개변수 | 설명 |
| — | 연결된 모든 기기 (USB, WiFi, 에뮬레이터) |
|
| 기본 기기 설정 |
|
| WiFi ADB 연결 |
| — | 현재 WiFi 기기 연결 해제 |
| — | 모델, OS, 해상도, 밀도 |
| — | 기기가 연결되어 있고 준비되었는지 확인 |
| — | 애니메이션, 화면 켜짐 유지, ATX 에이전트 구성 |
android_screen — 캡처 및 스트리밍
작업 | 매개변수 | 설명 |
| — | PNG 캡처 (FLAG_SECURE 우회) → 이미지 |
|
| 특정 영역 캡처 → 이미지 |
| — |
|
| — | 화면이 켜져 있는지 확인 |
| — | 화면 깨우기 |
| — | ADB 스트림 시작 (~16fps) |
| — | 스트림 중지 |
| — | 최신 스트림 프레임 → 이미지 |
|
| 표시된 텍스트 추출 (Tesseract) |
|
| 템플릿 매칭 (OpenCV) |
|
| PC에서 scrcpy 90fps 창 실행 |
android_interact — 터치, 키보드, UI
작업 | 매개변수 | 설명 |
|
| 탭 |
|
| 더블 탭 |
|
| 길게 누르기 |
|
| 스와이프 |
|
| 드래그 앤 드롭 |
|
| 핀치 줌 |
|
| 다중 손가락 제스처 |
|
| 텍스트 입력 |
| — | 활성 필드 지우기 |
|
| 입력 + Enter |
|
| 시스템 키 (HOME, BACK, ENTER, VOLUME_UP 등) |
|
| 키 조합 (키코드) |
| — | 전체 UI XML 트리 (uiautomator2) |
|
| 요소 찾기 및 탭 |
|
| 요소 대기 |
|
| 요소로 스크롤 |
|
| 텍스트가 보이는지 확인 |
android_app — 애플리케이션
작업 | 매개변수 | 설명 |
|
| 앱 실행 |
|
| 앱 강제 종료 |
|
| 설치된 앱 목록 |
|
| PC에서 APK 설치 |
|
| 앱 제거 |
| — | 포그라운드 앱 패키지 |
|
| URL 열기 |
|
| Android 인텐트 전송 |
|
| 시스템 설정 열기 ( |
android_files — 파일
작업 | 매개변수 | 설명 |
|
| PC → 휴대폰 |
|
| Base64 → 휴대폰 |
|
| 휴대폰 → PC |
|
| 휴대폰 → base64 |
|
| 디렉토리 내용 나열 |
android_system — 시스템 및 네트워크
작업 | 매개변수 | 설명 |
|
| ADB 쉘 명령어 |
|
| Logcat |
| — | 배터리 잔량 및 충전 상태 |
| — | 클립보드 읽기 |
|
| 클립보드에 쓰기 |
|
| 볼륨 설정 |
|
| 화면 회전 (0-3) |
|
| WiFi 켜기/끄기 |
|
| Bluetooth 켜기/끄기 |
|
| 모바일 데이터 켜기/끄기 |
| — | 활성 알림 |
|
| GPS 위치 모의 설정 |
|
| 가속도계, 자이로, 조도 등 |
| — | 사용 가능한 WiFi 네트워크 |
|
| WiFi 연결 |
|
| 연락처 읽기 |
|
| SMS 전송 (휴대폰에서 확인 필요) |
android_automation — 배치 및 매크로
작업 | 매개변수 | 설명 |
|
| 한 번의 호출로 N개의 작업 실행 |
|
| 매크로 녹화 시작 |
|
| 매크로에 작업 추가 |
| — | 매크로 저장 |
| — | 저장된 매크로 목록 |
|
| 매크로 재생 |
|
| 매크로 삭제 |
라이브 뷰어 — scrcpy 90fps
python viewer.py # auto-detect device, 90fps, interactive
python viewer.py --fps 60 # 60fps
python viewer.py --record # record to .mp4
python viewer.py --record out.mp4 # named output file
python viewer.py --multi # one viewer per connected device
python viewer.py --no-control # read-only mode제어 | 작업 |
왼쪽 클릭 | 탭 |
드래그 | 스와이프 |
오른쪽 클릭 | BACK |
스크롤 | 스크롤 |
| HOME |
| 스크린샷 → PC 클립보드 |
| 전체 화면 |
| 회전 |
테스트
# Unit tests (no device required)
pytest tests/test_server_unit.py -v # 94 tests
# Integration tests (ADB device required)
pytest tests/test_integration.py -v프로젝트 구조
android-mcp/
├── server.py # MCP server — 7 tools
├── viewer.py # scrcpy 90fps interactive viewer
├── mcp_config.py # JSON config generator
├── device_manager.py # Multi-device management
├── relay.py # ⚠️ LEGACY — companion fallback only
├── requirements.txt
├── pyproject.toml
├── WIFI_PAIRING.md
├── backends/
│ ├── adb_backend.py # Primary backend (uiautomator2 + ADB)
│ └── companion_backend.py # Fallback backend (Flutter app)
├── examples/
│ ├── agent_loop.py # Autonomous automation loop
│ └── whatsapp_auto.py # WhatsApp automation example
└── tests/
├── conftest.py
├── test_server_unit.py # 94 unit tests
└── test_integration.py # Real device tests예시
# WhatsApp — send a message
await android_app("launch", {"package": "com.whatsapp"})
await android_interact("find", {"text": "Alice"})
await android_interact("type", {"text": "Hello!"})
await android_interact("key", {"key": "ENTER"})
# Batch in a single call
await android_automation("batch", {"actions": [
{"action": "key", "key": "HOME"},
{"action": "tap", "x": 540, "y": 200},
{"action": "type", "text": "search query"},
{"action": "key", "key": "ENTER"},
]})
# Macro: record + replay
await android_automation("macro_start", {"name": "login"})
await android_automation("macro_record", {"action": "tap", "x": 540, "y": 400})
await android_automation("macro_record", {"action": "type", "text": "password"})
await android_automation("macro_stop")
await android_automation("macro_replay", {"name": "login"})전체 사용 사례는 examples/whatsapp_auto.py 및 examples/agent_loop.py를 참조하세요.
라이선스
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
A real Android phone in the cloud for MCP agents: observe the screen, act, reset to a saved state.
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
Cloud Android phones for AI agents: create a phone, read the screen, tap, type, install APKs, park.
Melaya is a remote MCP server. It gives an assistant hands on your own Android phone and browser: it reads the screen through the accessibility tree, then taps, types and navigates inside the apps and sites you allow-list, with no per-app API. It also builds, schedules and runs agent pipelines across 6k+ connected tools. OAuth 2.1, nothing to install.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to fully control Android devices through over 30 tools for app management, UI automation, and vision-based analysis via ADB. It supports multi-device management, action recording, and smart execution strategies ranging from UI hierarchy parsing to coordinate-based interaction.37182 npm1MIT
- AlicenseBqualityAmaintenanceA comprehensive MCP server that enables AI agents to interact with Android devices through Android Debug Bridge (ADB), offering 198 tools for device control, app management, diagnostics, and more.10075 npm19Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to control Android phones via MCP and HTTP. Supports screen capture, taps, swipes, text input, and app management.6AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to control Android devices via ADB, providing tools for screen capture, tap/swipe/input, app management, and diagnostics. Works locally over USB or WiFi and integrates with MCP clients like Claude and Cursor.1MIT