termux-phone-mcp
Provides tools for reading an Android device's model, system info, battery status, thermal, network, resources, and controlling brightness and volume.
Enables detection and management of real Docker Compose environments on the device, with clear reporting when Docker is not available.
Supports deploying and removing proot-distro Linux environments, listing available environments, and executing commands inside them.
Enables detection and management of real Podman Compose environments on the device, with clear reporting when Podman is not available.
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., "@termux-phone-mcpWhat's my current battery level and temperature?"
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.
Termux Phone MCP
把 Android 手机和 Termux 能力通过本机 Streamable HTTP MCP 提供给 RikkaHub。服务只监听 127.0.0.1,默认使用随机 Bearer Token。
能做什么
读取机型、Android/内核/SoC、CPU、内存、存储、温度、网络和 Termux 可见进程。
读取电池电量、健康、温度、电压、电流、循环次数,并进行 2-30 秒整机功率采样。
安装 Termux 软件包,部署/删除
proot-distroLinux 环境。检测并管理设备上真实存在的 Docker/Podman Compose;没有运行时就明确报告,不把 PRoot 当 Docker。
调整亮度和音量。
可选授予模型 Termux 或 PRoot 任意命令权限。
Related MCP server: DeepADB
Android 的硬边界
普通非 root Termux 无法可靠读取其他 App 的 CPU/内存、逐 App 耗电或完整
dumpsys batterystats。phone_sample_power是 BatteryManager 电流 × 电压的整机趋势估算,适合比较调整前后,不是逐 App 电量归因。PRoot 是用户态 Linux 文件系统,不是真正容器。Docker/Podman 通常需要 root、内核 namespace/cgroup 支持或特制系统。
一条命令安装
先安装官方 Termux。为读取电池、Wi-Fi、亮度和音量,还要安装与 Termux 同来源签名的 Termux:API APK。然后在 Termux 运行:
curl -fsSL https://raw.githubusercontent.com/188zjl/termux-phone-mcp/main/install.sh | bash安装程序会:
安装 Node.js、Termux:API 命令、PRoot 等依赖;
安装到
~/.local/share/termux-phone-mcp;生成
~/.config/termux-phone-mcp/.env和随机 Token;启动服务并打印 RikkaHub 配置;
写入 Termux:Boot 启动脚本(需要另装 Termux:Boot 才会在开机后生效)。
建议在 Android 设置中取消 Termux 的电池优化,否则系统可能在后台杀掉服务。服务不持续轮询,只有模型调用工具时才采样;是否常驻的主要开销来自 Node/Termux 后台进程。
RikkaHub 接入
安装结束会直接打印以下四项,也可随时运行 phone-mcp show-config 查看:
类型:
Streamable HTTPURL:
http://127.0.0.1:8765/mcpHeader:
AuthorizationValue:
Bearer <安装时生成的 Token>
在 RikkaHub 新增 MCP 后同步工具。若旧聊天没有出现工具,新建聊天或重启 RikkaHub。Android 弹出“本地网络”权限时需要允许。
这些工具建议在 RikkaHub 开启“每次审批”:
phone_install_packagesphone_install_prootphone_remove_prootphone_exec_prootphone_run_termux_commandphone_manage_composephone_set_brightnessphone_set_volume
权限档位
默认:读取能力开启、有限写操作开启、任意命令关闭。
# 开启完整 Termux/PRoot 命令权(高权限)
phone-mcp enable-commands
# 关闭任意命令
phone-mcp disable-commands
# 关闭所有有限写操作
phone-mcp disable-actionsphone_run_termux_command 相当于把 Termux 用户的文件与进程权限交给模型。它仍不是 Android root;只有设备本身已有 root 且 Termux 可调用 su 时,才可能进一步获得系统权限。
日常命令
phone-mcp status
phone-mcp restart
phone-mcp logs
phone-mcp show-config更新时重新执行同一条安装命令即可;本机 .env 和 Token 会保留。
工具清单
共 16 个工具:
只读:
phone_get_overview、phone_get_battery、phone_sample_power、phone_get_resources、phone_get_thermal、phone_get_network、phone_get_capabilities、phone_list_environments有限写入:
phone_install_packages、phone_install_proot、phone_remove_proot、phone_manage_compose、phone_set_brightness、phone_set_volume高权限命令:
phone_exec_proot、phone_run_termux_command
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
- FlicenseAqualityCmaintenanceA MCP server that enables AI assistants to control Android devices via ADB, supporting device info, screen control, input simulation, app management, shell execution, file transfer, and UI parsing.Last updated20
- AlicenseBqualityAmaintenanceA comprehensive MCP server that enables AI agents to interact with Android devices through Android Debug Bridge (ADB), offering 198 tools for device control, app management, diagnostics, and more.Last updated1003413Apache 2.0
- AlicenseCqualityDmaintenanceAn MCP server for real-device Android reversing workflows, wrapping AlgorithmAide config writes, AppSwitch/logList sync, LSPosed scope sync, Frida script injection, and runtime log queries into a stable MCP toolset.Last updated2311MIT
- Alicense-qualityCmaintenanceEnables MCP-compatible agents to control an Android device over the network via ADB, providing tools for shell commands, screen capture, UI inspection, file operations, and input simulation.Last updated26MIT
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP (Model Context Protocol) server for Appwrite
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/188zjl/termux-phone-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server