MCP Server for Android device control via ADB and scrcpy
Project description
Android MCP Server
MCP server providing ADB and scrcpy capabilities for Android device control. Built with FastMCP.
Assisted by Minimax Model via Claude Code.
Features
- Device Management: List devices, get device info
- App Management: Install/uninstall apps, start/stop apps, list packages
- File Operations: Push/pull files between device and host
- Shell Execution: Run shell commands on device, exec-out for binary output
- Input Control: Tap, swipe, input text, press keys
- System Info: Screen size, battery status, system properties
- Screen Control: Screen mirroring and control via scrcpy, screenshot via exec-out
- UI Element Finding: Dump UI hierarchy, find elements by attributes
Install
uv add android-mcp-server
Or install from source:
# Clone the repo, then install
git clone https://github.com/chldu2000/android-mcp-server.git
cd android-mcp-server
uv pip install -e .
uv run python -m android_mcp.main
Add MCP Server
Claude Code
claude mcp add android uv run -- python -m android_mcp.main --cwd /Path/to/workdir
Other MCP Clients
The server can be run with:
uv run python -m android_mcp.main
Tools
Device Management
| Tool | Description |
|---|---|
adb_list_devices |
List all connected Android devices |
adb_device_info |
Get detailed device information |
App Management
| Tool | Description |
|---|---|
adb_install_app |
Install an APK |
adb_uninstall_app |
Uninstall an application |
adb_list_packages |
List installed packages |
adb_start_app |
Start an application |
adb_stop_app |
Force stop an application |
File Operations
| Tool | Description |
|---|---|
adb_pull_file |
Pull file from device |
adb_push_file |
Push file to device |
Shell
| Tool | Description |
|---|---|
adb_shell |
Execute shell command |
adb_exec_out |
Execute command via exec-out (for binary output) |
Input Control
| Tool | Description |
|---|---|
adb_tap |
Tap at coordinates |
adb_swipe |
Swipe gesture |
adb_input_text |
Input text |
adb_press_key |
Press key event |
System Info
| Tool | Description |
|---|---|
adb_get_screen_size |
Get screen resolution |
adb_get_battery |
Get battery status |
adb_get_properties |
Get system properties |
Screen Control (scrcpy)
| Tool | Description |
|---|---|
scrcpy_start |
Start screen mirroring |
scrcpy_stop |
Stop screen mirroring |
scrcpy_screenshot |
Take screenshot |
scrcpy_control |
Send control command |
adb_screencap |
Capture screenshot via exec-out |
UI Elements
| Tool | Description |
|---|---|
adb_dump_ui_tree |
Dump UI hierarchy tree |
adb_find_element |
Find UI elements by attributes |
Device Connection
USB Devices
Connect via USB and ensure USB debugging is enabled on the device.
Network Devices
For TCP/IP connection:
-
Enable TCP/IP mode on device:
adb tcpip 5555
-
Find device IP:
adb shell ip route
-
Connect:
adb connect <device-ip>:5555
Dependencies
- fastmcp - MCP server framework
- scrcpy - Screen mirroring (must be installed separately)
- uiautomator2 - uiautomator2 Python wrapper
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file android_mcp_server-0.1.1.tar.gz.
File metadata
- Download URL: android_mcp_server-0.1.1.tar.gz
- Upload date:
- Size: 128.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acb4b5bced4547609d504ff621b80749d84e26d345c7b3eaf6974c297f1c25a7
|
|
| MD5 |
c4454d6cc567760fed68c144f0bbdb9e
|
|
| BLAKE2b-256 |
870286f9d10de9b0ad095c8af4989674f8faefb9757acfc849dc7c77131285a3
|
Provenance
The following attestation bundles were made for android_mcp_server-0.1.1.tar.gz:
Publisher:
python-publish.yml on chldu2000/android-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
android_mcp_server-0.1.1.tar.gz -
Subject digest:
acb4b5bced4547609d504ff621b80749d84e26d345c7b3eaf6974c297f1c25a7 - Sigstore transparency entry: 1449452479
- Sigstore integration time:
-
Permalink:
chldu2000/android-mcp-server@ce7fb4e064f280586653fb10c5aae75797d0cbc0 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/chldu2000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ce7fb4e064f280586653fb10c5aae75797d0cbc0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file android_mcp_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: android_mcp_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2b7122c6fd5e0f41c3b9ff1dcd241edae4ae4f14047cdd25163d3320604772c
|
|
| MD5 |
1c939ceeb276a2063b410ba2acede0d0
|
|
| BLAKE2b-256 |
4af5b05299b7ed5741426224016c5a1758e4c44a038f4c369f3c321ab211eb54
|
Provenance
The following attestation bundles were made for android_mcp_server-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on chldu2000/android-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
android_mcp_server-0.1.1-py3-none-any.whl -
Subject digest:
d2b7122c6fd5e0f41c3b9ff1dcd241edae4ae4f14047cdd25163d3320604772c - Sigstore transparency entry: 1449452496
- Sigstore integration time:
-
Permalink:
chldu2000/android-mcp-server@ce7fb4e064f280586653fb10c5aae75797d0cbc0 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/chldu2000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ce7fb4e064f280586653fb10c5aae75797d0cbc0 -
Trigger Event:
release
-
Statement type: