android-device-mcp
Provides tools for managing Android devices via ADB, including device control, app management, file operations, and system monitoring such as screenshots, screen recording, log capture, and shell commands.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@android-device-mcp list connected Android devices"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Android Device MCP
A Model Context Protocol (MCP) server that provides comprehensive Android device management capabilities through ADB (Android Debug Bridge). This tool allows you to interact with Android devices programmatically for device management, app management, file operations, and system monitoring.
Features
Device Management
List Devices: Get detailed information about all connected Android devices, including OS version, hardware specs, battery status, and network details
Device Control: Reboot and shut down devices with optional boot modes
Screenshots: Capture device screenshots and save them locally
Screen Recording: Record device screen activity for specified durations
Screen Dump: Export current screen layout as XML for UI automation
Network Information: Retrieve Wi-Fi details, IP addresses, and connection status
App Management
List Installed Apps: Get a complete list of installed applications with package names
App Details: Retrieve detailed information about specific apps (version, SDK, install dates)
Install Apps: Install APK files on connected devices
Uninstall Apps: Remove applications from devices
Launch Apps: Start applications on devices
File System Operations
List Files: Browse directories on Android devices
Pull Files: Copy files from devices to the local system
Push Files: Copy files from the local system to the devices
Remove Files: Delete files from devices
System Monitoring
Log Management: Clear and capture device logs (logcat)
Shell Commands: Execute arbitrary shell commands on devices
Real-time Logging: Collect logs for specified durations
Related MCP server: MSC MCP Server
Prerequisites
Python 3.13 or higher
ADB (Android Debug Bridge) installed and accessible in PATH
Android device(s) connected via USB with USB debugging enabled
Device(s) authorized for ADB access
UV is installed
Installation
Clone the repository:
git clone https://github.com/prashant1507/android-device-mcp.git
cd android-device-mcpInstall dependencies using uv (recommended) or pip:
# Using uv
uv syncConfigure your MCP client (LM Studio, CursorAI, Claude, etc.) to use the Android Device MCP server:
{
"mcpServers": {
"android-device-mcp": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"./android-device-mcp-server.py"
],
"cwd": "/path/to/android-device-mcp"
}
}
}Note: Replace /path/to/android-device-mcp with the actual path to your project directory.
Error Handling
All functions include comprehensive error handling and will return descriptive error messages if operations fail. Common error scenarios include:
Device not connected or unauthorized
ADB server not running
Invalid file paths
Insufficient permissions
Timeout errors for long-running operations
Troubleshooting
Device Not Detected
Ensure USB debugging is enabled on the device
Check that the device is authorized for ADB access
Verify ADB is properly installed and in PATH
Try restarting the ADB server:
adb kill-server && adb start-server
Permission Errors
Ensure the device is unlocked and authorized
Check that the app has the necessary permissions
For file operations, verify the target directories are writable
Timeout Issues
Increase timeout values for slow devices or large file transfers
Check device performance and available storage
Ensure a stable USB connection
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
Acknowledgments
This project leverages the Android Debug Bridge (ADB) for device communication and the Model Context Protocol (MCP) for tool integration.
Available Tools
18 toolsclear_device_logsClears LogsC
Clear logs from logcat on a specific Android device
Inputs: serial (required).
dump_screenDump screenC
Dump current screen of Android device.
Inputs: serial (required), local_file_path.
execute_shell_commandExecute shell commandC
Execute shell command in an Android device.
Inputs: serial (required), command (required).
get_app_detailsGet app detailsA
Retrieve detailed information about an installed app using its name or package name.
Inputs: serial (required), app_package_name (required).
get_device_logsGet and Save LogsC
Get and save logs from logcat on a specific Android device
Inputs: serial (required), time_out, local_log_file_path.
get_network_detailsGet network detailsB
Retrieve network, Wi-Fi information for an Android device by serial number.
Inputs: serial (required).
install_appInstall appC
Install an APK file on an Android device.
Inputs: serial (required), apk_path (required).
launch_appLaunch appC
Launch an APP in an Android device.
Inputs: serial (required), package_name (required).
list_devicesList DevicesA
List all connected Android devices with their serial numbers and detailed info.
Inputs: no named parameters.
list_filesList FilesB
List all files in a given directory on an Android device using its serial number.
Inputs: serial (required), file_path_in_device (required).
list_installed_appsList Installed ApplicationsC
List all installed applications on a specific Android device
Inputs: serial (required).
pull_fileCopy Files from DeviceB
Pull or copy files from a given directory on an Android device using its serial number.
Inputs: serial (required), file_path_in_device (required), local_folder.
push_fileCopy File to DeviceB
Push or copy files from a given directory on local machine to an Android device using its serial number.
Inputs: serial (required), local_file (required), folder_path_in_device (required).
reboot_deviceReboot DeviceC
Reboot a specific Android device using its serial number.
Inputs: serial (required), mode.
screen_recordingScreen RecordingC
Record the screen of an Android device using its serial number.
Inputs: serial (required), time_limit, local_file_path.
shutdown_deviceShutdown DeviceB
Shut down a specific Android device using its serial number.
Inputs: serial (required).
take_screenshotTake ScreenshotC
Capture a screenshot from an Android device using its serial number.
Inputs: serial (required), local_file_path.
uninstall_appUninstall appC
Uninstall an APP from an Android device.
Inputs: serial (required), app_package_name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool has a distinct purpose, covering different aspects of Android device management: logs, screen, shell, apps, devices, files, network, and power operations. Overlap is minimal and clarified by descriptions.
All tool names follow a consistent verb_noun pattern with snake_case, e.g., clear_device_logs, install_app, reboot_device. This makes the tool set predictable and easy to navigate.
With 18 tools, the set is well-scoped for comprehensive Android device management, covering device list, app lifecycle, file operations, logging, screen capture, and power control without being overwhelming.
The tool set covers most common tasks: device discovery, app install/uninstall, file transfer, logs, shell commands, screen operations, and reboot/shutdown. Minor gaps like device properties or UI interaction exist but are non-critical.
Related MCP Connectors
Remote enterprise management of Android devices and apps
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Manage Android and VR device fleets: policies, kiosk mode, device commands and enrollment QR codes.
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables control of Android devices via ADB for automation and testing. Supports app management, screen capture, UI analysis, and input simulation through natural language commands.9167 npm38MIT
- FlicenseNot gradedqualityDmaintenanceEnables control of Android devices through ADB, allowing users to list connected devices, capture screenshots using multiple methods (adb, droidcast, minicap, mumu), and retrieve device information.-
- AlicenseBqualityDmaintenanceEnables LLMs to control and manage Android devices via ADB, including app installation, UI interaction, and device monitoring.3512GPL 3.0
- AlicenseBqualityFmaintenanceEnables Android device control via ADB and scrcpy, including device management, app management, file operations, shell commands, input simulation, screen mirroring, and UI element inspection.2564 PyPIApache 2.0