
cursortouch/android-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Androidデバイスとのやり取りのためのMCPサーバー。
概要
はAIエージェントとAndroidデバイスの橋渡しとなる軽量でオープンソースのツールです。MCPサーバーとして動作し、従来のコンピュータビジョンパイプラインや事前プログラムされたスクリプトに頼らず、LLMエージェントが実際の作業を遂行できるようにします。 https://github.com/user-attachments/assets/cf9a5e4e-b69f-46d4-8487-0f61a7a86d67 - ADBおよびAndroidアクセシビリティAPIを通じてUI要素とやり取り:アプリを起動し、タップし、スワイプし、テキストを入力し、ビュー階層を読むことができます。 - あらゆる言語モデルに対応し、微調整されたCVモデルやOCRパイプラインは不要です。 - ジェスチャー、キーストローク、キャプチャ、デバイス状態、シェルコマンド実行のための事前構築ツール。 - 動作間の典型的なレイテンシ(例:2タップ)は、デバイスのスペックや負荷によって変動します。 - Python 3.13 - ADB(Android Debug Bridge)- Android 10+(エミュレーター/Androidデバイス) サーバーを稼働させる前に、AndroidデバイスがADBに接続され認識されていることを確認してください:
概要(AI 翻訳)
Android-MCPのクリーンルーム再実装:MCP AIエージェントがADB上でAndroidデバイスを操作できるサーバーです。
必要なのはadbだけです。デバイスには何もインストールされておらず、
uiAutomator2.
走れ
Python 3.13およびadb(Androidプラットフォームツール)が必要です。
サーバーはstdio上でMCPを話します。クライアントの設定では:
デバイスは最初のツール呼び出し時に接続されているので、サーバーは接続が始まるかどうかに関わらず まだ繋がっている。
デバイスを選ぶ
オプションがなければ、最初の物理デバイスを使うか、存在しない場合はエミュレーターを使うことになります。
| オプション | 環境 | 意味 |
|---|---|---|
--device SERIAL |
ANDROID_MCP_DEVICE |
ネットワーク上のデバイス用シリアル、またはhost:port] |
--connection auto|usb|wifi(別名 --transport) |
ANDROID_MCP_CONNECTION |
デバイス名が付けられていないときの選び方 |
--wifi [HOST] |
ANDROID_MCP_HOST |
Wi-Fi経由のADB;HOST またはHOST:PORT、デフォルトでポート5555 |
--usb [SERIAL] |
USB経由のADB、任意の特定のシリアル |
選択肢は環境に勝る。その他の変数:
- [
ANDROID_MCP_ADB_PATHはadbのバイナリを指定します。それ以外の場合は、adbはPATHで探し、その後に
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
android-mcp-beta
Clean-room reimplementation of Android-MCP: an MCP server that lets an AI agent operate an Android device over ADB.
It needs only adb. Nothing is installed on the device, and there is no dependency on
uiautomator2.
Run
Requires Python 3.13 and adb (Android platform-tools).
uv run android-mcp-beta
The server speaks MCP on stdio. In a client’s config:
{
"mcpServers": {
"android-mcp-beta": {
"command": "uv",
"args": ["--directory", "D:/Projects/android-mcp-beta", "run", "android-mcp-beta"]
}
}
}
The device is connected on the first tool call, so the server starts whether or not one is attached yet.
Choosing the device
With no options it uses the first physical device, or an emulator when there is none.
| Option | Environment | Meaning |
|---|---|---|
--device SERIAL |
ANDROID_MCP_DEVICE |
A serial, or host:port for a device on the network |
--connection auto|usb|wifi (alias --transport) |
ANDROID_MCP_CONNECTION |
How to pick when no device is named |
--wifi [HOST] |
ANDROID_MCP_HOST |
ADB over Wi-Fi; HOST or HOST:PORT, port 5555 by default |
--usb [SERIAL] |
ADB over USB, optionally a specific serial |
Options win over the environment. Other variables:
ANDROID_MCP_ADB_PATHnames theadbbinary. Otherwiseadbis looked for onPATH, then inANDROID_HOME,ANDROID_SDK_ROOTand the default Android Studio SDK folders.SCREENSHOT_QUANTIZED=truereduces screenshots to 256 colours, which makes them smaller.
Tools
| Tool | Does |
|---|---|
ListDevices, ConnectDevice, Device |
List, choose, or disconnect the device |
Snapshot |
The interactive elements, each with a label and tap coordinates. use_vision adds a screenshot with the labels drawn on it; use_annotation=false leaves it clean |
Click, LongClick, Swipe, Drag |
Touch input by coordinates |
ClickBySelector |
Tap an element found by text, resourceId, className or description (exact match; resourceId may be the part after the slash), with index for the nth match |
Type |
Type into a field. x and y tap it first; clear empties it first. Other scripts and emoji need the optional ADBKeyboard app (below) |
Press |
A button: back, home, recent, volume up, enter, and so on |
Notification |
Pull down the notification shade |
Wait, WaitForElement |
Pause, or wait for an element to appear |
Typing other scripts (optional)
Type uses adb shell input text, so on its own it types printable ASCII and the accented Latin
letters Android can compose (é ñ ü ÿ and 107 others, not ç ß å ø). A newline presses Enter and a
tab presses Tab. For anything else (CJK, Cyrillic, Arabic, emoji, ç), install the
ADBKeyboard app on the device once:
adb install keyboardservice-debug.apk
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"android-mcp-beta": {
"command": "uv",
"args": ["--directory", "D:/Projects/android-mcp-beta", "run", "android-mcp-beta"]
}
}
}