Preview your APK build from Cursor: give the agent a phone

Cursor's agent will happily write a whole Android app for you — screens, navigation, state, the lot. Then it stops at the one thing it cannot do: run it. The build compiles, the agent declares victory, and the first human to actually see the app is you, later, somewhere else. PreviewAPK closes that loop inside Cursor: a cloud phone the agent pushes builds to, drives, and screenshots — over MCP, without leaving the editor.

Try it with a live device

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

The blind spot in the Cursor workflow

Agent mode is a genuine way to build Android apps now — Kotlin, Jetpack Compose, React Native, Flutter-through-the-terminal. But every one of those stacks ends at an APK, and Cursor has no device on the other side of it. The agent can't tell a broken layout from a perfect one, can't feel a dead button, can't read the crash log it caused. Its only feedback is the compiler, and the compiler is an optimist: everything it accepts "works."

The usual patch is a local Android emulator the agent pokes through adb scripts. It sort of works, on a machine with the SDK installed and enough RAM, while it's on, for the person sitting at it. There's no link to hand a teammate, no session a client can open, and when the laptop sleeps the test lab sleeps.

Connect PreviewAPK to Cursor (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 .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
    {
      "mcpServers": {
        "previewapk": {
          "command": "python3",
          "args": ["/path/to/previewapk_mcp.py"],
          "env": { "PREVIEWAPK_API_KEY": "<your key>" }
        }
      }
    }
  4. Toggle it on under Settings → Tools & MCP, and switch the chat to Agent mode — MCP tools only run there.

Seventeen tools appear, from previewapk_push_apk to previewapk_screenshot. The full list lives in the MCP reference.

Then just ask, in Cursor's chat

Build the debug APK, push it to PreviewAPK, and run the
checkout flow. Screenshot every step. If anything looks
wrong, read the logs, fix it, and rebuild. When it's
clean, hand me the preview link.

The agent picks its working device, pushes the build — the phone boots it in seconds — and works the app the way a tester would:

When it breaks something, the log tells it why; when it fixes something, the next screenshot proves it. This is the agent testing loop, running inside the editor you already use.

You get the same phone

The end of the loop isn't a claim, it's a link. The agent hands control to you and returns the session's share link: open it and you're looking at the exact session it just verified — tap through the flow yourself in the portal, or forward the link to the client whose app it is. View-only for them, drivable for you and your agent, never the other way around.

Driving from a terminal instead? The same account works through the CLI — Cursor's agent can run it in the integrated terminal without any MCP setup. Same phone, three doors. Agents in other editors get the same deal: Antigravity and Windsurf connect the identical server.

FAQ

Can Cursor's agent test an Android app by itself?

Not out of the box. Cursor's agent can write code and run terminal commands, but it has no phone: nothing in Cursor installs an APK on a device, taps through it, or shows the agent a screenshot of the result. People bridge the gap with a local emulator wired up by hand — an SDK to install, a machine that has to stay on, and still no session you can open or share. PreviewAPK is that bridge as a service: one MCP server, and the agent has a cloud phone.

Where does the PreviewAPK MCP server go in Cursor?

In .cursor/mcp.json in your project root (just this project) or ~/.cursor/mcp.json (every project). Add the previewapk entry from this page, put your API key in its env block, and toggle the server on under Settings → Tools & MCP. MCP tools run in Agent mode.

What does the agent need before it can preview?

A built APK — for a Gradle project that's usually app/build/outputs/apk/debug/app-debug.apk after a build, and EAS or release builds work too — and a PreviewAPK account with an API key (Portal → API keys). The agent builds, pushes, and previews 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 Cursor or Anysphere?

No. PreviewAPK is an independent product. Cursor is a trademark of Anysphere; this page describes a workflow that connects the two, nothing more.