{ "name": "vm-mcp", "description": "Linux VMs on the socialweb.computer market as tools for a model (vm_create, vm_list, vm_exec, vm_release, vm_forget), over the requester and the guest's process contract. The VMs kept are one computer.socialweb.vm.kept record of yours.", "session": "requester", "actions": [ { "entry": "vm_create", "label": "Create a VM", "description": "Rent a Linux VM (root shell, apt) and keep it; takes a few minutes. Returns {vm, bidder, cpus, mem, disk, created, expires, shell}: pass vm to vm_exec and vm_release. The bidder ends it at expires; release it when done.", "fields": [ { "key": "cpus", "label": "vCPUs", "type": "integer", "description": "vCPUs (default 2)." }, { "key": "mem", "label": "Memory (GiB)", "type": "integer", "description": "Memory in GiB (default 4)." }, { "key": "disk", "label": "Disk (GiB)", "type": "integer", "description": "Disk in GiB (default: the bidder's)." }, { "key": "bidders", "label": "Bidder DIDs", "type": "array", "description": "Bidder DIDs to ask; leave out for the default bidders." }, { "key": "hold_minutes", "label": "Hold (minutes)", "type": "integer", "description": "Minutes until the bidder ends it (default 60)." } ] }, { "entry": "vm_list", "label": "List VMs", "description": "The VMs you keep: [{vm, bidder, cpus, mem, disk, created, expires, expired, shell}].", "readOnly": true, "fields": [] }, { "entry": "vm_exec", "label": "Run a command", "description": "Run a shell command (sh -c, as root) on a VM you keep and wait for it. Returns {exit, stdout, stderr} (truncated or timed_out when so). For a long job: `nohup ... > /tmp/log 2>&1 &`, then read the log.", "fields": [ { "key": "vm", "label": "VM", "type": "string", "required": true, "description": "The VM's id from vm_create or vm_list (vm-xxxxxxxx)." }, { "key": "command", "label": "Command", "type": "string", "required": true, "description": "The command line for sh -c." }, { "key": "stdin", "label": "stdin", "type": "string", "description": "Text for the command's stdin (put secrets here, not in command)." }, { "key": "timeout_s", "label": "Timeout (s)", "type": "integer", "description": "Seconds to wait (default 60, at most 600)." } ] }, { "entry": "vm_release", "label": "Release a VM", "description": "Give a VM back: the bidder stops it and the records renting it made are deleted. Returns {vm, released, terminated}.", "fields": [{ "key": "vm", "label": "VM", "type": "string", "required": true, "description": "The VM's id (vm-xxxxxxxx)." }] }, { "entry": "vm_forget", "label": "Forget a VM", "description": "Drop a VM from your list when vm_release keeps failing (its bidder is gone): one short release attempt, then it is dropped either way. Returns {vm, forgotten, released, terminated, note?}.", "fields": [{ "key": "vm", "label": "VM", "type": "string", "required": true, "description": "The VM's id (vm-xxxxxxxx)." }] } ], "config": [ {"key": "bidders", "label": "Bidder DIDs", "type": "array", "description": "The bidders vm_create asks when a call names none."}, {"key": "via", "label": "iroh or webrtc", "description": "The transport to the VM's shell."}, {"key": "pool", "label": "Pool", "description": "The record key of the VM list (default self)."}, {"key": "max_vms", "label": "VMs kept at most", "type": "integer", "description": "Default 2."}, {"key": "max_cpus", "label": "vCPUs at most", "type": "integer", "description": "Default 8."}, {"key": "max_mem", "label": "Memory at most (GiB)", "type": "integer", "description": "Default 16."}, {"key": "max_disk", "label": "Disk at most (GiB)", "type": "integer", "description": "Default 100."}, {"key": "max_hold_minutes", "label": "Hold at most (minutes)", "type": "integer", "description": "Default 240."}, {"key": "wait_minutes", "label": "Wait (minutes)", "type": "integer", "description": "Per wait while renting, default 5."} ], "calls": ["com.atproto.repo.getRecord", "com.atproto.repo.putRecord"], "anyRecords": ["computer.socialweb.vm.kept"], "hooks": [ { "nsid": "computer.socialweb.vm.provision", "default": "requester", "entries": ["vm_create"], "reason": "rent the VM and keep it (the requester's contract, release: false)" }, { "nsid": "computer.socialweb.vm.release", "default": "requester", "entries": ["vm_create", "vm_release", "vm_forget"], "reason": "give the VM back (vm_create: one it could not record; vm_forget: one try)" }, { "nsid": "computer.socialweb.cicd.process.exec", "default": "process-mcp", "entries": ["vm_exec"], "reason": "run the command on the VM's guest agent" } ] }