MobAI lets an AI agent see and control your iOS simulator: take screenshots, read the UI tree, tap buttons, swipe, type, and check what changed. Connect Claude Code or Cursor through MobAI's MCP server, or use the agent built into the MobAI desktop app.
This guide covers a local simulator on a Mac. MobAI also supports real iPhones, Android devices, and Android emulators. See the CLI reference for shell automation and CI workflows.
1. Start your iOS simulator and MobAI
You need a Mac with Xcode and an installed iOS Simulator runtime, the MobAI desktop app, and an app built for the simulator. For the MCP connection below, use your preferred AI coding tool with HTTP MCP support.
In Xcode, choose an iPhone simulator as the run destination and run your app. Open MobAI and select the running simulator from the device list. Confirm that you can see its screen before connecting the agent. A build for a physical iPhone is different from a simulator build; use the Simulator destination when building.
For a first check without building anything, use the simulator's Settings app. If you prefer MobAI's built-in agent, select the simulator and skip to the example prompt below.
2. Connect your AI coding agent through MCP
MobAI ships an MCP server with the desktop app at http://127.0.0.1:8686/mcp.
Keep MobAI running and connect your AI coding tool to that URL. No separate MCP package or Node.js installation is needed.
For clients that use URL-based mcpServers configuration, add this entry,
merging it with any existing servers:
{
"mcpServers": {
"mobai": {
"type": "url",
"url": "http://127.0.0.1:8686/mcp"
}
}
}
If your client uses an MCP settings screen or a different configuration format, add an HTTP MCP
server named mobai with the same URL, then enable its tools in your agent session.
MobAI also provides a
local HTTP API for tools that make HTTP requests directly.
3. Verify that the agent can see and control the simulator
Start with a small task whose result you can check:
Use MobAI to list devices and select my running iOS simulator. Read the device automation reference. Open Settings, take a screenshot, and read the visible UI elements. Tap General, then take another screenshot and confirm that the General screen opened.
The MCP server provides device discovery, screenshots, and an
execute_dsl tool for sequences of interactions. The agent should inspect the current
screen, choose an element, act, and inspect again to verify the result.
Once that works, ask it to test your own app. For example:
Open my app on the iOS simulator and walk through onboarding using test data. Capture each screen. Report any clipped text, unresponsive buttons, or unexpected navigation, with the steps needed to reproduce it. Stop before purchases or submitting real account data.
Keep the task specific: name the app and flow, describe the expected result, and ask for screenshots
or assertions as evidence. For repeatable checks, ask the agent to save a .mob test
and use the command-line tools to run it again.
Troubleshooting the connection
The simulator does not appear
Confirm that the simulator has finished booting and appears in MobAI's device list. Ask the agent to refresh its device list and use the returned device ID. If several simulators are running, identify the intended one explicitly.
The AI client cannot connect to MobAI
Keep the MobAI desktop app open on the same Mac as your AI client. Check the local device endpoint:
curl http://127.0.0.1:8686/api/v1/devices
If this returns connection refused, resolve the desktop app connection first. If it returns devices
but the agent cannot connect, check that its MCP URL is http://127.0.0.1:8686/mcp
and the server is enabled. The address 127.0.0.1 refers to the client's own machine;
an agent running remotely cannot use it to reach MobAI on your Mac.
Where to go next
Use the HTTP API and DSL reference for precise actions and assertions, or the CLI and CI guide to run saved tests in a pipeline. The simulator memory guide covers running more simulators on one Mac.
Download MobAI to connect your agent to an iOS simulator and try the first prompt.