Give Claude Code a Mac in five minutes
Connect Claude Code to a real macOS VM with Xcode, then let it build, run tests and boot a simulator while you work on Windows, Linux or a phone.
· 7 min read
Need a Mac for this? NoMac gives your agent full macOS with Xcode, from $9.99 a month, billed by the second. Start now →
Claude Code is very good at Swift. On a Mac it can run xcodebuild, read the errors and fix them in a tight loop. On Windows, Linux or a server, it can write the same code but cannot prove any of it compiles. This guide connects Claude Code to a real macOS machine in about five minutes, so the loop works anywhere.
What you end up with: Claude Code running where it already runs, plus a cloud Mac with Xcode, an iOS simulator runtime and root that it can start, use and delete by itself. You pay for the minutes the Mac is ready, by the second.
What you need
- ·Claude Code, on macOS, Linux or Windows with WSL.
- ·Node 20 or newer. For the terminal workflow, OpenSSH and rsync as well.
- ·A NoMac plan: $9.99 a month for 5 hours every week, or $29.99 for 25. No Apple Developer account is needed to start a Mac or run unsigned builds.
Step 1: sign in and choose a plan
Sign in at nomac.app/mac and pick weekly hours. If you would rather let Claude do it, it can request a checkout link with get_mac_checkout, but a human completes the payment.
Step 2: install the CLI and log in
npm install -g @nomac/cli nomac login
Login prints a URL and a short code. Approve it in the browser. No API key is pasted into the terminal.
Step 3: add the MCP server to Claude Code
claude mcp add nomac -- npx @nomac/cli mcp
Restart Claude Code or run /mcp to confirm the server is connected. You should see tools such as start_mac, exec_mac and stop_mac.
Using Claude Code on the web instead
Hosted sessions cannot run a local stdio server, so use the hosted endpoint: https://mcp.nomac.app/mcp with an Authorization: Bearer nmk_... header, using an API key from your dashboard. The sandbox must be allowed to reach NoMac over HTTPS. See why cloud coding agents cannot run Xcode for the details.
Step 4: give Claude a first task
Use the nomac MCP tools. 1. Check my Mac credits. 2. Start a Mac (request_key "first-run-001") and wait until it is ready. 3. Run: xcodebuild -version && xcrun simctl list runtimes 4. Show me the output, then stop the Mac and confirm cleanup.
This costs about a minute of your weekly hours and proves the whole path: credits, start, a command, output, stop.
Step 5: the real loop
For day-to-day work, the terminal flow is usually faster because it moves your working tree in one command. Claude can run these itself through its Bash tool:
nomac start --json nomac sync . nomac ssh -- xcodebuild -scheme MyApp \ -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test # edit locally, then nomac sync . nomac ssh -- xcodebuild -scheme MyApp build nomac pull ./build --from build nomac stop --json
sync uploads changes and skips secret files and symlinks. pull brings a directory back. Stopping deletes the VM and everything on it, so pull first.
Put the rules in CLAUDE.md
A short project policy stops Claude guessing how to use the Mac:
## Mac work - For anything needing Xcode, use NoMac. Start one session and reuse it. - nomac sync . before each remote build; never edit files on the Mac directly. - Run unit tests on the simulator before saying a change is done. - Commands over 10 minutes: use nomac ssh, not exec. - Pull artefacts you need, then nomac stop --json and confirm cleanup. - Never send signing certificates or passwords unless I ask.
What to expect
- ·Startup: about a minute to ready. Queue and setup time are free. At busy times a start can queue briefly.
- ·First simulator boot: about 90 seconds. Later boots in the same session are faster. See running the simulator in the cloud.
- ·Limits: sessions default to two hours with a ten-minute idle timeout. One session at a time per account.
- ·No desktop: the Mac is headless. Claude sees output, logs and screenshots, not a live screen.
Once a build works, shipping it is the next step: our Claude Code iOS guide covers signing and TestFlight.