adb-sms
adb-sms MCP
ADB 経由で Android のSMS 認証コードを読み取り、Cursor Agent が chrome-devtools と連携して Web の SMS ログインを完了できるようにします。
設計方針: 電話番号はユーザーが
devices.jsonで設定します。adb はデバイスの serial の識別と SMS の OTP 読み取りのみを担当します。
動作原理
USB 连接手机(adb devices → serial)
│
├─ devices.json[serial].phone_numbers → Web 填手机号
│
└─ adb 读短信 inbox → adb_wait_for_otp 拿验证码Related MCP server: Android MCP Server
プロジェクト構成
mcp-adb-sms/
├── server.py # MCP 服务入口
├── adb_client.py # ADB 设备 / 短信读取
├── sms_parser.py # 短信与 OTP 解析
├── test_local.py # 本地自检(不启动 MCP)
├── requirements.txt
├── devices.json.example # 手机号配置模板(提交到 git)
├── devices.json # 本地配置(git 忽略,需自行创建)
└── README.md前提条件
Android スマホで USB デバッグ を有効にし、PC を認証する
adb devicesにdeviceと表示される(unauthorizedではない)Python 3.10+(推奨: 3.12)
Android platform-tools(
adbを含む)
インストール
git clone https://github.com/zalazp/mcp-adb-sms.git
cd mcp-adb-sms
py -3.12 -m pip install -r requirements.txt電話番号の設定(必須)
電話番号はadb では読み取らず、ご自身で devices.json に記入してください:
copy devices.json.example devices.jsonadb devicesを実行し、serial をメモする(例:10AD410LNF000PX)serial をキーとして、そのスマホのすべての電話番号を記入する
{
"10AD410LNF000PX": {
"phone_numbers": [
"18317840243",
"19139582095"
]
}
}Cursor 設定
%USERPROFILE%\.cursor\mcp.json を編集:
{
"mcpServers": {
"adb-sms": {
"command": "py",
"args": [
"-3.12",
"E:\\path\\to\\mcp-adb-sms\\server.py"
],
"env": {
"ADB_PATH": "D:\\RJAZ\\Sdk\\platform-tools\\adb.exe"
}
}
}
}フィールド | 説明 |
| clone したディレクトリ内の |
| 本機の |
保存後、Cursor を再起動すると、MCP パネルで adb-sms が緑色になります。
ローカル自己診断
cd mcp-adb-sms
$env:ADB_PATH="D:\RJAZ\Sdk\platform-tools\adb.exe"
py -3.12 test_local.py正常な出力例:
{
"adb_exists": true,
"devices": [{ "serial": "10AD410LNF000PX", "state": "device" }],
"sms_readable": true,
"sim_numbers": [
{ "number": "13800138000", "available": true },
{ "number": "13900139000", "available": true }
],
"device_profile": { "source": "devices.json" }
}recommendations が設定不足を示している場合は、上記の手順で devices.json を作成してください。
MCP ツール
ツール | 説明 |
| adb、SMS 読み取り可否、 |
| 接続中の ADB デバイスを一覧表示 |
|
|
| 直近 N 件の SMS を読み取る |
| Web で認証コード送信後、新しい OTP をポーリング待機 |
| Android 11+ で shell に SMS 読み取りを許可する試行 |
| 制限付き adb shell(ホワイトリストコマンド) |
Agent の典型的なフロー(SMS ログイン)
1. adb_health_check()
2. adb_get_sim_numbers() ← 从 devices.json 取手机号
3. chrome-devtools: 打开登录页、填号、勾选协议
4. chrome-devtools: 滑块验证码(失败则人工完成)
5. chrome-devtools: 点击「发送验证码」
6. adb_wait_for_otp(timeout=90, sender_filter="Midea|美的")
7. chrome-devtools: 填入验证码并登录SMS が読み取れない場合
adb shell appops set com.android.shell READ_SMS allowまたは Agent で adb_grant_sms_permission を呼び出し、その後 adb_health_check を実行します。
それでも失敗する場合、MCP は dumpsys notification による通知バーの SMS 読み取り(精度は低め)にフォールバックします。
セキュリティ上の注意
USB 接続されたローカルデバイスの SMS のみを読み取ります
SMS の内容をディスクに永続化しません
devices.jsonには電話番号が含まれるため、.gitignoreに含まれており、公開リポジトリにコミットしないでくださいadb_shellは content / dumpsys / getprop などのホワイトリストコマンドのみ許可します本人のデバイスまたは許可されたテスト環境のみで使用してください
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityCmaintenanceEnables AI agents to interact with Android devices through UI manipulation, screen capture, touch gestures, text input, and app management via ADB. Provides comprehensive mobile automation capabilities including element detection, navigation, and application control for Android device testing and interaction.95
- AlicenseBqualityDmaintenanceEnables control of Android devices via ADB, allowing screenshot capture, touch simulation, and swipe gestures through natural language commands.221376MIT
- FlicenseNot gradedqualityDmaintenanceEnables control of Android devices through ADB using natural language commands. Supports browser automation, SMS sending, device information retrieval, settings control, and common device actions like screenshots and button presses.3
- FlicenseAqualityDmaintenanceEnables forensic investigators to acquire data from Android devices via ADB, including device backup, artifact collection, and secure command execution.105
Related MCP Connectors
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
Phone, SMS & email for AI agents — one remote MCP endpoint, OAuth login, zero install.
Control plane for agent auth walls. Connector 0 handles SMS OTP with US test numbers.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zalazp/mcp-adb-sms'
If you have feedback or need assistance with the MCP directory API, please join our Discord server