
minhalvp/android-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
adbを通じてAndroidデバイスを制御するMCPサーバー
概要
ADB(Android Debug Bridge)を通じてAndroidデバイスに対するプログラム制御を提供するMCP(Model Context Protocol)サーバーです。このサーバーは、ClaudeデスクトップやCodeエディタ(例:Cursor)などのMCPクライアントがアクセス可能なさまざまなAndroidデバイス管理機能を公開します - 🔧 ADBコマンド実行 - 📸 デバイススクリーンショットキャプチャ - 🎯 UIレイアウト解析 - 📱 デバイスパッケージ管理 - Python 3.x - ADB(Android Debug Bridge)インストールおよび設定済み - Androidデバイスまたはエミュレーター(未テスト) 2. インストール依存関係:このプロジェクトは様々なインストール方法を通じてuvをプロジェクト管理に用いています。 サーバーは多様な使用シナリオに対応した柔軟なデバイス構成をサポートしています。 - 設定ファイル不要 - 唯一接続されたデバイスに自動接続 - 単一のテストデバイスで開発に最適 - 複数のデバイスが接続されている場合に使用- 設定ファイルで正確なデバイスを指定する 設定ファイル(config.yaml)は です。
概要(AI 翻訳)
プログラム制御を提供するMCP(モデルコンテキストプロトコル)サーバー AndroidデバイスはADB(Android Debug Bridge)を通じて提供されます。このサーバーは、 MCPでアクセス可能なさまざまなAndroidデバイス管理機能 Claude Desktopのようなクライアント およびコードエディタ (例:カーソル)
特徴
- 🔧 ADBコマンド実行
- 📸 デバイススクリーンショットキャプチャ
- 🎯 UIレイアウト分析
- 📱 デバイスパッケージ管理
前提条件
- Python 3.x
- ADB(Android Debug Bridge)のインストールおよび設定
- Androidデバイスまたはエミュレーター(未テスト)
設置
-
リポジトリのクローン:
-
依存関係のインストール: このプロジェクトはUVを使っています さまざまな方法による管理 インスタレーション。
構成
サーバーは多様な使用シナリオに対応した柔軟なデバイス構成をサポートしています。
デバイス選択モード
1.自動選択(単一デバイス推奨)
- 設定ファイル不要
- 唯一接続されたデバイスに自動接続
- 単一の試験装置での開発に最適
2.手動デバイス選択
- 複数のデバイスが接続されている場合に使用
- 設定ファイルで正確なデバイスを指定する
設定ファイル(任意)
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Android MCP Server
An MCP (Model Context Protocol) server that provides programmatic control over Android devices through ADB (Android Debug Bridge). This server exposes various Android device management capabilities that can be accessed by MCP clients like Claude desktop and Code editors (e.g. Cursor)
Features
- 🔧 ADB Command Execution
- 📸 Device Screenshot Capture
- 🎯 UI Layout Analysis
- 📱 Device Package Management
Prerequisites
- Python 3.x
- ADB (Android Debug Bridge) installed and configured
- Android device or emulator (not tested)
Installation
- Clone the repository:
git clone https://github.com/minhalvp/android-mcp-server.git
cd android-mcp-server
- Install dependencies: This project uses uv for project management via various methods of installation.
uv python install 3.11
uv sync
Configuration
The server supports flexible device configuration with multiple usage scenarios.
Device Selection Modes
1. Automatic Selection (Recommended for single device)
- No configuration file needed
- Automatically connects to the only connected device
- Perfect for development with a single test device
2. Manual Device Selection
- Use when you have multiple devices connected
- Specify exact device in configuration file
Configuration File (Optional)
The configuration file (config.yaml) is optional. If not present, the server will automatically select the device if only one is connected.
For Automatic Selection
Simply ensure only one device is connected and run the server - no configuration needed!
For Manual Selection
- Create a configuration file:
cp config.yaml.example config.yaml
- Edit
config.yamland specify your device:
device:
name: "your-device-serial-here" # Device identifier from 'adb devices'
For auto-selection, you can use any of these methods:
device:
name: null # Explicit null (recommended)
# name: "" # Empty string
# name: # Or leave empty/comment out
Finding Your Device Serial
To find your device identifier, run:
adb devices
Example output:
List of devices attached
13b22d7f device
emulator-5554 device
Use the first column value (e.g., 13b22d7f or emulator-5554) as the device name.
Usage Scenarios
| Scenario | Configuration Required | Behavior |
|---|---|---|
| Single device connected | None | ✅ Auto-connects to the device |
| Multiple devices, want specific one | config.yaml with device.name |
✅ Connects to specified device |
| Multiple devices, no config | None | ❌ Shows error with available devices |
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"android": {
"command": "path/to/uv",
"args": ["--directory", "path/to/android-mcp-server", "run", "server.py"]
}
}
}