ADB Friend logo

ADB Friend

Community
mikepenz

Android ADB CLI tool including integrated MCP Server with common adb actions used during development

Publishermikepenz
Repositoryadbfriend
LanguageKotlin
Forks
5
Stars
76
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    ADB Friend exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    76 stars and 5 forks from the linked repository.

ADB Friend

ADB Friend is a tiny cli tool, which helps you to manage your Android device via ADB. Its features were mostly designed for developers, but it can be useful for everyone.

Features

  • Sync files from your computer to your phone
    • Designed for test data, skipping existing files on device
  • Configure device for tests
    • Disable animations, Enable touches, ...
  • Uninstall apps by pattern
  • Packages command
    • Apply the immersive flag to all packages matching glob, force-stop, clear app data & cache
  • Extra tools
    • adb-speed (Helps to identify sub-par cables)
  • Model Context Protocol MCP Server

Install

The installation can be performed using Homebrew. First you'll require the custom tap:

bash
brew tap mikepenz/tap

Next, install the AdbFriend CLI:

bash
brew install mikepenz/tap/adbfriend

Alternatively, you can download prebuild binaries for release page.

Usage

ADB Friend is a command line tool, which can be used in a terminal.

bash
# Get started with the `--help` command, to get information and an overview on the various features offered.
adbfriend --help

MCP Server

ADB Friend (Since version 1.4.0) also provides a Model Context Protocol (MCP) Server, that can be configured in popular AI Tools like Claude Desktop, GitHub Copilot, RayCast, ...

Configuration

The location and details of the configuration file will depend on the used tool. Below example for Claude Desktop.

json
{
  "mcpServers": {
    "adb-friend": {
      "command": "/opt/homebrew/bin/adbfriend",
      "args": [
        "mcp",
        "server"
      ],
      "env": {
        "ANDROID_HOME": "/Users/mikepenz/Development/android/sdk"
      }
    }
  }
}

[!IMPORTANT]
If ANDROID_HOME is not provided, the adb-server has to be manually started on your machine. Otherwise, a connection exception is thrown.

Debug Server

You can use the npx @modelcontextprotocol/inspector to debug the server once started.

bash
# Install and run inspector in your terminal
npx @modelcontextprotocol/inspector

Then launch the website (with the url as provided in the terminal). Launch the mcp server using IntelliJ or the actual command.

bash
# Default port is `3001`
adbfriend mcp server --sse true

Supported tools

Tool NameDescription
check-adb-speedChecks the USB connection speed of an Android device for the provided serial.
clear-installed-packageClears the package data for provided package names on an Android device.
set-immersive-full-for-packageSets the 'immersive-full' flag for provided package names on an Android device.
force-stop-processForces the stop of provided package names on an Android device.
uninstall-packageUninstalls provided package names on an Android device.
get-connected-devicesRetrieves information about all connected Android devices including serial, model, and state.
get-installed-packagesRetrieves information about all installed packages on an Android device. Supports filtering for third-party apps only.
list_allowed_directoriesLists directories that are allowed to be accessed by the file system tools.
list-filesLists files and directories on an Android device. Supports recursive listing with the 'recursive' option.
read-fileReads the content of a file on an Android device.
read_multiple_filesReads the contents of multiple files on an Android device at once (reduces LLM calls).
write-fileWrites content to a file on an Android device.
create-directoryCreates a directory on an Android device.
deleteDeletes a file or directory on an Android device.
search-filesSearches for files matching a case-insensitive glob pattern within allowed directories.
move_fileMoves a file from the source path to the destination path on an Android device.
copy-file-to-hostCopies a binary file from the Android device to the host system.
capture-screenshotCaptures a screenshot from an Android device and saves it to the host system.
install-apkInstalls an APK on the Android device from a file on the host system within the allowed host paths.

With many more tools planned for the future.

Example Prompts

text
uninstall the 'sample' app, but keep its data
text
force stop the 'sample' app
text
Do I have a browser installed on the connected emulator?
text
Organize all files in the Download folder of the connected Android device
text
 Pull all KotlinConf related files from the Android device to the host

Release

The project uses shadow to package the tool in a fat-jar, and also do minimal minification.

bash
./gradlew adbfriend-cli:shadowDistZip

Other

AboutLibraries

Generate aboutlibraries.json for adbfriend

bash
./gradlew adbfriend:exportLibraryDefinitions

Generate aboutlibraries.json for adbfriend-cli

bash
./gradlew adbfriend-cli:exportLibraryDefinitions

Example Prompt Screenshots

Claude Desktop claude-desktop-sample-prompt

Visual Code visual-code-sample-prompt.png

Credits

This project uses the amazing adam library from Malinskiy to interact with adb. The CLI is set-up using the impressive clikt library from ajalt.

License

Copyright 2025 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "mikepenz-adbfriend": {
      "command": "",
      "args": []
    }
  }
}

Use ADB Friend MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once ADB Friend is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add ADB Friend as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the ADB Friend MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mikepenz-adbfriend": {
      "command": "npx",
      "args": [
        "-y",
        "adbfriend"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the ADB Friend MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the ADB Friend MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use ADB Friend to help me with this task?
ADB Friend
Sure. I read it.
Here is what I found using ADB Friend.

Frequently asked questions

What is the ADB Friend MCP server used for?

ADB Friend is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use ADB Friend MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use ADB Friend with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use ADB Friend MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With ADB Friend connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect ADB Friend MCP to TypingMind?

ADB Friend runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does ADB Friend MCP provide in TypingMind?

ADB Friend exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use ADB Friend MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If ADB Friend requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇