Preview your APK build with GitHub Copilot: agent mode gets a phone

Copilot's agent mode will build you an Android app end to end — project scaffold, screens, a terminal full of Gradle output. Then it hits the wall every agent hits: it cannot run the thing. The APK compiles, the agent reports success, and the app's first real run happens later, on someone's phone, with someone else's time. PreviewAPK connects Copilot to a cloud phone over MCP, so the loop closes where the code is written.

Try it with a live device

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

The blind spot in the world's most-installed AI editor

VS Code with Copilot is the default setup for a huge share of developers, and its agent mode is genuinely capable — multi-file edits, terminal commands, iterative fixes. For Android work, though, its feedback ends at the compiler. It can't see the layout overflow, the button that does nothing, the crash three screens in. It is, in the precise sense, building blind: every claim about the app's behavior is a guess derived from source code.

The DIY patch — a local emulator the agent drives through adb — works on a well-specced machine that never sleeps, for the one person sitting at it. There's no link for the teammate reviewing the PR, no session for the client, and no device at all when the laptop is closed.

Connect PreviewAPK to VS Code (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 .vscode/mcp.json — mind VS Code's own dialect: a servers key (not mcpServers), and "type": "stdio" on the entry:
    {
      "servers": {
        "previewapk": {
          "type": "stdio",
          "command": "python3",
          "args": ["/path/to/previewapk_mcp.py"],
          "env": { "PREVIEWAPK_API_KEY": "<your key>" }
        }
      }
    }
  4. Click Start on the server in the mcp.json editor, then switch Copilot Chat to agent mode. Seventeen PreviewAPK tools appear — the full list is in the MCP reference.

Ask for the whole job, not just the code

Build the debug APK, push it to PreviewAPK, and test the
new settings screen. Screenshot it before and after your
changes, read the logs if anything fails, and when it's
clean, hand me the preview link.

The agent selects its working device, pushes the build — the phone boots it in seconds — and tests with real senses:

That's the agent testing loop: the same agent that wrote the feature verifies it on a device, with screenshots as evidence instead of confidence as a substitute.

You get the same phone

At the end, the agent hands control to you and returns the session's share link. Open it in a browser and you're looking at the session it just verified — drive it yourself from the portal, or forward the view-only link to a reviewer or client. The agent drove with a key; links only ever watch.

Other editors, same phone: Cursor, Antigravity, Windsurf, and Cline all connect the identical server.

FAQ

Can GitHub Copilot test an Android app by itself?

Not out of the box. Copilot's agent mode can edit code and run terminal commands in VS Code, but it has no phone: nothing installs an APK on a device, taps through it, or shows the agent a screenshot of the result. Developers bridge the gap with a hand-wired local emulator — SDK installed, machine always on, no session to 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 VS Code?

In .vscode/mcp.json in your workspace (or your user MCP configuration). Note VS Code's format differs from most MCP clients: servers sit under a "servers" key, and a local server needs "type": "stdio" next to its command. The exact block is on this page; after saving, click Start on the server entry in the mcp.json editor, and use it in Copilot's agent mode.

What does the agent need before it can preview?

A built APK — for a Gradle project usually app/build/outputs/apk/debug/app-debug.apk, 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.

Does this also work with the Copilot coding agent on GitHub?

The coding agent runs in GitHub's cloud, where a stdio server on your machine can't follow. For cloud runs, the same PreviewAPK account is reachable through its HTTPS API and CLI from any environment with your API key — the /docs/ci/ recipes show the pattern. Locally in VS Code, MCP is the native door.

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 GitHub or Microsoft?

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