home / mcp / android adb mcp server
Provides an MCP server to control Android devices via ADB, enabling shell, file transfer, app management, and screenshots.
Configuration
View docs{
"mcpServers": {
"landicefu-android-adb-mcp-server": {
"command": "npx",
"args": [
"-y",
"@landicefu/android-adb-mcp-server"
]
}
}
}You can control Android devices from your AI workflows through an MCP server that talks to ADB. This enables automated development and testing tasks like running shell commands, installing apps, transferring files, and taking screenshots directly from your AI environment.
You connect an MCP client to the Android ADB MCP Server to manage devices and run actions. When multiple devices are connected, you specify a device_id for commands that target a specific device. If only one device is connected, it is used automatically.
Common tasks you can perform include listing devices, running shell commands, installing or uninstalling apps, pushing or pulling files, launching apps, and taking screenshots. Use an MCP client to call the corresponding tools, passing any required device_id when more than one device is available.
Prerequisites you must have before running the server:
- ADB (Android Debug Bridge) must be installed and available in your system PATH. Verify with adb version.
- For clipboard functionality you need platform helpers: macOS uses osascript, Windows uses PowerShell, Linux uses xclip.
- Node.js 16.x or higher.
{
"mcpServers": {
"android_adb": {
"command": "npx",
"args": ["-y", "@landicefu/android-adb-mcp-server"],
"env": {},
"disabled": false,
"alwaysAllow": []
}
}
}Option 1: Install from npm. This is the easiest way to get started.
# Install globally
npm install -g @landicefu/android-adb-mcp-server
# Or install locally in your project
npm install @landicefu/android-adb-mcp-serverIf you prefer building from source, follow these steps to clone, install dependencies, and build the server.
# Clone the repository
git clone https://github.com/landicefu/android-adb-mcp-server.git
cd android-adb-mcp-server
# Install dependencies and build
npm install
npm run build
# Configure with direct path to built index fileAfter building, you can configure the MCP client to load the server by pointing to the build output. For example, use a local stdio configuration that runs the built index.js via node.
The server supports connecting to multiple Android devices, executing shell commands, installing/uninstalling apps, transferring files, launching apps, and taking screenshots. When saving screenshots, relative paths are resolved relative to your home directory to ensure write permissions.
Common issues and fixes include verifying ADB availability, ensuring USB debugging is enabled on devices, and handling multiple connected devices by specifying device_id where required.
List connected devices. Returns a list of device IDs for connected Android devices.
Execute shell commands on a specified Android device using adb shell. Requires the command and optional device_id.
Install APK files on a specified device. Requires path to the APK and an optional device_id.
Uninstall applications from a device by package name. Optional device_id.
List installed packages on a device. Optional device_id and filter options.
Pull files from a device to the local machine. Requires remote_path and local_path; optional device_id.
Push files from local to device. Requires local_path and remote_path; optional device_id.
Launch an application by package name on a device. Optional device_id.
Capture a screenshot and save to a local path. Requires output_path; optional device_id and format.
Capture a screenshot and copy it to the clipboard. Optional device_id and format.