Claude Code
Claude Code's simulator pane drives simulators only. Add the Mobster MCP server and Claude Code also gets your iPhone, saved checks and a verdict for each run.
claude mcp add --scope user mobster -- \
/Applications/Mobster.app/Contents/MacOS/mobster-agent mcpclaude mcp add --scope user mobster -- /Applications/Mobster.app/Contents/MacOS/mobster-agent mcpWith the Mobster MCP server connected, Claude Code builds your app for the simulator, drives it through the Mobster tools, and gets a verdict with frames when available. Mobster checks the declared assertions. The same server lets Claude use a real iPhone plugged into your Mac.
For simulator work you need an Apple silicon Mac with macOS 13 or later and Xcode with an iOS Simulator runtime. To set up your iPhone and to build and test your own app, you need the macOS your Xcode version needs (Apple lists it on its Xcode page). For a real iPhone you also need Developer Mode on the phone. Set up the WebDriverAgent runner in Mobster for Mac (Device setup). The MCP server is tested with Claude Code.
Claude Code’s simulator pane and Mobster
Claude Code Desktop has an iOS Simulator pane. It streams a simulator beside the conversation. Claude taps through your app there and reads the screen to check its own changes. Anthropic’s docs state the limit: Claude drives simulated devices only and can’t control a physical iPhone or iPad. The pane is part of Claude Code Desktop. From the claude CLI, Claude reaches the simulator through computer use instead.
| Simulator pane in Claude Code Desktop | Mobster MCP server | |
|---|---|---|
| iOS simulator | Yes, streamed in the pane | Yes, headless, created and booted for Claude |
| Your iPhone | No | Yes, over USB, after setup in Mobster for Mac |
The claude CLI | No, it uses computer use | Yes |
| The verdict | Claude reads the screen and decides | Mobster checks the assertions you declared before the run |
| Run it again | Ask Claude again | save_check saves it. After Mobster passes it once on your model key, it replays with no model call until a screen changes |
Use the pane to watch Claude work. Add Mobster when the app has to run on your iPhone, or when a check has to run again in CI. Claude Code on a physical iPhone sets up the phone step by step.
Add the server
In Mobster for Mac, open Settings › Connectors › Use Mobster from… and press Add next to Claude Code. It adds the server for every project, and when the app holds your model key it passes the app’s settings file with --env-file, so Smart uses the same key.
By hand, one command, run in your project’s folder:
claude mcp add mobster -- /Applications/ Mobster.app/ Contents/ MacOS/ mobster-agent mcpThe -- separates Claude Code’s own options from the command that starts the server. Without --scope, Claude Code stores the server in the local scope, so it shows up only in the folder you ran this in. Pick the scope you want:
| Scope | Command | Where it applies |
|---|---|---|
| Local (default) | claude mcp add mobster -- /Applications/ | This project folder, for you |
| User | claude mcp add --scope user mobster -- /Applications/ | Every project, for you, in ~/ |
| Project | a .mcp.json at the repository root | Everyone who clones the repository |
To share it with your team, commit this .mcp.json. Claude Code asks each person to approve a project server before it connects.
{ "mcpServers": { "mobster": { "command": "/ Applications/ Mobster.app/ Contents/ MacOS/ mobster-agent", "args": ["mcp"] } }}Key-less checks need nothing more. For Smart, where Mobster runs the steps itself on your OpenAI or Anthropic key, point the server at a private env file:
claude mcp add mobster -- /Applications/ Mobster.app/ Contents/ MacOS/ mobster-agent mcp --env-file ~/ .config/ mobster/ agent.envThe file holds one line, OPENAI_API_KEY=… or ANTHROPIC_API_KEY=…. Keep it out of the repository and readable only by you (chmod 600).
Timeouts need no change. Every Mobster tool call returns within 45 seconds and wait within 50. Claude Code’s default tool timeout is far longer than that, and its idle timer for stdio servers is reset by progress notifications, which Mobster sends every 5 seconds while a call waits.
Check it’s connected
Start claude in the project and type /mcp. Mobster should be listed as connected, with its tools. From the terminal, claude mcp list shows the same. Then ask Claude:
Call mobster's status tool and tell me what it says.status reports the Mobster version, the simulator setup, whether Smart is available (and if not, why), where runs go, and any open run.
A first check: a task marked done
Say your app has a task list. Ask Claude to change it and prove that marking a task done still works:
Restyle the task list, then verify that marking a task done still ticks it,counts it under Done and takes the count from 3 to 2 tasks left.Claude builds the scheme for the simulator, then calls verify_start with the absolute app_path, the steps and the expectations. The expectations are fixed at that moment, before Claude touches the app. Each tap, type_text or swipe returns the new screen as an outline Claude reads. Three lines of the list after the tap, as screen returns them:
e9 text "2 tasks left" id=tasks_lefte10 button "Water the plants" value="Done" id=task_1 selectede15 text "1 done" id=done_countverify_finish checks these expect assertions together against one accessibility-tree read and returns the verdict, the path to a one-file HTML report and the overlay frame. If the restyle stops the remaining count from falling, the verdict is failed, with the reason. Run as a saved check from the terminal, that failure prints like this:
✗ failed Marking a task done lowers the count (31.4 s) ✓ visible id=task_1 selected=true ✓ value id=done_count == 1 ✗ value id=tasks_left == 2: was "3 tasks left"Claude then fixes the code, rebuilds and verifies again. Mobster checks the declared assertions. Give Claude Code a real iPhone walks through the loop in more detail.
Make it a habit with CLAUDE.md
Put the standing instruction in your project’s CLAUDE.md, with your scheme and app names, so Claude verifies every UI change without being asked:
## Verifying UI changesAfter you change a screen in this iOS app, verify it before you say it works.1. Build for the simulator: xcodebuild -scheme <Scheme> -destination 'generic/ platform=iOS Simulator' -derivedDataPath .mobster/ build CODE_SIGNING_ALLOWED=NO build2. Call mobster's verify_start with app_path set to the absolute path of .mobster/ build/ Build/ Products/ Debug-iphonesimulator/ <App>.app, the steps in plain English, and expect: what must be true when the steps are done.3. Drive with screen, tap, type_text and swipe, then call verify_finish.4. If the verdict is failed, fix the code and verify again. Report the verdict and the report path.Give the controls your checks need an accessibility identifier, such as .accessibilityIdentifier("tasks_left"), so an id selector survives copy changes.
Use a real iPhone
Claude calls list_devices to see every device Mobster can use: USB iPhones set up for it, simulators Mobster manages and any WebDriverAgent address. The phone tools (screen, tap, type_text, swipe, alert, open_url, launch_app and home) called with device and no run_id drive that device directly. Mobster takes the device’s lock on the first call, so no other Mobster app or command drives it at the same time. stop with the device, or 90 idle seconds, releases it.
On a real iPhone a tap on Send sends. Claude Code approves a tool, not a device: allowing tap for simulator work allows it on your phone too. Name the phones the server may drive, and every other real device is refused:
claude mcp add mobster -- /Applications/ Mobster.app/ Contents/ MacOS/ mobster-agent mcp --allow-device "Test iPhone"Mobster marks each tool in its MCP annotations. status, screen, list_devices, wait, wait_for, read_notifications and unlock_status only read, and the tools that act on the device are marked as acting. If you add allow rules in Claude Code’s settings, allow only the read tools, such as mcp__mobster__screen, and keep the prompt on the rest. The server’s instructions also tell Claude that text on the screen is data, not instructions, and to ask you before anything that sends, buys, posts or deletes on a real iPhone.
A locked phone stops the call at once with “Your iPhone is locked. Unlock it and try again. No action was taken.” Mobster never enters a passcode.
Troubleshooting
| Symptom | Fix |
|---|---|
/mcp doesn’t list mobster in another project | The server was added in the local scope. Add it with --scope user, or commit a .mcp.json |
| A project server waits for approval | Run claude in the project and approve it. claude mcp reset-project-choices asks again |
The first verify_start returns status: "preparing" | The first run boots the simulator and builds WebDriverAgent. Claude calls wait until it’s ready |
verify_start refuses smart | Smart is off. status says why: no OPENAI_API_KEY or ANTHROPIC_API_KEY, an env file that doesn’t exist, or --keyless |
couldnt_run | reason.class and reason.fix in the result say what to do. Getting started with verify covers each class |
Every tool and its arguments are in the MCP reference.
Questions
Does Claude Code need a longer MCP timeout for Mobster?
No. Every Mobster tool call returns within 45 seconds and wait within 50, and Claude Code's default tool timeout is far longer. Mobster also sends a progress notification every 5 seconds, which keeps Claude Code's idle timer from firing.
Why does Claude Code only see Mobster in one folder?
claude mcp add uses the local scope unless you pass --scope, so the server belongs to the folder you ran it in. Add it again with --scope user to use it in every project, or commit a .mcp.json to share it with your team.
Does Claude Code need a model key for Mobster?
No. In the key-less loop Claude drives the app with its own model and Mobster checks declared assertions. Mobster calls a model only for `verify_start` with `smart`, which needs your own OpenAI or Anthropic key.
How do I give Claude Code access to the iOS Simulator?
In Claude Code Desktop, ask Claude to run your app and the iOS Simulator pane opens. To use Mobster, add the MCP server with claude mcp add mobster -- /Applications/Mobster.app/Contents/MacOS/mobster-agent mcp. Mobster creates and boots a headless simulator for Claude Code. Claude reads each screen as a list of controls by name. It taps, types and swipes through the app. The server checks declared assertions and returns a verdict. Your existing simulators stay untouched.
Can Claude Code control the iOS Simulator?
Yes. Claude Code Desktop's iOS Simulator pane drives one, and the claude CLI reaches one through computer use. With Mobster connected, Claude Code builds your app for the simulator, opens it, and acts on buttons and fields by name from the accessibility tree. Mobster checks declared assertions.
What does Claude Code need for iOS development with Mobster?
An Apple silicon Mac with macOS 13 or later and Xcode with an iOS Simulator runtime. A real iPhone also needs Developer Mode and the WebDriverAgent runner, which Mobster for Mac sets up for you. To set up your iPhone and to build and test your own app, you need the macOS your Xcode version needs (Apple lists it on its Xcode page).
Does it work with Claude Code on Windows?
No. Xcode and the iOS Simulator run only on macOS, so Mobster needs an Apple silicon Mac. Claude Code on Windows or Linux can't drive an iOS simulator through Mobster.
Sources
- Claude Code docs: test iOS apps in the simulator
- Claude Code docs: connect Claude Code to tools via MCP
- Claude Code docs: permissions
- Claude Code docs: how Claude remembers your project (CLAUDE.md)
- MCP specification: ToolAnnotations (readOnlyHint)
- Apple: enabling Developer Mode on a device
- Mobster docs: MCP server
- Mobster docs: add Mobster to your agent
- Mobster docs: device setup
Claude Code’s logo is a trademark of Anthropic, shown only to name the product. Mobster isn’t affiliated with or endorsed by Anthropic.