Preview your APK build from Cline: the autonomous agent gets a phone
Cline doesn't wait for instructions — it plans, edits, runs the build, fixes the errors, and reports back. For Android apps the report has a hole in it: the build passed, but nobody ran the app. Cline has browser tools for web work and terminal tools for everything else, yet no way to install an APK and see what it does. PreviewAPK is the missing tool: a cloud phone Cline connects over MCP, so an autonomous build ends with an autonomous test — and proof.
Try it with a live device
PreviewAPK is in private beta. Get early access to test your own builds.
Autonomous code, unverified apps
The whole point of Cline is the loop: act, observe, correct. On an Android project the loop breaks at the last step. It can observe the compiler and the file system, but the app itself — the screens, the taps, the crash on the third screen — is unobservable. So the loop closes on a proxy (it compiles, therefore it works), and the human inherits the actual verification, later, on a physical phone, one bug at a time.
A local emulator on the dev machine narrows the gap for exactly one setup: yours, while it's awake, with the SDK installed and enough RAM to spare. It gives Cline no shareable session, no link for the PR, and no device at all in a remote or CI environment.
Connect PreviewAPK to Cline (2 minutes)
- Get the server file:
curl -o previewapk_mcp.py https://previewapk.siteport.site/mcp/previewapk_mcp.py - Get an API key from your PreviewAPK portal (API keys → create). Free during the private beta — join the waitlist.
- Add the server: in the Cline panel, click the MCP Servers icon → Configure MCP Servers (that's
cline_mcp_settings.json), and add:{ "mcpServers": { "previewapk": { "command": "python3", "args": ["/path/to/previewapk_mcp.py"], "env": { "PREVIEWAPK_API_KEY": "<your key>" }, "disabled": false, "alwaysAllow": [] } } } - Save. Seventeen PreviewAPK tools join Cline's toolset — full list in the MCP reference. Tip: add the read-only ones (screenshot, logs, hierarchy, status) to
alwaysAllowso verification runs don't stall on approvals.
Give Cline the whole task
Implement the profile screen, build the APK, and verify it
on PreviewAPK: open the screen, screenshot it, fix anything
that looks off, and check the logs for errors. When it's
clean, hand me the preview link.
Cline picks its working device, pushes the build — the phone boots it in seconds — and verifies with real senses:
- Drive: tap (by coordinates or by a button's label), swipe, hardware keys, and real text typing.
- See: screenshots returned as images inside the conversation, plus the live screen streamed to a browser.
- Understand: the screen's UI hierarchy — elements with labels and positions, so it navigates by meaning, not pixel-guessing.
- Hear: the app's debug log for the session, including the crash trace with its reason attached.
Now the loop closes where it should: the agent that changed the code is the agent that watched the app run — the full agent testing loop, inside Cline's autonomous runs.
You get the same phone
The run ends with a handoff, not a claim: Cline returns the session's share link and gives you the wheel. Open the link and the exact session it verified is in your browser — yours to drive from the portal, or to forward, view-only, to whoever the app is for.
Same server in the other editors: Cursor, Copilot, Antigravity, Windsurf.
FAQ
Can Cline test an Android app by itself?
Not out of the box. Cline is unusually hands-on — it edits files, runs terminal commands, even drives a browser through its built-in tools — but it has no Android device. Nothing in Cline installs an APK, taps through a native app, or pulls its logs. The usual bridge is a local emulator on the same machine: SDK installed, heavy, and silent the moment the laptop sleeps. PreviewAPK gives Cline a cloud phone through MCP instead.
Where does the PreviewAPK MCP server go in Cline?
In Cline's MCP settings file, cline_mcp_settings.json — open the Cline panel, click the MCP Servers icon, and choose Configure MCP Servers. Add the previewapk entry from this page with your API key in its env block, save, and the tools appear in Cline's MCP list.
Cline can run terminal commands — can it just use the CLI instead?
Yes, and that's a legitimate setup: PreviewAPK also ships a CLI (and a raw API), and Cline can run previewapk push / tap / shot in the terminal today. MCP is the better door for an autonomous agent, though — typed tools instead of shell parsing, and screenshots that come back as images Cline can actually look at.
What does Cline need before it can preview?
A built APK — Gradle debug builds land at app/build/outputs/apk/debug/app-debug.apk; EAS and release builds work too — and a PreviewAPK account with an API key (Portal → API keys). Then building, pushing, and testing happen in one autonomous run.
How much does it cost?
A flat $19/month per device — unlimited runs, no per-minute metering. One device runs one app at a time; swap apps freely while it's off.
Is PreviewAPK affiliated with Cline?
No. PreviewAPK is an independent product. Cline is a trademark of its respective owner; this page describes a workflow that connects the two, nothing more.