
PreviewAPK
io.github.livetaubPublished by GitHub account livetaubv1.1.1Updated Nov 6, 2026
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Overview
Gives an AI agent a hosted cloud Android phone to push APKs to, drive with taps and text, and verify with screenshots and logs.
- What you can do
- Manage devices: list devices, select a working device, start and stop sessions, get share links, reboot, set timezone, locale and mock GPS.
- Install and run apps: push an APK (hot-swapping a running device), relaunch the app, push and pull files in shared storage.
- Drive the screen: tap by coordinates, label or snapshot reference, swipe, send keys, type text, run batched actions, wait for elements.
- Inspect results: read the UI element hierarchy, take screenshots, capture an observe snapshot, read session logs and filtered logcat errors, record and download an MP4.
- Hand off to a human: request a human step such as a password or 2FA code, hand over the driver role, and file a session wrap-up.
- When to use it
- Useful when an agent builds or tests an Android app but has no emulator or physical device available, and needs to see the app run, exercise its UI and check logs before handing it over. Also fits teams that want a shareable live view of a test session for clients or pull requests.
- Requirements
- A PreviewAPK account and API key (starts with pvk_) from the portal's Developers card, supplied as the PREVIEWAPK_API_KEY environment variable for the local stdio server or as an Authorization Bearer header for the hosted endpoint. The local server is a single Python 3 script using only the standard library; the hosted option needs no install. The service is a paid hosted product currently in waitlist beta.
Installation
In SourceWeft
- Open PreviewAPK in the dashboard and add it to a workspace.
- Connect Authorization token credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.livetaub%2Fpreviewapk/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config.
{
"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.
Source: README.md at commit 25123a7
Tools
0Version history
4- v1.1.1LatestOct 23, 2026
- v1.1.0Oct 23, 2026
- v1.0.5Oct 23, 2026
- v1.0.0Oct 22, 2026
Score
85% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts