Setup guides › Codex
Let Codex use your iPhone.
Add Spatia to Codex and it can see your iPhone's screen and tap, type and scroll for you, through iPhone Mirroring. One click in the setup assistant, or the exact config, with nothing to install on the phone.
OpenAI's coding agent, in the Terminal. Codex keeps its MCP servers in TOML.
What you need
- A Mac on macOS 15 Sequoia or later, with Codex installed.
- An iPhone on iOS 18 or later, on the same Apple Account, nearby, with Wi-Fi and Bluetooth on.
- Spatia, from the home page (free while it's in beta), moved to your Applications folder.
Set it up
- Allow access. Open Spatia. Its setup assistant asks for Accessibility (to tap and type) and Screen Recording (to see the phone). They're granted to Spatia itself, not to Codex.
- Connect your iPhone. Pair iPhone Mirroring once, with the phone locked and nearby. From then on Spatia connects for you.
- Add it to Codex. In the setup assistant, click Add next to Codex. Or add it yourself:~/.codex/config.toml
[mcp_servers.iphone] command = "/Applications/Spatia.app/Contents/MacOS/iphone-mcp"
It goes in ~/.codex/config.toml. The server is the
iphone-mcpexecutable inside Spatia.app; nothing else is installed. - New Codex sessions have the iPhone tools.
- Just ask. Every new Codex session.
Try asking
- “Open Settings › General › About on my iPhone and tell me the iOS version.”
- “Try the new build in TestFlight and report anything that fails.”
- “Scroll through my Running playlist and give me the songs as a table.”
- “Find the photo of the parking spot from this morning.”
How it works in Codex
Spatia is a local MCP server with 27 tools: Codex reads the iPhone's screen as words with tap points, so it taps on recognised text instead of guessing at pixels, and types exact text in any language. Every action can verify itself in the same call. The full list is in the developer section; how it compares with computer use, Appium and the open-source bridges is on the comparison page.
You stay in control: by default it asks before anything that sends, buys, posts or deletes, it never types a password, you can block apps by name, and the pause switch in the menu bar stops every tool at once. Picking up your iPhone stops it too.
Questions
Do I need to install anything on my iPhone to use it from Codex?
No. Spatia runs entirely on your Mac, through iPhone Mirroring. There's no app, profile or cable on the phone.
Where does Codex keep the Spatia config?
In ~/.codex/config.toml. Spatia's setup assistant writes it for you and backs up the file first; the snippet above is exactly what it adds.
What can Codex do on my iPhone?
Open apps, read the screen as text, tap, type, scroll, swipe and take screenshots: 27 tools in all. It asks before anything that sends, buys, posts or deletes, never types a password, and you can pause it from the menu bar.
Other assistants
- Claude Code~/.claude.json (user scope)
- Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
- Cursor~/.cursor/mcp.json
- VS Code~/Library/Application Support/Code/User/mcp.json
- Windsurf~/.codeium/windsurf/mcp_config.json
- Gemini CLI~/.gemini/settings.json
- Any MCP appZed, Cline, Goose, Raycast and more