
PreviewAPK
io.github.livetaub由 GitHub 账号 livetaub 发布v1.1.1更新于 Nov 6, 2026
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
概览
为 AI 智能体提供一台云端 Android 手机:推送 APK、操作界面,并用截图和日志验证结果。
- 可以做什么
- 管理设备:列出设备、选定工作设备、启动与停止会话、获取分享链接、重启、设置时区、应用语言和模拟 GPS 位置。
- 安装与运行应用:推送 APK(对运行中的设备热替换)、重新启动应用、在共享存储中推送和拉取文件。
- 操作屏幕:按坐标、标签或快照引用点击,滑动、发送按键、输入文本、批量执行动作、等待元素出现。
- 查看结果:读取 UI 元素树、截图、获取观察快照、读取会话日志与过滤后的 logcat 错误、录制并下载 MP4。
- 交由人工处理:请求人工完成密码或两步验证等步骤、移交操作权,并提交会话总结。
- 适用场景
- 适合智能体开发或测试 Android 应用但没有模拟器或实体设备、需要实际运行应用、操作界面并查看日志的场景。也适合需要把测试会话的实时画面以链接分享给客户或放进 PR 的团队。
- 运行要求
- 需要 PreviewAPK 账号和 API 密钥(以 pvk_ 开头,来自门户的 Developers 卡片):本地 stdio 服务通过环境变量 PREVIEWAPK_API_KEY 提供,托管端点通过 Authorization Bearer 请求头提供。本地服务是仅用 Python 标准库的单文件脚本;托管方式无需安装。该服务为付费托管产品,目前处于候补测试阶段。
安装
在 SourceWeft 中
- 打开 控制台中的 PreviewAPK,将其添加到工作区。
- 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.livetaub%2Fpreviewapk/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"previewapk": {
"type": "http",
"url": "https://previewapk.siteport.site/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
PreviewAPK — a phone for your AI agent
Your agent builds an Android app, and then… neither of you can see it run. No emulator on the machine, no device on the desk, and the Play Store is not a feedback loop.
PreviewAPK gives your agent a real cloud Android phone. Push an APK, it boots in the browser in seconds. The agent drives it — taps, types, screenshots, logs — and verifies its own work before you ever look. You watch the same phone through a link, take the wheel whenever you want, and every session gets a share link you can hand to a client or paste into a PR.
- $19/month per device, unlimited runs. One device runs one app at a time; swap apps freely.
- Links are view-only, always. Only the owner's key (agent) or the owner in the portal drives — one driver per session, switchable mid-session with an explicit handoff.
- No Google Play services on the phones. Apps that need Google sign-in, Maps, or FCM will hit that wall; everything else just runs.
This repo is the open client: the CLI and the MCP server (both single-file, Python standard library only). The PreviewAPK service itself is hosted — you bring an API key from your account at previewapk.dev. PreviewAPK is currently in waitlist beta; join there.
Quick start — CLI
Pushing to a running device hot-swaps the app in — installed and relaunched in the same session, no reboot.
Coordinates are fractions (0–1), never pixels; the CLI and API reject
out-of-range values instead of silently tapping the wrong place, and
text refuses when no field is focused instead of typing into the void.
Signals an agent can trust: errors say what happened and what to do
instead.
Quick start — MCP server
Hosted (zero install): point your MCP client at the remote server — same 27 tools, your API key as a Bearer token, nothing to download or keep current. Claude Code:
The server issues a session id at connect and your working-device
selection rides on it, exactly like the local server. Hosted
differences: previewapk_push_apk takes apk_b64 (base64) instead of
a local path; file/record downloads return data_b64.
Local (stdio): download previewapk_mcp.py from this repo, then
register it with your MCP client. Claude Code:
Cursor / Claude Desktop / other MCP clients (JSON config):
27 tools: list/use devices, push (hot-swaps a running device), start, stop, links, tap by coordinates, by label, or by snapshot ref, swipe, key, type text, relaunch, screenshot (returns a real image, from the framebuffer — it agrees with the hierarchy), UI hierarchy, observe (a compact numbered screen snapshot), act (batched actions), wait_for (elements — or the handback, with condition "driver"), request_human (ask the human for a step only a human should do: a password, a 2FA code, a payment approval — and get back the exact message to relay), finish (file the session wrap-up; the counts in its message — duration, actions, errors — are composed by the server, and finishing does not stop the session unless asked), session logs, handoff, a field-report tool, screen recording (start/stop/download an MP4 of the session), and device controls (timezone, per-app locale, mock GPS location, file push/pull in shared storage, reboot).
The working-device model mirrors the CLI: an agent session selects a
device once (previewapk_use_device or previewapk_start), then works
on it without repeating its name. Nothing has a default device — an
action with no device selected refuses, so a build can never land on the
wrong phone by assumption.
How agents should drive
Navigate and assert with the hierarchy (element tree: class, label, center, state flags) — fast, cheap, exact. Verify visuals with a screenshot. Read the logs after actions; a crash's exact reason lives there. Emulator noise (graphics-stack spam from the virtual GPU) is tagged and kept out of errors-only views; copies and downloads are always the full raw log.
Full documentation: previewapk.dev/docs (guides for the API, CLI, MCP, and CI recipes). Agent briefing: previewapk.dev/agents
License
The client tools in this repo are MIT-licensed (see LICENSE). The
PreviewAPK service is a separate, hosted product.
来源:README.md,提交 25123a7
工具
0版本历史
4- v1.1.1最新Oct 23, 2026
- v1.1.0Oct 23, 2026
- v1.0.5Oct 23, 2026
- v1.0.0Oct 22, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分