Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

docs(lume): restore VM management and MCP guidance

Francesco Bonacci3e3408cbe1a9
diff --git a/docs/content/docs/how-to-guides/lume/create-vanilla-vm.mdx b/docs/content/docs/how-to-guides/lume/create-vanilla-vm.mdx
index 9093d200af..99b99d0531 100644
--- a/docs/content/docs/how-to-guides/lume/create-vanilla-vm.mdx
+++ b/docs/content/docs/how-to-guides/lume/create-vanilla-vm.mdx
@@ -66,3 +66,7 @@ starting it again.
Tahoe is the verified unattended preset. Sequoia may still show the
Accessibility step of Setup Assistant on its first display boot; track that
behavior in [issue #2155](https://github.com/trycua/cua/issues/2155).
+
+Continue with [Manage local VMs](/how-to-guides/lume/manage-vms), [Serve the
+Lume API](/how-to-guides/lume/serve-api), or [Use Lume with
+MCP](/how-to-guides/lume/use-mcp-server).
diff --git a/docs/content/docs/how-to-guides/lume/install-lume.mdx b/docs/content/docs/how-to-guides/lume/install-lume.mdx
index 585a259e23..bb01a00d56 100644
--- a/docs/content/docs/how-to-guides/lume/install-lume.mdx
+++ b/docs/content/docs/how-to-guides/lume/install-lume.mdx
@@ -51,6 +51,8 @@ You can also download the `lume.pkg.tar.gz` archive from the [latest release](ht
- [Create your first local VM](/tutorials/create-your-first-lume-vm): follow the Tahoe happy path from IPSW to SSH.
- [Create a vanilla Tahoe VM](/how-to-guides/lume/create-vanilla-vm): create, run, inspect, and remove a local VM.
+- [Manage local VMs](/how-to-guides/lume/manage-vms): share files, use storage locations, and clone disks.
- [Serve the Lume API](/how-to-guides/lume/serve-api): run the local HTTP API for tools and scripts.
+- [Use Lume with MCP](/how-to-guides/lume/use-mcp-server): connect an AI client to local VM tools.
- [Lume CLI reference](/reference/lume/cli-reference): inspect every command and option.
- [Lume HTTP API reference](/reference/lume/http-api): use the local API from tools and scripts.
diff --git a/docs/content/docs/how-to-guides/lume/manage-vms.mdx b/docs/content/docs/how-to-guides/lume/manage-vms.mdx
new file mode 100644
index 0000000000..ed0e860686
--- /dev/null
+++ b/docs/content/docs/how-to-guides/lume/manage-vms.mdx
@@ -0,0 +1,104 @@
+---
+title: Manage local Lume VMs
+description: Run, inspect, clone, share files with, and remove local Lume VMs.
+---
+
+Use this guide after you have created a VM and need the everyday lifecycle and
+storage commands.
+
+## Inspect VMs
+
+List all VMs:
+
+```bash
+lume ls
+```
+
+Get details for one VM:
+
+```bash
+lume get macos-tahoe
+```
+
+The details include the VM state, IP address, display session, resources, and
+SSH availability when the VM is running.
+
+## Run and stop a VM
+
+Run Tahoe with a display:
+
+```bash
+lume run macos-tahoe
+```
+
+Run it headlessly:
+
+```bash
+lume run --no-display macos-tahoe
+```
+
+Stop it when you are finished:
+
+```bash
+lume stop macos-tahoe
+```
+
+Only one `lume run` process can hold a VM's auxiliary storage at a time. If a
+second process reports that auxiliary storage is locked, stop the existing
+process before starting the VM again.
+
+## Share a host directory
+
+Pass a host directory when you run the VM:
+
+```bash
+lume run macos-tahoe --shared-dir ~/Projects
+```
+
+The directory appears in the guest at `/Volumes/My Shared Files`. Use a
+read-only mount when the guest only needs to read the files:
+
+```bash
+lume run macos-tahoe --shared-dir ~/Projects:ro
+```
+
+## Store VMs on another volume
+
+Add a named storage location and make it the default:
+
+```bash
+lume config storage add external /Volumes/External/lume
+lume config storage list
+lume config storage default external
+```
+
+Commands also accept a storage name directly:
+
+```bash
+lume create macos-tahoe \
+ --ipsw ~/Downloads/macos-tahoe.ipsw \
+ --unattended tahoe \
+ --storage external
+lume run macos-tahoe --storage external
+```
+
+The default VM directory is `~/.lume`. Run Lume as the same user that owns this
+directory; `sudo lume` uses a different home directory and cannot see those
+VMs.
+
+## Clone and remove VMs
+
+Clone a VM before making changes or using it as a reusable starting point:
+
+```bash
+lume clone macos-tahoe macos-tahoe-backup
+```
+
+Remove a VM and its disk when you no longer need it:
+
+```bash
+lume delete macos-tahoe-backup
+```
+
+macOS VM disks can be sparse. The configured capacity and the host space used
+by the disk can therefore differ.
diff --git a/docs/content/docs/how-to-guides/lume/meta.json b/docs/content/docs/how-to-guides/lume/meta.json
index 8e35138cd6..f5fd69296b 100644
--- a/docs/content/docs/how-to-guides/lume/meta.json
+++ b/docs/content/docs/how-to-guides/lume/meta.json
@@ -1 +1 @@
-{ "title": "Lume", "pages": ["install-lume", "create-vanilla-vm", "serve-api"] }
+{ "title": "Lume", "pages": ["install-lume", "create-vanilla-vm", "manage-vms", "serve-api", "use-mcp-server"] }
diff --git a/docs/content/docs/how-to-guides/lume/use-mcp-server.mdx b/docs/content/docs/how-to-guides/lume/use-mcp-server.mdx
new file mode 100644
index 0000000000..605b4dd51e
--- /dev/null
+++ b/docs/content/docs/how-to-guides/lume/use-mcp-server.mdx
@@ -0,0 +1,56 @@
+---
+title: Use Lume with MCP
+description: Connect an MCP client to Lume for local VM management.
+---
+
+Lume can expose its VM management tools through the Model Context Protocol
+(MCP). The MCP server uses stdio, so the client starts one Lume process and
+communicates with it directly on the host.
+
+## Configure an MCP client
+
+Add a server entry using the path returned by `which lume`:
+
+```json
+{
+ "mcpServers": {
+ "lume": {
+ "command": "/Users/your-name/.local/bin/lume",
+ "args": ["serve", "--mcp"]
+ }
+ }
+}
+```
+
+Replace the command path with the result of:
+
+```bash
+which lume
+```
+
+Restart the MCP client after saving its configuration. The client can then
+list VMs, create Tahoe guests, run and stop VMs, clone disks, and execute SSH
+commands inside unattended guests.
+
+## Test the server
+
+Use the MCP Inspector to test the connection:
+
+```bash
+npx @modelcontextprotocol/inspector lume serve --mcp
+```
+
+The server uses stdio for the MCP protocol. Keep its standard output reserved
+for MCP messages when embedding it in another client.
+
+## Choose MCP or HTTP
+
+Use MCP when an AI client should manage VMs through tool calls. Use the [Lume
+HTTP API](/reference/lume/http-api) when a script or service should make HTTP
+requests. Both interfaces control the same local VM store.
+
+## Security
+
+The MCP server can create, delete, start, stop, clone, and access VMs through
+SSH. Configure it only for clients you trust, and use a dedicated vanilla VM
+for agent tasks when the guest may be modified.
diff --git a/docs/content/docs/reference/index.mdx b/docs/content/docs/reference/index.mdx
index 310e8fcf36..d3273edf55 100644
--- a/docs/content/docs/reference/index.mdx
+++ b/docs/content/docs/reference/index.mdx
@@ -8,6 +8,6 @@ Reference documents the full technical specification for Cua's subsystems. It co
| Section | What it documents |
|---------|-------------------|
| [`cua-driver`](/reference/cua-driver/cli-reference) | CLI commands, the generated MCP tool reference for the stdio MCP server, and known behavioral limits for best-effort background automation. |
-| [Lume](/reference/lume/cli-reference) | CLI commands and local HTTP API for creating, running, and managing macOS and Linux VMs on Apple Silicon Macs. |
+| [Lume](/reference/lume/cli-reference) | CLI commands, local HTTP API, and host limits for creating, running, and managing macOS and Linux VMs on Apple Silicon Macs. |
| [Sandbox SDK](/reference/sandbox-sdk) | Python API reference for building images, creating sandboxes, and driving their interfaces. |
| [Docs & Code MCP](/reference/docs-code-mcp) | Hosted read-only search over Cua docs and versioned source code. |
diff --git a/docs/content/docs/reference/lume/limits.mdx b/docs/content/docs/reference/lume/limits.mdx
new file mode 100644
index 0000000000..d7bcc59b12
--- /dev/null
+++ b/docs/content/docs/reference/lume/limits.mdx
@@ -0,0 +1,67 @@
+---
+title: Limits and VM states
+description: Host requirements, VM states, storage behavior, and common Lume failures.
+---
+
+This page records constraints that affect Lume workflows. Use the [CLI
+reference](/reference/lume/cli-reference) for command syntax.
+
+## Host requirements
+
+- Lume runs on Apple Silicon Macs.
+- macOS 13 or later is required.
+- Lume needs at least 8GB of available memory. 16GB is a better starting point for a guest with 8GB allocated.
+- Leave at least 50GB of free disk space for a macOS guest and its restore image.
+
+## macOS VM concurrency
+
+Apple's Virtualization framework allows Lume to run up to two macOS guests on a
+host. Memory, disk, and CPU capacity can reduce the practical limit.
+
+## VM states
+
+`lume ls` can report these states:
+
+| State | Meaning |
+| --- | --- |
+| `stopped` | The VM is ready to start. |
+| `running` | The VM is booted and has a live virtualization session. |
+| `provisioning` | Lume is creating the VM or completing an asynchronous operation. |
+| `provisioning (stale)` | A provisioning marker remains after its operation stopped unexpectedly. |
+
+Wait for a provisioning operation to finish before running the VM. If a VM is
+stale, inspect the Lume logs and remove the incomplete VM before recreating it.
+
+## Common failures
+
+### Auxiliary storage is locked
+
+Only one process can run a VM at a time. Check the VM list and stop the process
+that owns the VM before retrying:
+
+```bash
+lume ls
+lume stop macos-tahoe
+```
+
+### `sudo lume` cannot find a VM
+
+Lume stores VMs under the current user's home directory by default. Running
+with `sudo` changes `HOME`, so the root process looks in a different VM store.
+Run Lume as the account that created the VM.
+
+### SSH is unavailable
+
+VMs created with `--unattended tahoe` enable SSH and use `lume` / `lume` for the
+initial account. Check that the VM is running, then inspect its details:
+
+```bash
+lume run macos-tahoe --no-display
+lume get macos-tahoe
+lume ssh macos-tahoe 'id -un'
+```
+
+## Disk allocation
+
+macOS VM disks use sparse files. The configured disk capacity describes the
+guest's logical disk. The host allocation grows as the guest writes data.
diff --git a/docs/content/docs/reference/lume/meta.json b/docs/content/docs/reference/lume/meta.json
index 41b74da377..84be1046f3 100644
--- a/docs/content/docs/reference/lume/meta.json
+++ b/docs/content/docs/reference/lume/meta.json
@@ -1 +1 @@
-{ "title": "Lume", "pages": ["cli-reference", "http-api"] }
+{ "title": "Lume", "pages": ["cli-reference", "http-api", "limits"] }