The ADB MCP Server is a tool that provides a bridge between AI models and Android devices via ADB using MCP. With this server, you can:
- Device Management: List and interact with connected Android devices
- App Installation: Deploy APK files to devices
- Logging: Access and filter device logs through logcat
- File Transfer: Push files to devices and pull files from devices, with base64 encoding options
- UI Interaction: Capture screenshots and analyze UI hierarchy in XML format
- Shell Command Execution: Run custom commands on devices
- Configuration: Customize ADB paths and server settings for flexibility
Provides tools for interacting with Android devices via ADB, including device management, app installation, logging, file transfer, UI interaction, and shell command execution.
Serves as the runtime environment for the ADB MCP server, allowing communication between AI models and Android devices.
Enables execution of custom shell commands on Android devices for advanced device control and automation.
Used as the implementation language for the ADB MCP server, providing typed interfaces for Android device interactions.
Allows retrieval and analysis of Android UI hierarchy in XML format to understand and interact with device interfaces.
ADB MCP Server
An MCP (Model Context Protocol) server for interacting with Android devices through ADB. This TypeScript-based tool provides a bridge between AI models and Android device functionality.
Features
- 📱 Device Management - List and interact with connected Android devices
- 📦 App Installation - Deploy APK files to connected devices
- 📋 Logging - Access device logs through logcat
- 🔄 File Transfer - Push and pull files between device and host
- 📸 UI Interaction - Capture screenshots and analyze UI hierarchy
- 🔧 Shell Command Execution - Run custom commands on the device
Prerequisites
- Node.js (v16 or higher recommended, tested with Node.js v16, v18, and v20)
- ADB (Android Debug Bridge) installed and in your PATH
- An Android device or emulator connected via USB or network with USB debugging enabled
- Permission to access the device (accepted debugging authorization on device)
Installation
Installing via Smithery
To install ADB Android Device Server for Claude Desktop automatically via Smithery:
Manual Installation
Configuration
ADB Path Configuration
The server uses default ADB paths. For custom ADB location:
MCP Configuration
Add the ADB MCP server configuration:
Usage
Starting the Server
IMPORTANT: The server must be running before using any ADB tools.
Start the server using:
You should see:
Keep this terminal window open while using the ADB tools.
Available Tools
All tools are available with the following naming convention:
📱 Device Management
adb_devices
- List connected devicesadb_shell
- Execute shell commands on a device
📦 App Management
adb_install
- Install an APK file using a local file path
📋 Logging
adb_logcat
- View device logs with optional filtering
🔄 File Transfer
adb_pull
- Pull files from a deviceadb_push
- Push files to a device
🔍 UI Interaction
dump_image
- Take a screenshot of the current screeninspect_ui
- Get UI hierarchy in XML format (most useful for AI interaction)
Troubleshooting
If tools aren't working:
- Server Issues:
- Ensure the server is running (
npx adb-mcp
) - Check server output for error messages
- Try detailed logs:
LOG_LEVEL=3 npx adb-mcp
- Kill hanging processes:
ps aux | grep "adb-mcp" | grep -v grep
- then
kill -9 [PID]
- Ensure the server is running (
- Device Connection:
- Verify connection with
adb_devices
- If "unauthorized", accept debugging authorization on device
- Check USB/network connections
- Try restarting ADB:
adb kill-server && adb start-server
- Verify connection with
- ADB Issues:
- Verify ADB installation:
adb version
- Verify ADB installation:
- Device Setup:
- Use an emulator (it was built using one), for real devices maybe try this:
- Ensure USB debugging is enabled
- For newer Android versions, enable "USB debugging (Security settings)"
- Try different USB port or cable
- or let me know in an issue
- Use an emulator (it was built using one), for real devices maybe try this:
Compatibility
- Android 8.0 and higher
- MCP clients including Claude in Cursor IDE
- Was built on macOS but should run on any POSIX compatible (Linux etc).
- Did not try on Windows but maybe it works.
Contributing
- Contributions are welcome! Submit a Pull Request.
- For major changes, open an issue to discuss first.
- You can, of course, also fork it
- Note: this project was
vibe-coded
so if you spot some weird stuff... well now you know 🙂
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with Model Context Protocol (MCP)
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
A TypeScript-based bridge between AI models and Android device functionality, enabling interaction with Android devices through ADB commands for tasks like app installation, file transfer, UI analysis, and shell command execution.
Related MCP Servers
- -securityAlicense-qualityA server enabling programmatic control over Android devices through ADB, providing capabilities like screenshot capture, UI layout analysis, and package management that can be accessed by MCP clients like Claude Desktop.Last updated -310PythonApache 2.0
- AsecurityAlicenseAqualityA TypeScript server that enhances AI assistants' capabilities when working with Starwind UI components, providing tools for project initialization, component installation, documentation access, and more.Last updated -619TypeScriptMIT License
- -securityAlicense-qualityA 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.Last updated -112JavaScriptISC License
- AsecurityAlicenseAqualityA TypeScript-based Model Context Protocol toolkit that enables AI to interact with code files, manage translations, build projects, and search for files and code content.Last updated -33435TypeScriptMIT License