A Model Context Protocol server that enables AI assistants to interact with Android devices through ADB, allowing for automated device management, app installation, file transfers, and screenshot capture.
A Model Context Protocol (MCP) server that enables AI assistants to interact with Android devices through the Android Debug Bridge (ADB). This server bridges the gap between AI capabilities and Android device management, allowing for seamless automation of Android development and testing operations.
Add the server to your MCP configuration file:
{ "mcpServers": { "android-adb": { "command": "npx", "args": ["-y", "@landicefu/android-adb-mcp-server"], "env": {}, "disabled": false, "alwaysAllow": [] } } }
~/Library/Application Support/Claude/claude_desktop_config.json
(macOS)~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
(macOS)After configuring, restart your AI assistant to load the new server configuration.
adb version
in your terminalosascript
(built-in)xclip
(install via apt-get install xclip
or equivalent)Tool | Description | Required Parameters | Optional Parameters |
---|---|---|---|
adb_devices | List connected devices | None | None |
adb_shell | Execute shell commands | command | device_id |
adb_install | Install APK files | path | device_id |
adb_uninstall | Uninstall applications | package_name | device_id |
adb_list_packages | List installed packages | None | device_id , filter |
adb_pull | Pull files from device | remote_path , local_path | device_id |
adb_push | Push files to device | local_path , remote_path | device_id |
launch_app | Launch an application | package_name | device_id |
take_screenshot_and_save | Take and save screenshot | output_path | device_id , format |
take_screenshot_and_copy_to_clipboard | Take screenshot to clipboard | None | device_id , format |
The server intelligently handles device selection:
device_id
parameterWhen specifying the output_path
for saving screenshots, the path is resolved as follows:
~
are expanded to the user's home directoryThis ensures that screenshots are saved to a location where the MCP server has write permissions.
"ADB is not available" error
adb version
in your terminal"No Android devices connected" error
adb devices
adb kill-server
followed by adb start-server
"Multiple devices connected" error
device_id
parameter in your tool calladb_devices
toolScreenshot to clipboard not working
# Install globally npm install -g @landicefu/android-adb-mcp-server # Or install locally in your project npm install @landicefu/android-adb-mcp-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:
{ "mcpServers": { "android-adb": { "command": "node", "args": ["/path/to/android-adb-mcp-server/build/index.js"], "env": {}, "disabled": false, "alwaysAllow": [] } } }
This project is licensed under the ISC License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!