vmac
Builds macOS VMs for headless iOS work, installs simulator runtimes, runs iOS project tasks, and captures simulator screenshots.
Builds and manages tart-based macOS VMs from Vmacfile instructions, with cached layers, shares, secrets, and task execution inside the guest.
Supports headless Xcode/iOS work by detecting Xcode projects, installing simulator runtimes via xcodebuild, opening Device Hub for simulator viewing, and capturing simulator screenshots.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
vmac
Project VMs for headless macOS/iOS work. vmac reads a Dockerfile-style Vmacfile
and builds a tart macOS VM from it. Each instruction
is a cached layer (a copy-on-write tart clone), so a rebuild starts at the first changed step.
It ships as a CLI and as an MCP server.
Install
npm i -g https://github.com/mnott/vmac/releases/latest/download/vmac.tgzUpdate with pai update. Nothing is published to npmjs.com. Requires macOS, Node >= 18 and tart.
Related MCP server: AppleScript Automation MCP
Vmacfile reference
FROM vmac-base # an OCI image or a local VM; must be first, exactly once
CPU 6
MEMORY 16G # 16G or 8192M
RUN brew install swiftlint # runs in the guest via `tart exec ... zsh -lc`
ENV DEVICE="iPhone 17" # appended to ~/.zshenv in the guest
SHARE src /tmp/vmac/p/src ro # host dir shared at /Volumes/My Shared Files/src
SHARE results /tmp/vmac/p/results rw
COPY tools/setup.sh /usr/local/bin/ # host file or directory into the guest; trailing / keeps the name
TASK test sh build.sh test {args} # run with `vmac run test`
TASK shot screencapture -x {out}/screen.png
SECRET GH_TOKEN # env var injected at exec time from the host (name only, never a value)
RUN --key release:mnott/PAI npm i -g https://github.com/mnott/PAI/releases/latest/download/pai.tgzRUN --key release:owner/reporesolves the latest release tag first (gh release view, falling back to the GitHub API; the build fails if it cannot) and hashesrelease:owner/repo@<tag>into the layer in addition to the instruction text: a new release rebuilds that layer and every later one, the same tag stays cached.RUNTIME iOS [27.2]makes the build install that simulator runtime in the guest (xcodebuild -downloadPlatform) as a cached layer. Without the line, an Xcode project that targets iOS is detected and gets it automatically;vmac runre-checks (onesimctlcall) before every task.vmac doctorprints the one fixing command under each warning (clickr permissions per running VM, bridge registration, stale vmac-base).SECRET NAMEdeclares an env var taken from the host environment, or from~/.vmac/secrets.env(KEY=VALUElines, mode 600 required). It is passed to every RUN and TASK ontart exec -istdin and never written to the guest disk, a layer, the metadata or a hash; a SECRET line changes no hash. Build and run fail if a declared secret is missing. SECRET names and COPY sources that look like credential stores (~/.claude,~/.ssh,~/.aws,~/.config/gh, Keychains,.netrc,id_rsa*,id_ed25519*,*.pem,*.p12) are refused.#starts a comment line; a trailing\continues a line.{args}is replaced by the shell-quoted arguments ofvmac run;{out}by the guest results directory (/Volumes/My Shared Files/resultsif a shareresultsexists, else/tmp/vmac-out).A layer is cached by a hash of its instruction, everything before it and (for COPY) the file contents. Layer VMs are named
vmac-L-<hash>; the final VM isvmac-<project>. SHARE and TASK are metadata only.
Shares convention
Source and tools are mounted read-only. There is exactly one rw share (the io/results share): in/ is written
by the host, out/ by the guest. vmac up, run and run --fresh refuse more than one rw share and name the
offending ones.
Commands
vmac build [dir|base] [--project NAME] build vmac-<project> (default project: dir name)
vmac list list vmac-* VMs with state
vmac run [--fresh] [--src DIR] <project> <task> [args...]
sync checkout, run a project TASK, collect results
vmac run <task> [args...] run a TASK from ./Vmacfile
vmac shot <vm> [name] screenshot VM screen + booted simulator
vmac exec <vm> -- <cmd...> run a command in a VM
vmac up <vm> / vmac down <vm> start headless / stop
vmac run --fresh <task> [args...] run in a throwaway clone vmac-eph-<id>, deleted afterwards
vmac gc | reap delete stale vmac-eph-* VMs and unreferenced layers
vmac doctor one ok/warn line per check
vmac prune delete layer VMs no project references
vmac mcp MCP stdio serverRunning a project
vmac run <project> <task> takes the task, shares and secrets from the project's metadata. If the
project has a SHARE src <path> ro, the checkout (--src DIR, default cwd) is first rsynced on the
host into <src share>/<id>/ (id = first 8 hex of sha1 of the absolute dir; rsync -rlt --delete,
excluding .git, node_modules, .build, DerivedData, *.xcresult and every pattern in an
optional .vmacignore). The VM is never restarted; a running VM keeps its fixed shares.
Task placeholders: {args} quoted arguments, {out} guest path of the per-run folder
results/<YYYYMMDD-HHMMSS> (when a results share exists), {src} guest path
/Volumes/My Shared Files/src/<id>. The guest command also gets VMAC_SRC and VMAC_OUT. SHARE host
paths may start with ~ or $HOME. After the task a best-effort simulator screenshot goes to
simulator.png; result lines (Test Case ... passed|failed, TEST SUCCEEDED|FAILED, error:,
** BUILD ...) from *.log files and the file list are printed, with the host results path.
vmac build base builds vmac-base (node, PAI, AIBroker, Clickr, permission check) from the
Vmacfile shipped in the package. State lives in ~/.vmac (override with VMAC_HOME).
Device Hub
So an operator watching the guest over Screen Sharing sees a simulator test live, vmac opens Device Hub (Xcode's simulator viewer) in the guest and selects the booted device with a small Swift Accessibility (AX) script run in the guest: no Automation prompt, no setup. Every guest step has a timeout. It is best effort: a failure prints one note and never fails up or run.
Runs after
vmac up <vm>(whenxcrunexists in the guest) and before a project task that mentionssimctl,build.sh testorxcodebuild, or whose project hasENV VMAC_SIMULATOR=1in its Vmacfile.ENV VMAC_DEVICE=<name>in the Vmacfile picks the device; otherwise the first booted simulator is used.vmac show <vm> [device]re-runs the selection by hand and prints whether it worked.
MCP bridge
vmac bridge <vm> <name> runs an allowlisted MCP server inside a guest VM and passes MCP stdio
(newline-delimited JSON-RPC) through unchanged, via tart exec -i. The VM is started on demand
(never restarted if running; shares come from its build metadata).
vmac mcp add pai-sim clickr -- /opt/homebrew/bin/node /opt/homebrew/lib/node_modules/@tekmidian/clickr/dist/index.js
vmac mcp list
vmac mcp register pai-sim clickr [--apply] # prints (or runs) the registration
vmac mcp rm pai-sim clickrregister prints claude mcp add vmac-pai-sim-clickr -s user -- vmac bridge pai-sim clickr; --apply
runs it through the claude binary. Plain vmac mcp still starts the vmac MCP server.
Allowlist: entries live in $VMAC_HOME/config.json (~/.vmac by default), keyed <vm>/<name>. A pair
that is not listed never runs: every request gets a JSON-RPC error (-32000) naming the missing entry and
the bridge exits 1. If the VM cannot start, or the guest server exits early, each pending request gets one
-32000 error and the bridge exits 1; it never hangs. Lifecycle logs go to stderr only.
Trust: guest output is data. The bridge forwards it byte-for-byte and only reads response ids to track pending requests. The child tart process receives only PATH, HOME and TART_HOME from the host, so no credentials cross.
MCP tools
vmac mcp starts the vmac MCP server (stdio). Register it once:
claude mcp add vmac -s user -- vmac mcpTool | Input | Notes |
| none | vmac-* VMs with state |
|
| starts headless, shares from build metadata; |
|
| stops the VM |
|
| returns |
|
| like |
|
| text with paths plus PNG image content for |
| none | `{ok, checks: ["ok |
vmac_exec only accepts vmac-* VMs (never pai-sim or other VMs) and never starts a VM: if it is not
running the call fails with VM x is not running (vmac_up first). Commands are not filtered; the guest is
the sandbox. Bad input makes the tool return an error result with a message like
vmac_x: 'name' must be a string.
Constraints
tart's licence is not OSI open source. Check its terms before use: free for individuals, organisations above a certain size need a licence.
Apple's macOS licence allows at most two macOS VMs running at once per Mac.
Cirrus images ship the account admin/admin. That is only acceptable for VMs reachable from the host alone. vmac never types it; everything goes through
tart exec.No VM restarts behind a running job: each VM has one fixed set of shares.
Licenses
vmac itself is MIT. It bundles neither tart nor any VM image; you install and license those yourself.
tart (Cirrus Labs) is not OSI open source; GitHub reports its license as
NOASSERTION. Free use is limited: organisations above a size threshold need a paid licence. The exact threshold is UNVERIFIED here; read the current terms at https://github.com/cirruslabs/tart/blob/main/LICENSE and https://tart.run/licensing/ before using vmac in a company.Apple: macOS may only be virtualised on Apple hardware, and at most two macOS VMs may run at once per Mac. vmac refuses to start a third (
vmac doctorshows x/2).Cirrus Labs images ship the account
admin/admin; check the licence of the image you use (the Xcode images embed Apple's Xcode terms). Only use them for VMs reachable from the host alone.
License
MIT
Watching the VM
Whenever vmac starts a VM (vmac up, vmac run, vmac run --fresh, before the task), it opens a Screen Sharing window to it on the host (open vnc://<vm ip>), once per boot. If a Screen Sharing client is already connected to that address, nothing is opened. vmac down and the end of a --fresh run close only the window vmac opened for that VM.
On by default. Opt out per call with
--no-watch, for a whole shell withVMAC_WATCH=0(overnight runs), or permanently with"watch": falsein$VMAC_HOME/config.json.vmac never types or passes a password and the URL carries no
user:pass. Screen Sharing asks you for the image login the first time; tick "Remember this password in my keychain" and macOS fills it in from then on.Closing uses a System Events click on the window's close button, so it needs the Accessibility permission for the terminal; without it the window simply stays open.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Remote MCP for Firecracker microVM sandboxes, with your sign-in, Vault, and an audit log.
Rent a Mac by the hour or day. An MCP server and a skill let AI agents order, use and stop it.
Related MCP Servers
- AlicenseBqualityDmaintenanceA stdio MCP server that controls VMware Workstation via vmrun, enabling VM lifecycle management and snapshot operations.14MIT
- AlicenseAqualityDmaintenanceA local MCP server that exposes macOS automation actions (AppleScript + CLIs) as tools, enabling MCP clients on your Mac to control apps, system settings, and more.39MIT
- AlicenseNot gradedqualityCmaintenanceFirst-party MCP server and CLI for Xcode and iOS Simulator automation. Enables control of Xcode and iOS Simulator via MCP tools for tasks like building, testing, and automation.5 npm1MIT
- AlicenseAqualityBmaintenanceMacOS MCP server to discover, control, automate, and inspect Parallels virtual machines over standard MCP stdio. Requires Parallels Pro or Business Edition subscription.24MIT