Get the FREE Ultimate OpenClaw Setup Guide →

mcp -adb

A Model Context Protocol server for Android Debug Bridge (ADB) control

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yava555-mcp-server-adb node build/index.js \
  --env ADB_PATH="Path to adb executable (optional if adb is in PATH)"

How to use

The mcp-server-adb provides a dedicated MCP server that bridges AI-driven prompts with Android Debug Bridge (ADB) to control and inspect connected Android devices. It exposes resources for discovering devices and obtaining device information, along with tools to interact with devices (tap, swipe, input text, key presses) and manage applications (install/uninstall/start/stop) as capabilities in the MCP ecosystem. Prompts are provided to analyze device status, analyze installed apps, and analyze the current screen, enabling the AI to make informed decisions about device interactions and automation workflows.

To use it, start the server and connect to it through an MCP client or Claude Desktop integration. Use the device resources to list devices and fetch per-device information, then issue device actions (e.g., tap, swipe, input_text) or application management tasks as needed. The prompts help guide the AI to perform structured diagnostics (analyze_device), appraisal of installed apps (analyze_app_list), and screen content analysis (analyze_screen) to tailor subsequent actions or prompts for deeper insights.

How to install

Prerequisites:

  • Node.js 16 or higher
  • npm (bundled with Node.js)
  • Android Debug Bridge (ADB) installed and available in PATH
  • ADB-enabled Android device connected (USB or network)

Install and build:

  1. Clone or download the repository for the mcp-server-adb.
  2. Install dependencies:
npm install
  1. Build the server:
npm run build
  1. (Optional for development) Enable auto-rebuild during development:
npm run watch

Run the server locally (after build):

node build/index.js

Integration with Claude Desktop (example config):

  • On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • On Windows: %APPDATA%/Claude/claude_desktop_config.json

Example configuration snippet:

{
  "mcpServers": {
    "mcp-server-adb": {
      "command": "/path/to/mcp-server-adb/build/index.js"
    }
  }
}

Notes:

  • Ensure ADB is accessible in your PATH or configure ADB_PATH in the MCP config if needed.
  • Connect your Android device and authorize debugging prompts when prompted by the device.
  • For development debugging, you can use the MCP Inspector tooling via npm run inspector as described in the README.

Additional notes

Tips and common issues:

  • If adb devices shows nothing, ensure USB debugging is enabled on the device and the USB cable is functional.
  • For network debugging, enable Wireless debugging on the device and use connect_device with the device IP.
  • The repository indicates upcoming app management features (install_app, uninstall_app, start_app, stop_app); these may be disabled or unavailable until those features are implemented.
  • If you encounter permission issues on macOS/Linux, ensure the index.js file is executable or run with node ensuring proper permissions.
  • When using the inspector, ensure your firewall allows the inspector URL to be reached by your browser.
  • The MCP server communicates via stdio; for advanced debugging, capture and inspect stdio logs to diagnose command failures.

Related MCP Servers

Sponsor this space

Reach thousands of developers