# GitHub Copilot on Android: a cloud phone in agent mode

One-click install and OAuth in VS Code, the ~/.copilot/mcp-config.json entry with an env-read key, a team .vscode/mcp.json without secrets, a first prompt and its cost.

Guides4 min read

In this article

To give GitHub Copilot’s agent mode an Android phone in VS Code, add the Mobilebox MCP server at https://mobilebox.dev/mcp: one click with the install link below and a browser sign-in, or one entry in `~/.copilot/mcp-config.json` with your API key read from the environment. Copilot then has 14 phone tools: it starts a cloud Android phone, installs your APK, reads the screen, taps, types, takes screenshots and stops the phone.

## One click: install and sign in

[Add Mobilebox to VS Code](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mobilebox%2522%252C%2522type%2522%253A%2522http%2522%252C%2522url%2522%253A%2522https%253A%252F%252Fmobilebox.dev%252Fmcp%2522%257D). VS Code opens the server’s details so you can check the URL before you install. On first use it signs in over MCP OAuth: a browser window opens, you sign in to Mobilebox and choose Allow. No key to copy. The connection shows under API keys in the Mobilebox dashboard, where you can revoke it.

## Or let the agent set it up

Paste this into Copilot Chat in agent mode:

```
Set up Mobilebox for me: read https://mobilebox.dev/setup.md and follow it.
```

It asks for your email, gets a key at once, stores it without printing it and adds the server; the 6-digit code from your inbox keeps the workspace.

## With an API key

Put your key in your shell profile as `MOBILESANDBOX_API_KEY` ([sign up](https://mobilebox.dev/signup) and create one in the dashboard) and start VS Code from a terminal that has it. VS Code now points new servers to the Copilot format: `~/.copilot/mcp-config.json` (or `$COPILOT_HOME/mcp-config.json`), the same file GitHub Copilot CLI reads.

```
{
  "mcpServers": {
    "mobilebox": {
      "type": "http",
      "url": "https://mobilebox.dev/mcp",
      "headers": { "Authorization": "Bearer ${MOBILESANDBOX_API_KEY}" }
    }
  }
}
```

Write the variable with braces. VS Code’s MCP client reads a bare `$MOBILESANDBOX_API_KEY` as literal text, and the header would carry those letters instead of your key.

## For a team: commit the server, not the key

`.vscode/mcp.json` in the repository uses VS Code’s own format, with `servers` and a `type`. Leave the header out and each person signs in over OAuth the first time Copilot uses a phone:

```
{ "servers": { "mobilebox": { "type": "http", "url": "https://mobilebox.dev/mcp" } } }
```

Prompted keys (`${input:…}`) also work in this file, but VS Code doesn’t forward servers that need them to Copilot harness sessions, so OAuth or the environment variable is the safer choice.

## Check it

Run MCP: List Servers from the Command Palette: Mobilebox should be running. In the chat box, the tools button lists its tools. After a run, expand a tool call to see that it went to Mobilebox. Copilot asks before tool calls; Chat: Manage Tool Approval lets you trust some or all of the server’s tools.

Visual Studio, JetBrains and Xcode keep Copilot’s servers in their own `mcp.json` with a `servers` key; GitHub’s docs show the exact shape for each, including where the header goes.

The formats are from VS Code’s [MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration), its [MCP server guide](https://code.visualstudio.com/docs/agent-customization/mcp-servers) and GitHub’s [Copilot MCP docs](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/extend-copilot-chat-with-mcp), reviewed on November 10, 2026. We didn’t run VS Code itself; the endpoint and header are the ones every client on this site uses.

## A first task

```
Start a Mobilebox phone, install the APK at <your APK URL>, walk the sign-up flow, take a screenshot of each step, then stop the phone.
```

Copilot calls `create_phone`, which returns the first screen, then `install_app` with your URL. For each step it calls `act` to tap or type and reads the new screen it gets back, and `screenshot` for the pictures. Stopping is `park_phone`: the phone stops billing and keeps the app and its login for the next run. Say "delete the phone" when you want nothing kept. `watch_phone` gives you a link to watch it work. The mental model: a phone per agent per PR, started, checked, screenshotted, stopped.

## What it costs

A phone costs $0.01 a minute while it is ready, billed per second with a one-minute minimum. Boot time and parked phones are free. On our [November 8 benchmark](https://mobilebox.dev/benchmarks) one tap plus a fresh screenshot took 1.45 s at the median, so most of a run is your model thinking between steps. A sign-up walk that keeps the phone ready for 3 minutes costs 3 cents; our [framework examples](https://mobilebox.dev/integrations) finished their short task in 31 to 38 seconds, about a cent. The [agent guide](https://mobilebox.dev/docs/agents) covers the observe, act, verify loop in full.

## Try it in your agent in 60 seconds

Paste this into Claude Code, Cursor, Codex or any agent that can read a web page. It asks for your email, gets its own key at once and adds the phone tools; the 6-digit code from your inbox keeps the workspace.

```
Set up Mobilebox for me: read https://mobilebox.dev/setup.md?via=github-copilot-android-mcp and follow it.
```

[What your agent reads](https://mobilebox.dev/setup.md?via=github-copilot-android-mcp)

In this article

[All articles](https://mobilebox.dev/blog)

## Next questions

- [How do I add it to Cursor, Codex or VS Code?](https://mobilebox.dev/blog/android-mcp-cursor-codex-vscode?via=next-setup)

- [Can my agent run 50 phones in parallel?](https://mobilebox.dev/blog/run-android-phones-in-parallel?via=next-parallel)

- [Can my agent use an iPhone?](https://mobilebox.dev/ios?via=next-iphone)

- [Can each phone get a residential IP?](https://mobilebox.dev/blog/residential-ip-per-phone?via=next-residential-ip)

- [Does my agent stay logged in between runs?](https://mobilebox.dev/blog/park-resume-android?via=next-logins)

- [Can I watch my agent work live?](https://mobilebox.dev/live-view?via=next-live)

- [What does it cost for a team?](https://mobilebox.dev/blog/mobilebox-pricing-for-teams?via=next-team)

- [How fast do cloud phones start, measured?](https://mobilebox.dev/benchmarks?via=next-benchmarks)
