One of the most annoying parts of Swift development is dealing with the new very SLOOOOOOOOOOOWWWWW device hub. Combine that with AI Agents, and the speed of development can slow down to a halt. Especially if you’re running multiple sessions in parallel.
Well, lucky for us, Claude has released a new mods functionality, which changed everything for me! If you’re wondering why I haven’t posted anything in the past few days, this is why!
I combined the new Xcode MCP RenderPreview tool call with mods to have my session primarily work via Xcode previews instead of the simulator. Here is what that looks like in a live demo!
Note: Paid subscribers will get access to this tool and others I blog about by default. You can subscribe below. For those who don’t want to subscribe, get it here or build your own!
Note that you can also vibe code it yourself, and this post will tell you how! But from my own experience, it does take decent time and token usage, so you can get it directly and modify from there. I now think of all tools / plugins / skills as “starter tools.” You get it and customize it for your own personal use.
So here is how I build this!!! And how you can build it too!
The Xcode MCP Server
Xcode 26.3+ now comes with an MCP Server! To turn it on, go to Xcode and select:
Xcode › Settings › Intelligence › Model Context Protocol › Allow external agents to use Xcode tools
Next, add Xcode’s server to your Claude agent:
claude mcp add --scope user --transport stdio xcode -- xcrun mcpbridge
In Codex:
codex mcp add xcode -- xcrun mcpbridge
Open your project in Xcode. Note: Do this before you prompt the agent. Xcode shows an alert when the agent connects. Allow it.
You can check the connection by running claude mcp list in Claude or codex mcp list in Codex.
The MOD Hooks
Mods are just amazing. Saying this AGAIN!! When before I still experimented with switching to Codex, after mods, this will no longer be the case for me unless Codex releases something truly revolutionary. Mods hook into your current Claude session and let you customize it pretty extensively, which creates a very customizable hyperpersonal setup that I’m extremely impressed by.
Here is how the SwiftUI Preview mod works with the mod hooks:
session.start
So one thing to know about mods is that they run in EVERY new Claude session. The reason for this is simple. The mod has to monitor the session to know which hooks to plug into. So it loads when the session starts no matter what.
For the SwiftUI Preview mod, it registers the /preview command and it’s own mcp tool.
command.run
When you type the “/preview the ContentView in iPhone Duo” command, the mod immediately intercepts it as a command run that targets it directly. It then gathers the open Xcode projects, every #Preview in the project and the simulators, and sends your words with those facts to Claude as a new prompt.
tool.call
The Claude agent analyzes all the preview options, and the users request, and uses that information to call the mod’s built-in tool, which checks that every argument is in place. The mod then calls then Xcode’s RenderPreview with the device information.
The mod then receives the temporary image from Xcode, saves it locally as a PNG file and adds the bezel. In other words, the mod pre-processes the session agent’s request and post-processes the output, which is then passed to the session agent.
ui.render
The mod also generates it’s own UI with the preview. It triggers the openPane helper function, which triggers the session’s ui.render hook to redraw the sessions UI.
The mod’s UI pane can be customized with options as you see in the screenshot!
Happy Building!
Honestly, since mods came out, I haven’t stopped building. I’ll be sharing a lot more tools over the coming days, so make sure to subscribe!



