Preview your APK build from Windsurf: Cascade gets a phone

Cascade is at its best on whole features — ten files edited in flow, the terminal run, the summary written. Then comes the sentence it can't back up: "the app should now work." It has never seen the app. Windsurf ships no Android device, so the result of all that flow is an APK nobody runs until a human finds a phone. PreviewAPK gives Cascade the missing half of the loop: a cloud phone it connects over MCP, pushes builds to, drives, and screenshots — then hands to you.

Try it with a live device

PreviewAPK is in private beta. Get early access to test your own builds.

Flow state, blind ending

An agentic editor earns its keep by closing distance between intent and running software. For Android work in Windsurf, the last stretch stays open: Cascade can assemble the build, but it cannot install it, navigate it, notice the button that renders off-screen, or read the stack trace from the crash on launch. Its feedback loop ends at a successful compile — and a successful compile is where Android bugs begin, not where they end.

The hand-rolled fix is a local emulator driven through adb. On a good machine it works until it doesn't: SDK updates, image downloads, a laptop that sleeps mid-run, and at the end still no session anyone else can open. A flow deserves a better ending than "works on my emulator."

Connect PreviewAPK to Windsurf (2 minutes)

  1. Get the server file: curl -o previewapk_mcp.py https://previewapk.siteport.site/mcp/previewapk_mcp.py
  2. Get an API key from your PreviewAPK portal (API keys → create). Free during the private beta — join the waitlist.
  3. Add the server to mcp_config.json — open it from the Cascade panel (MCPs → Open MCP config file); the file lives at ~/.codeium/windsurf/mcp_config.json (current Devin Desktop builds: ~/.config/devin/mcp_config.json):
    {
      "mcpServers": {
        "previewapk": {
          "command": "python3",
          "args": ["/path/to/previewapk_mcp.py"],
          "env": { "PREVIEWAPK_API_KEY": "<your key>" }
        }
      }
    }
  4. Save and hit Refresh in the MCP panel. Seventeen tools appear for Cascade — listed in full in the MCP reference.

Let Cascade finish the feature, not just write it

Build the debug APK, push it to PreviewAPK, and test the
new onboarding flow end to end. Screenshot each screen,
read the logs if anything fails, fix and rebuild until
it's clean — then give me the preview link.

The phone boots the build in seconds. From there Cascade tests with the same senses a human tester uses:

That turns Cascade's summary into evidence: the screenshots are in the chat, the failures came with logs attached, and the fix was verified on a rerun — the full agent testing loop, inside Windsurf.

Then the phone is yours

Cascade ends by handing control to you and returning the session's share link. Open it in any browser: same device, same build, same session it just tested — yours to drive from the portal, or to forward, view-only, to a client or teammate. No Android Studio, no SDK, no install on their side either.

Prefer the terminal? The CLI drives the same phone from Windsurf's integrated terminal, no MCP needed. And the identical server connects in Cursor and Antigravity — one phone, every editor.

FAQ

Can Cascade test an Android app by itself?

Not out of the box. Cascade can write and edit code across your project and run terminal commands, but Windsurf has no Android device: nothing installs an APK, taps through the app, or shows Cascade a screenshot of what it built. Developers sometimes wire a local emulator to it by hand — SDK, machine always on, no shareable session. PreviewAPK gives Cascade a cloud phone through one MCP server instead.

Where does the PreviewAPK MCP server go in Windsurf?

In mcp_config.json — ~/.codeium/windsurf/mcp_config.json for Windsurf (current Devin Desktop builds keep it at ~/.config/devin/mcp_config.json). Open it from the Cascade panel's MCPs section (Open MCP config file), add the previewapk entry from this page, save, and hit Refresh.

What does Cascade need before it can preview?

A built APK — Gradle debug builds land at app/build/outputs/apk/debug/app-debug.apk, and EAS or release builds work too — plus a PreviewAPK account with an API key from the portal. Building, pushing, and previewing then happen in one flow.

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 Windsurf or Cognition?

No. PreviewAPK is an independent product. Windsurf and Cascade are trademarks of their respective owners; this page describes a workflow that connects the two, nothing more.