Android MCP server exposing device tools over HTTP.
运行在 Android 手机上的本地 Model Context Protocol (MCP) 服务器。通过 Streamable HTTP 协议向 Claude Desktop、Cursor 等 MCP 客户端暴露手机能力:文件操作、系统管理、设备信息、应用管理、脚本执行、通讯交互、网络请求、实用工具等。
[!IMPORTANT] 本项目实现的是 MCP 服务端,运行在被控的 Android 设备上;MCP 客户端运行在 PC 或另一台设备,通过局域网或内网穿透与之通信。
- 核心特性 - 工作原理 - 工具清单 - 客户端接入 - 权限说明 - 致谢 - 许可证
- 标准 MCP 协议:实现 Streamable HTTP 传输(POST /mcp,JSON-RPC 2.0),同时兼容 SSE(GET /sse)。 - 可选 Bearer 鉴权:自动生成 16 位 token,支持开关;未启用时任意局域网客户端均可连接。 - 工作区沙箱:通过系统文件夹选择器(SAF)限定文件操作根目录,避免越权访问。 - 桥接远端 MCP:可将远端 MCP 服务(Streamable HTTP)的工具拉取到本地,合并为单一端点。 - 内网穿透:基于 bore.pub 协议,一键将本地端口暴露到公网。 - 悬浮窗控制:可选悬浮窗快捷开关服务器;支持开机自启动。 - 特权命令:集成 Shizuku,在已授权设备上以 shell 权限执行 am、pm 等命令。 - 内置 JavaScript 引擎:基于 QuickJS(ES2020),提供 mcpjavascript 工具执行脚本自动化。 - 前台服务保活:FOREGROUNDSERVICETYPEDATASYNC 与可选 WakeLock,确保长时间后台运行。
应用以 Android 前台服务(McpServerService)持有 McpHttpServer,在本地端口监听 HTTP 请求。收到符合 MCP 规范的 JSON-RPC 消息后,由 McpHandler 分发到 ToolKit,再路由至各 ToolDefinition 的处理函数,并将结果以 JSON 或 SSE 形式返回。
方法 路径 说明 -------- ------------------- --------------------------------------------- POST /mcp 主 JSON-RPC 入口(Streamable HTTP) GET /sse Server-Sent Events 长连接 GET /tools 列出所有已注册工具(含桥接工具) GET /info、/meta 服务器元信息(端口、协议版本、能力) GET /、/status 可读运行状态 GET /health 健康检查与运行时长
服务器实现的 JSON-RPC 方法包括 initialize、notifications/initialized、ping、tools/list、tools/call、resources/list、prompts/list 等。
服务器启动时由 ToolKit.init 注册以下内置工具。所有工具均返回 JSON 对象;返回错误时填充 isError: true 并附带标准化错误码(详见 ErrorCodes.kt)。
工具名 说明 ----------------- --------------------------------------------------------------------- appinfo 获取单个应用的包名、版本、安装时间、UID、target/minSdk 等元信息 stopapp 强制停止指定应用;Shizuku/root 下走 am force-s
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/Cazriel--mcp-server.html)
Open-source, multi-platform harness for AI agents — a native, multi-threaded operator's console (JVM, not Electron) to run Claude Code, Codex, Gemini or OpenCode with a real browser, terminal, editor,
mutonby/agentringLet your AI agents call your phone over VoIP, and call them back. Your phone rings like a real call, even locked; a voice AI talks it through and returns the transcript. Self-hosted, open source, no p
kilolonion/agent-vscreenA background virtual screen for any Android AI agent: it operates apps on an invisible display while you keep using your phone. CLI / MCP / HTTP, Shizuku, no root. 给任何手机 agent 用的后台副屏。
bilieebiliee1-design/SOMCPAndroid-native SO reverse engineering MCP server
lolifamily/Minecraft-MCPIn-process MCP server + Kotlin REPL for Minecraft.
oroplex/ponyPony is the hands, you pick the brain. Let Claude, Grok, Gemini or any MCP agent use your Android phone.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.