simyard-mcp
Official<p align="center">
<img src="assets/banner.png" alt="simyard-mcp: twenty agents, eight simulators, a turn each" width="100%">
</p>
<h1 align="center"><img src="assets/icon-128.png" alt="" width="34" valign="middle" /> simyard-mcp</h1>
<p align="center">
<img alt="Version 0.1.0" src="https://img.shields.io/badge/version-0.1.0-D33C21">
<img alt="MCP server" src="https://img.shields.io/badge/MCP-server-434A55">
<img alt="Simulators: 8" src="https://img.shields.io/badge/simulators-8-756E60">
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-A9A399">
</p>
simyard-mcp lets a crowd of coding agents share **eight iOS simulators** without fighting over them. An agent asks for a simulator for a set number of minutes, and either gets one straight away or is told where it is in the queue and when to check back.
## The problem
Run a handful of agents on iOS work and each one wants a simulator. Give them all one and the Mac runs out of memory; on mine, five running simulators were using between 8.6 and 11.3 GB each. Give them a limit with no queue and they either crash into it or quietly boot a ninth.
What they need is a front desk: one place that knows who has which simulator, who's waiting, and when each turn ends.
## How it works
Every agent follows the same four steps, and the server tells it each one as it goes.
1. **Ask for a time.** `request_simulator(agent, minutes, device)` asks for an iPhone, an iPad, or an exact device type such as an iPhone Duo, for that many minutes. If one is free, the answer comes back **granted**, with the simulator booted and its ID ready to pass to `xcodebuild`, the Xcode MCP server or RocketSim.
2. **Or wait your turn.** If none is free, the answer is **queued**, with the agent's position, an estimate of the wait, a time to check back, and the time the request expires. `wait_for_simulator` holds the call open for up to 45 seconds and returns the moment it's the agent's turn. An agent that stops checking in is dropped from the queue when its time runs out, so a crashed agent doesn't hold up the line.
3. **Extend, or finish on time.** The turn lasts the minutes the agent asked for. `extend_lease` adds more. When the time is up and someone else is waiting, the turn ends: the simulator is wiped and handed on, and the agent's next call says its turn is over and who has the simulator now.
4. **Hand it back early.** `release_simulator` uninstalls the agent's apps, resets the keychain, shuts the simulator down and gives it to the next agent. Agents are told to do this as soon as they're done for now.
Three rules hold underneath, and the database enforces them rather than trusting the agents:
- **One simulator per agent.** Asking again returns the request it already has.
- **One agent per simulator.** Two agents can't hold the same simulator, even with several copies of the server sharing one queue file.
- **No more than eight running**, counting any simulator booted outside the pool, and none booted when less than 25% of the Mac's memory is free.
Note: when a turn runs out and nobody is waiting, the agent keeps the simulator in overtime rather than being cut off for nothing. The overtime ends the moment someone queues for that kind of device, or after 15 minutes.
| Tool | What it does |
| --- | --- |
| `request_simulator` | Ask for a simulator for N minutes; granted now or queued |
| `wait_for_simulator` | Hold the call open until it's your turn, up to 45 s by default |
| `check_request` | Check in on a queued request, or claim one being held for you |
| `cancel_request` | Leave the queue |
| `extend_lease` | Add minutes to your turn |
| `release_simulator` | Hand the simulator back, wiped |
| `lease_status` | Time left, or why your turn ended |
| `queue_status` | Every simulator, every holder, the whole queue |
| `init_pool` | Make the pool of eight, once |
## Install
It runs with `uvx`, so there's nothing to install beyond [uv](https://docs.astral.sh/uv/).
```bash
claude mcp add --transport stdio simyard -- uvx --from git+https://github.com/fledgeling-co/simyard-mcp@v0.1.0 simyard-mcp
codex mcp add simyard -- uvx --from git+https://github.com/fledgeling-co/simyard-mcp@v0.1.0 simyard-mcp
```
Then have any agent call `init_pool` once. It makes six iPhones and two iPads on the newest iOS that supports each, or the mix you pass, e.g. `"iphone:5,ipad:2,iPhone Duo:1"`.
The queue lives in `~/.config/simyard/queue.db`, beside the pool file the [simyard skill](https://github.com/fledgeling-co/fledgeling-plugins/tree/main/plugins/simyard) uses. The two share their leases, so an agent using the skill's script and an agent using this server never get the same simulator.
## Does it actually work?
The queue is well tested; how agents behave with it hasn't been measured yet.
- **14 tests of the queue's rules** pass against a fake clock: immediate grants, one simulator per agent, twenty agents on six iPhones getting positions 1 to 14 with rising wait estimates, dropping a request that stops checking in, cancelling, a turn ending and passing to the next agent, overtime, extending, an unclaimed offer moving on, and the memory and running limits.
- **Twenty agents at once.** Twenty threads with their own connections to one queue file took 60 turns on eight simulators. No simulator ever had two holders, and no more than eight ran.
- **The real server over MCP.** A test starts the server as a real MCP process and drives all nine tools through the official client.
- **A real simulator.** On my Mac, a throwaway simulator was granted and booted in 24.5 seconds; a second agent was queued and told to check back in 47 seconds; releasing took 11.6 seconds and the second agent got it straight away.
- **The rules can fail.** I broke five of them in copies of the code, one at a time, and a test caught each.
What hasn't been tested: agents actually following the server's instructions, and whether a client shows the progress updates during a wait. [EVALS.md](EVALS.md) has the detail.
## Credit
The pool, the preflight and the wipe on release come from [sim-guard](https://github.com/annayal-consumerxai/sim-guard) by An Nayal (MIT), by way of the simyard skill. The queue, the leases and the turn timing are new here.
TDQS
Scored across 9 tools
Most tools map cleanly to a distinct lifecycle step (request, wait, check, extend, release, cancel) and the two status tools separate personal lease from pool/queue overview. However, check_request with still_needed=false overlaps with cancel_request, and wait_for_simulator versus check_request both act as 'check-in' operations, so an agent could pick the wrong one in the cancel/keep-waiting case.
Everything is snake_case with predictable verb_noun forms (init_pool, request_simulator, release_simulator, cancel_request, extend_lease). The only deviation is the two status tools using noun_status (lease_status, queue_status), which is a readable, conventional exception rather than an inconsistency.
Nine tools is well matched to a simulator-leasing server, with each tool covering a necessary phase: pool setup, request/queue, waiting, lease extension, release, cancellation, and two read-only status views. Nothing feels redundant or missing from the count perspective.
The full lease lifecycle is covered end to end, from pool initialization through request, wait, extend, release, and cancel, with status inspection for both the lease and the queue. Minor gaps remain: there is no way to tear down or reset the pool, and no tool to inspect a specific granted simulator beyond its udid.