
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 分