ADB MCP Server enables Android device management via ADB commands for testing and development
The ADB MCP Server provides a robust environment that enables AI applications such as Claude Desktop, Continue, Cursor, and other Model Context Protocol (MCP) clients to interact with connected Android devices through the Android Debug Bridge (ADB). This server acts as a bridge, translating high-level commands from MCP clients into ADB commands while ensuring seamless data flow between the AI application, ADB toolset, and the targeted Android device. By leveraging ADB's extensive capabilities, this MCP server allows for precise control over various aspects of an Android device, including package management, file operations, user interactions, and more.
The core features of the ADB MCP Server are designed to enhance the functionality of AI applications through seamless integration with both ADB tools and MCP protocol. This section details the tools available within the server:
List connected Android devices, allowing the server to identify which device is currently in use. The output can include detailed information such as model name, serial number, manufacturer, and more.
Retrieve a list of installed packages on the selected device. This tool supports filtering options to focus only on specific package types (e.g., system, third-party) or status (enabled/disabled).
Allow AI applications to input text directly into an Android app, which can be useful for triggering user interface interactions or filling in forms.
Install APK files on the selected device with options for allowing reinstallations, handling test packages, and granting permissions. The tool ensures that the package is properly installed, maintaining compatibility with existing applications.
Properly uninstall specified applications from the device, offering options to preserve data or clear it entirely.
Clear all application data for a specific package without removing the app itself, helping manage resources and memory efficiently.
Transfer files from an Android device to a local machine, facilitating rapid analysis and debugging.
Push files from a local machine to an Android device, enabling developers to easily update or modify content on remote devices.
Capture screenshots of the Android screen and save them either locally or directly on the device, providing visual evidence for testing or documentation purposes.
Remove a file from the device with options for forced deletion and recursive removals, ensuring that files are cleaned up efficiently.
Reset all permissions associated with an application to their default state, useful in scenarios where permissions may have been misconfigured or need to be refreshed.
Grant specific permissions to applications, enhancing functionality and accessing denied features.
Revoke specific permissions from applications, ensuring that sensitive data remains secure.
Start activities using the Android Intent system, providing a powerful way to interact with device apps and services.
Stop the ADB server process safely, allowing for proper shutdowns without disrupting ongoing operations.
Start the ADB server process, ensuring that communication between MCP clients and Android devices is maintained continuously.
Display ADB help information, acting as a quick reference guide for available commands and their usage.
Each tool supports various options to tailor its function based on specific requirements. For instance, most tools allow device selection parameters such as deviceId
, useUsb
, and useEmulator
to ensure compatibility with different environments.
The ADB MCP Server is built around the Model Context Protocol (MCP), a standardized protocol for integrating AI applications with data sources and tools. Its architecture involves multiple layers, starting from the MCP client layer all the way down to the direct ADB command execution on Android devices.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[ADB tooling]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
The following chart outlines the compatibility of various MCP clients with the ADB MCP Server:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
To get started, follow these steps to install and configure the ADB MCP Server.
Ensure that you have the Android SDK Platform Tools installed on your system. Follow the instructions below to set up ADB:
adb version
in your terminal.On the Android device, enable USB debugging through Developer Options:
After setting up ADB, install and build the MCP server with the following commands:
# Clone the repository
git clone [repository-url]
cd mcp-server-adb
# Install dependencies
npm install
# Build the project
npm run build
AI applications can leverage the ADB MCP Server to manage and interact with Android devices effectively. Here are two realistic use cases:
Automate testing of mobile applications by integrating the ADB MCP Server with CI/CD pipelines. Developers can run automated tests, install new versions, clear app data, and uninstall apps as needed.
Developers can use the input-text
tool to automate user interface interactions within an Android application for testing or enhancing end-to-end scenarios. This enhances devops efficiency by enabling repeatable actions during development and deployment phases.
The ADB MCP Server is designed to work seamlessly with various MCP clients, including but not limited to:
The ADB MCP Server has been extensively tested to ensure both high performance and stability in a variety of environments. It supports multiple simultaneous connections, robust error handling, and efficient command execution without degrading the user experience.
The ADB MCP Server leverages the power of Android Debug Bridge to provide robust integration points for a wide range of AI applications. Its comprehensive set of tools and seamless MCP protocol implementation enable developers to build more sophisticated, efficient, and secure applications that can interact with Android devices seamlessly.
For further details on installation and usage, refer to the official documentation or explore the source code repository.
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration