adb-sms
Provides tools to read SMS messages and retrieve OTP verification codes from Android devices via ADB, enabling automated web login flows that require SMS authentication.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@adb-smswait for the OTP from the SMS I just triggered"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
adb-sms MCP
Read Android SMS verification codes via ADB, enabling Cursor Agent to complete Web SMS login together with chrome-devtools.
Design principle: Phone numbers are configured by the user in
devices.json; adb is only responsible for identifying the device serial + reading SMS OTP.
How It Works
USB 连接手机(adb devices → serial)
│
├─ devices.json[serial].phone_numbers → Web 填手机号
│
└─ adb 读短信 inbox → adb_wait_for_otp 拿验证码Related MCP server: Android MCP Server
Project Structure
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.mdPrerequisites
Android phone has USB debugging enabled and authorized on the computer
adb devicesshowsdevice(notunauthorized)Python 3.10+ (3.12 recommended)
Android platform-tools (includes
adb)
Installation
git clone https://github.com/zalazp/mcp-adb-sms.git
cd mcp-adb-sms
py -3.12 -m pip install -r requirements.txtConfigure Phone Numbers (Required)
Phone numbers are not read by adb; write them into devices.json yourself:
copy devices.json.example devices.jsonRun
adb devicesand note the serial (e.g.10AD410LNF000PX)Use the serial as the key and fill in all phone numbers for that device
{
"10AD410LNF000PX": {
"phone_numbers": [
"18317840243",
"19139582095"
]
}
}Cursor Configuration
Edit %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"
}
}
}
}Field | Description |
Path in | Change to the absolute path of |
| Absolute path to local |
After saving, restart Cursor; adb-sms in the MCP panel should turn green.
Local Self-Check
cd mcp-adb-sms
$env:ADB_PATH="D:\RJAZ\Sdk\platform-tools\adb.exe"
py -3.12 test_local.pyExample of normal output:
{
"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" }
}If recommendations indicates missing configuration, create devices.json as described above.
MCP Tools
Tool | Description |
| Diagnose adb, SMS readability, and whether |
| List connected ADB devices |
| Read phone numbers for the current serial from |
| Read the most recent N SMS messages |
| After clicking send verification code on the Web, poll and wait for a new OTP |
| On Android 11+, attempt to grant shell permission to read SMS |
| Restricted adb shell (whitelisted commands) |
Typical Agent Flow (SMS Login)
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: 填入验证码并登录When SMS Cannot Be Read
adb shell appops set com.android.shell READ_SMS allowOr call adb_grant_sms_permission in the Agent, then run adb_health_check.
If it still fails, MCP will attempt to fall back to reading SMS from the notification bar via dumpsys notification (lower precision).
Security Notes
Only reads SMS from locally connected USB devices
Does not persist SMS content to disk
devices.jsoncontains phone numbers and is in.gitignore; do not commit it to a public repositoryadb_shellonly allows whitelisted commands such as content / dumpsys / getpropRestricted to your own devices or authorized test scenarios
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