What they did
The author, who writes as Mochi Mochi, registered Xcode's built-in MCP server (xcrun mcpbridge, available since Xcode 26.3) with Claude Code and allowed external agents in Xcode's Intelligence settings. The server exposed 54 tools on Xcode 27.2. Rather than route everything through it, the author kept everyday builds and tests on plain xcodebuild in the terminal and used the Xcode tools for one job: rendering SwiftUI previews so the agent could look at a snapshot and check the layout. That work runs in a Claude Code subagent defined in .claude/agents/, which opens the project in a headless Xcode, renders the preview, closes the project and hands back only the result. An AGENTS.md file tells the agent the scheme, to confirm builds pass, and never to touch signing or bundle settings. They also tried the same setup with the Codex CLI.
How it went
Preview snapshots worked. The first open, render and close sequence took 86 seconds; with the trimmed subagent, runs took 31 and 32 seconds with no errors. Listing only four Xcode tools in the subagent's tools field did not limit it: it could still see all 54, and a write call went through and added a file to the project. Putting the other 50 tools in disallowedTools did remove them, which the author confirmed in Claude Code's debug log, not just the subagent's own report. In Codex, an enabled_tools list in the config blocked the rest. None of the Xcode tools report code coverage, so that stays on xcodebuild and xccov.
Worth knowing
Do not trust a subagent's tools list to restrict MCP tools; block the ones you do not want with disallowedTools and check what the subagent can see. The first time the agent opens a project, Xcode asks for access, and the grant covers every project under that folder. A project opened only in the Xcode window is invisible to the agent. Tested on Xcode 27.2 and Claude Code 2.1.316.