# How do I test an iOS app with Claude Code, Cursor or Codex?

The MCP config for Claude Code, Cursor and Codex, a bounded test prompt for an iOS simulator in the cloud, the tool calls the agent makes and what a check costs.

By [Mustafa Yenler](https://mobilebox.dev/about?via=md#mustafa) [LinkedIn](https://www.linkedin.com/in/mustafa-yenler) Updated 22 November 2026

Guides4 min read

In this article

Add the Mobilebox MCP server, https://mobilebox.dev/mcp, to the client with your API key read from the environment, then give the agent one bounded prompt: create an iOS simulator, install your simulator build, walk one flow, check one visible outcome and delete the simulator. It works the same in Claude Code, Cursor and Codex, on a Mac or not, because the iPhone simulator runs in the cloud at $0.03 a minute.

Client documentation reviewed on November 22, 2026: [Claude Code MCP](https://code.claude.com/docs/en/mcp), [Cursor MCP](https://cursor.com/docs/context/mcp) and [Codex MCP](https://developers.openai.com/codex/mcp). We make Mobilebox; the same server gives the agent [cloud Android phones](https://mobilebox.dev/docs?via=md) too.

## The key

Sign up at [mobilebox.dev/signup](https://mobilebox.dev/signup?via=md) and create a key in the dashboard, or paste "Set up Mobilebox for me: read https://mobilebox.dev/setup.md and follow it." into the agent and let it get one. Put the key in your shell profile as `MOBILESANDBOX_API_KEY` and open a new terminal, so the client inherits it. Never paste it into a chat or a committed file.

## Claude Code

One command, for you alone:

```
claude mcp add --transport http mobilebox https://mobilebox.dev/mcp \
  --header "Authorization: Bearer $MOBILESANDBOX_API_KEY"
```

Or a `.mcp.json` in the repository that the whole team shares. Claude Code expands `${VAR}` there, so the file holds no secret; leave out `"type": "http"` and the entry is skipped:

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

## Cursor

`~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` in one repository:

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

Or one click with no key: [Add to Cursor](https://cursor.com/install-mcp?name=mobilebox&config=eyJ1cmwiOiJodHRwczovL21vYmlsZWJveC5kZXYvbWNwIn0%3D) installs the entry with the URL alone, and Cursor signs you in over OAuth in the browser.

## Codex

`~/.codex/config.toml`, read by the CLI and the IDE extension:

```
[mcp_servers.mobilebox]
url = "https://mobilebox.dev/mcp"
bearer_token_env_var = "MOBILESANDBOX_API_KEY"
```

## Get the build where the simulator can reach it

The simulator takes a simulator build: a .zip of your app’s `.app` folder, built for an iOS Simulator in Xcode (`Products/Debug-iphonesimulator/YourApp.app`). `install_app` takes a direct download URL, such as a release asset or a presigned storage link. A coding agent with a shell can upload a file from disk instead, with one `curl --data-binary` to the phone’s `/apps` endpoint; the [iOS simulator API](https://mobilebox.dev/blog/ios-simulator-api?via=md) shows the call. No Mac on hand: a [macOS CI runner can make the build](https://mobilebox.dev/blog/ios-simulator-without-a-mac?via=md).

## The prompt

Give the agent the build, one flow, one expected screen and the cleanup rule, all at once:

```
Use the Mobilebox MCP tools to test the sign-up screen of my iOS app.
1. create_phone with platform "ios" and name "signup-check".
2. install_app with https://example.com/builds/YourApp.zip.
3. Observe the first screen and list the text on it.
4. Tap "Sign up", type test+1@example.com into the email field, tap "Continue".
5. Pass only if the next screen shows "Check your email". Take a screenshot either way.
6. If a step fails, read app_logs for the app's bundle id and quote the last error lines.
7. delete_phone at the end, even if a step failed. Don't change any code.
```

Swap in your URL, your flow and the text you expect. One outcome per prompt keeps the report checkable: the agent says what it saw, and the screenshot shows it.

## What the agent calls

1. `create_phone {"platform": "ios", "name": "signup-check"}` returns the simulator’s id and its first screen as numbered elements, in about 2 s in our runs.

2. `install_app {"phone_id": "…", "url": "…"}` answers with the bundle id from your Info.plist, and the app opens.

3. `observe` lists every element as `[ref] type "text" (x,y)`.

4. `act` runs the taps and the typing in one batch, stops at the first failure and returns the new screen.

5. `screenshot` returns the PNG; `app_logs` reads your app’s own log lines when something breaks.

6. `delete_phone` ends the bill.

To watch while it works, ask for `watch_phone`: it returns a short-lived link to the simulator’s screen, live. For a pull request, `record_screen` and `publish_proof` turn the run into a comment with screenshots and an MP4 link. The [agent guide](https://mobilebox.dev/docs/agents?via=md) covers the observe, act, verify loop.

## What it costs

$0.03 a minute, billed per second with a one-minute minimum. A 5-minute check like the one above costs $0.15; a hundred of them, $15. New workspaces get free credit, and the same key runs Android checks at $0.01 a minute. More on the [hosted iOS simulator MCP server](https://mobilebox.dev/ios-simulator-mcp?via=md).

[Mustafa Yenler](https://mobilebox.dev/about?via=md#mustafa) is the founder of fifteenA and builds Mobilebox, from Berlin and San Francisco. [LinkedIn](https://www.linkedin.com/in/mustafa-yenler)

## 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=ios-app-testing-claude-code-cursor-codex and follow it.
```

[What your agent reads](https://mobilebox.dev/setup.md?via=ios-app-testing-claude-code-cursor-codex)

In this article

[All articles](https://mobilebox.dev/blog?via=md)

## Next question

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