adbfriend
Android ADB CLI tool including integrated MCP Server with common adb actions used during development
claude mcp add --transport stdio mikepenz-adbfriend /opt/homebrew/bin/adbfriend mcp server \ --env ANDROID_HOME="/path/to/android/sdk"
How to use
ADB Friend exposes an MCP server so models and tools can talk to your local Android device via ADB. The server is exposed through the MCP interface and offers a suite of Android device management commands (such as file operations, app management, and device info) that you can invoke from supporting AI tools and editors. The MCP integration lets tools like Claude Desktop, GitHub Copilot, RayCast, or other MCP-enabled environments discover the adb-friend server and send structured prompts to perform actions on your connected device. The server supports a variety of commands (check-adb-speed, clear-installed-package, force-stop-process, uninstall-package, read-file, write-file, capture-screenshot, install-apk, and many more), enabling automated device interactions from your prompts and workflows.
Once the MCP server is running, you can use the supported tools by issuing prompts or commands that reference the adb-friend MCP server. For example, you can request to uninstall a package, list installed apps, pull a file from the device, or capture a screenshot for review. The server also exposes a range of file-system and package-management actions that are useful in development and testing scenarios. Use the inspector (npx @modelcontextprotocol/inspector) to debug the server and verify the MCP setup, then connect via your MCP-enabled client to begin sending tool prompts.
Typical usage involves starting the server through your MCP front-end (via your preferred tool’s configuration) and then invoking the supported tools through prompts like: "uninstall the 'sample' app", "force stop the 'sample' app", or "pull all KotlinConf related files from the Android device to the host". The tooling supports both simple and complex operations across connected devices, with the server handling ADB communication under the hood.
How to install
Prerequisites
- A working macOS/Linux/Windows environment with a compatible JDK and the Android SDK if you intend to perform device operations.
- Homebrew on macOS or appropriate package manager for your OS.
Installation steps (Homebrew, macOS example)
- Add the custom tap that provides adbfriend:
brew tap mikepenz/tap
- Install adbfriend via the tap:
brew install mikepenz/tap/adbfriend
Optional: Download prebuilt binaries from the release page if you prefer manual installation.
Usage ready steps
- Ensure your Android device or emulator is connected and recognized by ADB.
- If you’re using MCP with Claude Desktop, Copilot, or another tool, configure the MCP server as shown in the README example, including the command path and the necessary environment variables.
Additional notes
Tips and notes:
- The MCP server relies on ADB; if you don’t provide ANDROID_HOME, you may need to start adb-server manually.
- When configuring MCP in tools like Claude Desktop, ensure the server name (e.g., adb-friend) matches your configuration entry.
- If you encounter connection exceptions, verify that ADB can connect to your device (adb devices) and that the Android SDK path is correct.
- The service supports many tools; if you plan to use a new prompt, reference the supported tool list in the README to craft effective prompts (e.g., uninstall-package, force-stop-process, read-file, write-file).
- For debugging the MCP server, install and run the inspector with npx @modelcontextprotocol/inspector and use the provided URL to connect.
Related MCP Servers
lamda
The most powerful Android RPA agent framework, next generation of mobile automation robots.
ai-trader
Backtrader-powered backtesting framework for algorithmic trading, featuring 20+ strategies, multi-market support, CLI tools, and an integrated MCP server for professional traders.
droidmind
Control your Android devices with AI using Model Context Protocol
apktool
A MCP Server for APK Tool (Part of Android Reverse Engineering MCP Suites)
sudocode
Lightweight agent orchestration dev tool that lives in your repo
adb
An MCP (Model Context Protocol) server for interacting with Android devices through ADB in TypeScript.