Overview
What is MCP-ADB?
MCP-ADB is a Model Context Protocol (MCP) server that integrates with Android Debug Bridge (ADB) to allow AI assistants to interact with connected Android devices. It is intended for developers and users who want to control Android devices programmatically through an AI assistant.
How to use MCP-ADB?
Clone the repository, install dependencies with npm install, and build the project with npm run build. Then configure the MCP server in Claude Desktop’s claude_desktop_config.json by specifying the path to the built index.js file and optionally the ADB_PATH environment variable. Use the provided tools (screenshot, pressKey) and access resources (adb://devices, adb://screenshots/{filename}) to interact with Android devices.
Key features of MCP-ADB
- Capture screenshots from connected Android devices with automatic resizing
- Return screenshot data as base64-encoded PNG strings
- Send key events (navigation, back, home) to Android devices
- Target specific devices when multiple devices are connected
- List all connected Android devices via resource URIs
- Access screenshots and device information through resource URIs
Use cases of MCP-ADB
- Take a screenshot of an Android device and use AI to analyze its content
- Send navigation commands (DPAD, back, home) to automate device interaction
- List all connected Android devices to manage multi-device setups
- Retrieve a stored screenshot by filename for later processing
FAQ from MCP-ADB
What does MCP-ADB do?
MCP-ADB provides an MCP server that connects an AI assistant to Android devices via ADB, enabling screenshot capture, key event simulation, and device listing.
What are the prerequisites for MCP-ADB?
You need Node.js (v16 or higher), ADB installed and available in PATH (or set via the ADB_PATH environment variable), and connected Android device(s) with USB debugging enabled.
How do I install MCP-ADB?
Clone the repository, then run npm install and npm run build to compile the TypeScript code to JavaScript in the build directory.
How do I configure MCP-ADB with Claude Desktop?
Edit claude_desktop_config.json (found in Claude Desktop’s installation directory or via Settings → Developer → Edit Config) and add an entry under mcpServers with the command node and args pointing to the built index.js file, plus an optional ADB_PATH environment variable.
What tools are available in MCP-ADB?
Two tools: screenshot captures a screenshot (optionally targeting a device by ID) and returns base64 image data; pressKey sends a key event (e.g., KEYCODE_DPAD_DOWN, KEYCODE_BACK) to a device.