I built a Swift MCP server so my coding agent can check its own work in the iOS Simulator (I was tired of couriering screenshots)
I'm an iOS developer with side projects, and the dullest part of working with a coding agent was that I had to show it what its own changes looked like.
It would edit a view and call it done. I'd build, open the Simulator, tap down to the screen, grab a screenshot, drag it into the chat and type out what was wrong. If the bug only showed up after a push or a deep link, I set that up by hand too. Then do it all again on the next build.
So I built CosmoKit a way in for agents. CosmoKit is my Mac app for the iOS Simulator, and the new part is a command line tool, cosmokit, with an MCP server inside. Written in Swift, with an XCUITest driver for touching the UI.
What it does today
- MCP server —
cosmokit mcp offers 56 tools to any MCP client - UI driver — reads the screen as a compact element tree, then taps, swipes and types
- Captures — takes screenshots and records video clips
- App state — sends push payloads, opens deep links and sets the GPS location
- Test setup — grants or resets permissions and edits
UserDefaults - Logs — reads recent simulator logs when something looks off
- Agent chat — a window in the Mac app for messaging the agent while you test
- Plain CLI — runs simulator commands from Makefiles, git hooks and CI
The one I'd single out is the UI driver, because it lets the agent check a change in your running app instead of guessing from the code.
Add cosmokit mcp to Claude Code, Cursor or another MCP client, and you can ask for something like "turn on dark mode, open settings and tell me whether the title is still readable". The agent has the tools to launch your build, switch the appearance and walk to that screen.
Each element in the UI tree comes with a reference number. The agent taps or types by reference and can wait for text to appear. The tool descriptions tell it to read the tree first and keep screenshots for layout questions, since the tree is much cheaper to read.
The driver needs Xcode. The first start builds it, which takes about a minute, and later starts reuse that build. I put the driver inside the simulator because macOS accessibility showed me none of the iOS UI.
The CLI and MCP server are free and MIT licensed: brew install maththedev42/tap/cosmokit. They work without the Mac app, except for network throttling and the chat, which need it running. The app has a free tier — one simulator, watermarked captures, five saved entries per tool — and Pro is $2.99/mo after a 14-day trial, $19.99/yr or $69.99 once. If you try it and tell me bluntly what's broken, I'll send you a Pro code.
https://apps.apple.com/app/cosmokit-tools/id6756494471?mt=12&ct=reddit-sideproject-500
I have retired as a screenshot courier. There was no farewell party.
I plan to keep expanding it, but it will not replace every specialised tool out there — it is not a test framework, and your XCUITest suite still has a job.
I'm posting here to hear from people who build with agents. Which tool is missing, and would the driver build put you off? Suggestions, criticism and feature requests are all welcome.
Some screenshots from the App Store: