Run Xcode tests from Claude Code on Linux, Windows or the web
Claude Code can read and edit a Swift project on any machine. It cannot build one unless the machine has Xcode, and Xcode only runs on macOS. Give Claude Code a hosted Mac as a tool and it can build the project, run the tests on an iOS Simulator and read the failures, wherever it is running.
Set it up
Add the Baremetal Jobs connector from a terminal:
claude mcp add --transport http baremetal-jobs https://jobs.baremetal.ch/mcpThen type /mcp in Claude Code, choose baremetal-jobs and sign in with your email address.
Or install the plugin. It adds the same connector and two skills that tell Claude when a hosted run is the right tool and how to report the result:
/plugin install baremetal-jobs --marketplace anderb2021/baremetal-jobs-pluginIf you already added the connector to your Claude account, Claude Code can use it without either step.
Ask for a run
- “Push this branch and run the tests on a Mac with Baremetal Jobs.”
- “Run the XCTest suite for this repository and fix whatever fails.”
- “Run it again with a two-minute limit.”
Claude Code sends the commit, not your working folder, so changes have to be pushed first. The first time you use a repository, Claude gives you a link to approve access to it on GitHub. That approval adds US$2.00 of starter credit to a new account.
What Claude gets back
A run ends in one of a few ways, and each gives Claude something to act on:
- Succeeded: the test counts and the commit that ran.
- Failed, with failing tests: up to twenty failing tests, each with its assertion message.
- Failed, did not compile: up to twenty compiler errors with file and line. No test ran.
- Timed out or cancelled: the run stopped at your limit or on your word.
This is what came back for a run with two failing tests, shortened:
{
"status": "failed",
"tests": { "total_tests": 3, "passed_tests": 1, "failed_tests": 2, "skipped_tests": 0 },
"failures": [
{ "test_name": "testSecondQueuePositionIsWrongOnPurpose()",
"assertion": "XCTAssertEqual failed: (\"2\") is not equal to (\"3\") - Deliberate failure: ..." },
{ "test_name": "testThirdQueuePositionIsWrongOnPurpose()",
"assertion": "XCTAssertTrue failed - Deliberate failure: ..." }
],
"charge": { "charged_usd_cents": 10, "released_usd_cents": 15 }
}With that in the conversation, Claude can open the failing test, change the code, push and ask for another run. A small project takes about two minutes a round.
Keep the cost under control
- The price is US$0.05 per started minute of the run. A small project costs about US$0.10 a run.
- Every run has a time limit: five minutes unless you ask for another, up to thirty. The limit is reserved from your credit when the run is queued, and the minutes you did not use are released when it ends.
- A run spends credit, so Claude asks before it starts one unless you have allowed the tool in advance.
- Ask “How much Baremetal Jobs credit do I have left?” at any time. Credit is added in your browser, never in the terminal.
If a run is refused
A refusal costs nothing and says what to do next.
| Code | What it means | What to do |
|---|---|---|
| shared_scheme_required | The project has no shared scheme | In Xcode choose Product, Scheme, Manage Schemes, tick Shared, commit the .xcscheme file and push |
| revision_not_found | GitHub has no such branch, tag or commit | Push the branch, or correct the name |
| project_exceeds_snapshot_limits | The commit is over 8 MB zipped, 32 MB of files or 4,095 files | Remove large files from the repository. Retrying unchanged will not help |
| unsupported_project_tree | The repository has a symbolic link, a submodule or a single file over 8 MB | These are not supported yet |
| insufficient_credit | The balance is below the time limit you asked for | Add credit with the funding link, or ask for a shorter limit |
| account_busy | Another run of yours is queued or running | Wait for it, or cancel it |
| queue_full | Too many runs are waiting | Wait a few minutes and ask again |
What it does not do
- CocoaPods workspaces and repositories that are only a Swift package, with no Xcode project.
- Swift packages in private repositories.
- macOS, watchOS, tvOS and visionOS destinations, and physical devices.
- Code signing, provisioning profiles and secrets.
- Repositories with symbolic links or submodules.
- Assistants other than Claude.
If Claude Code is already running on a Mac with Xcode, build locally. A hosted run is for sessions without one, or for a clean-machine check of a pushed commit.
Next
- Baremetal Jobs: price, limits, and how your code is handled.
- How to run iOS tests without a Mac: the other ways, compared.
- The sample repository, to try a run on a small project.