Let a coding agent create, run and throw away machines
Expose 1VMTool to a coding agent over MCP so it can create, run and dispose of virtual machines under a token you scope. The endpoint is off until you turn it on, tokens are limited by level and by machine, and every tool call is written to an audit log.
Step by step
1vm mcp enable --port 8777Turn the local endpoint on. It is off by default and listens on this Mac only.
1vm mcp token create claude --level operate --machines agent-ownedA bearer token, printed once, scoped to a level and to the machines it may touch.
1vm mcp install-snippet claude-codePrints the client configuration to paste. --uninstall prints the removal form.
1vm mcp audit --limit 50Recent tool calls, filterable by tool or by token.
Worth knowing
- Levels are read, operate, create and destroy. `--machines` narrows a token further to agent-owned machines, all machines, or a named list.
- `1vm agent gc` deletes stopped machines the agent created, so an experiment does not silently fill the library.
- `1vm task run -- <cmd>` is the non-MCP version of the same idea: clone a golden, run a command, dispose of the machine.
The long version
This page is the short path. For the whole area in prose — the options, the edge cases and what to do when it does not work — read Automation and MCP.
Related
SSH into a VM
Machine keys, a pinned host key and an ~/.ssh/config include, so `ssh dev` works from any terminal on the Mac.
Read it →Create a Linux VM
One command to a booted Debian, Ubuntu or Omarchy guest — or a prepared toolchain with nothing left to install.
Read it →Run Windows on Apple silicon
The first-party 1VM engine boots Windows on ARM without QEMU — installed from your own ISO, with the virtio drivers attached.
Read it →Frequently asked questions
Is the MCP endpoint exposed to the network?
No. It listens locally and is off until you enable it. `1vm mcp status` reports whether it is listening, on which port, who owns it, which tokens exist and which clients connected recently.
Which AI clients are supported?
`1vm mcp install-snippet` covers Claude Code, Cursor, Claude Desktop, Codex, Gemini, OpenCode, Windsurf, Cline, VS Code, Grok and generic HTTP or stdio clients.
Can an agent delete my real machines?
Only with a token you scoped that way. A token limited to `agent-owned` machines cannot touch anything you created yourself, and `destroy` is a level you have to grant deliberately.