# agentpc [Health: Active]

**Category:** 🖥️ OS Automation  
**Repository:** https://github.com/pawanpaudel93/agentpc  
**GitHub Stars:** 4  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agentpc

## Description
Instant, resettable Windows and Ubuntu desktop VMs for AI agents on Apple Silicon Macs.

## Tools
Capabilities this server exposes over MCP:

- **list_vms** — VMs (owner, state, size, checkpoints, viewer and, for running x86apps VMs, `x86_tso`) and the available images with their OS versions
- **create_vm** — Create a VM (optionally of a given version, size, or offline) and wait until its desktop is ready. Retrying it with the same `name` and image in the same session returns the VM already created, booting it if it was stopped. `open_in_browser: true` opens its viewer in the Mac’s default browser after…
- **start_vm** — Boot a stopped VM / shut one down cleanly
- **reset_vm** — Discard all changes: back to a fresh copy of the image
- **checkpoint_vm** — Save a VM's disk and memory under a label; go back to it in seconds. A running VM's guest first writes its pending data to disk (at most ~10 s; otherwise the reply says "not flushed")
- **delete_checkpoint** — Delete one checkpoint by label; the VM is untouched
- **delete_vm** — Delete a VM with its disk and checkpoints
- **take_screenshot** — PNG screenshot from the hypervisor; `save_to` also writes it to a path on your Mac
- **run_command** — Run a command (PowerShell on Windows, bash on Ubuntu and Arch); returns typed `structuredContent` plus the readable exit code, stdout and stderr (each stream trimmed to its first and last 10,000 characters). At a foreground run's `timeout` (default 120 s) agentpc attempts to stop it and keeps its p…
- **get_job_status** — Check a job by its id: queued, running, exited (with its code), stopped, ended without an exit code, or missing, plus its log. `wait_seconds` (0 to 30, default 0) waits without ever stopping the job; `cursor` reads the log incrementally. Also takes the `job_id` of a foreground run whose outcome was…
- **list_jobs** — Find jobs again when their id was lost (a cancelled or disconnected `run_command`, a lost reply): the VM's job records, newest id first, as metadata only (id, kind, state, exit code, stop reason, which records exist, file times), never a command, environment, output or log. `limit` 1 to 100 (defaul…
- **wait_for_service** — Wait until a TCP port accepts a connection, or an HTTP path answers its expected status (default 200, redirects not followed), on the VM's own `127.0.0.1`; `timeout_seconds` 1 to 120 (default 30). Optionally ends early when a `run_command` `job_id` is proven to have failed. Read-only: it never stop…
- **stop_job** — Stop a background job (or a foreground run's `job_id`) and everything it started (on Linux its systemd scope, which processes that detach stay in, when the guest has a user manager, else the processes marked with the job and their descendants; on Windows its process tree). For a job that already ex…
- **upload_file** — Copy files or folders between your Mac and a VM
- **forward_port** — Reach a server running in a VM from your Mac (TCP over an SSH tunnel, works even for servers bound to the guest's own `127.0.0.1`; or `protocol: "udp"` for a UDP server listening on `0.0.0.0`)
- **list_forwards** — List a VM's active port forwards / stop one by its host port (and optional protocol)
- **read_vm_log** — Read the tail of a VM's `qemu` or `serial` log, for when a VM won't boot or the desktop is unreachable
- **list_desktop_tools** — List the desktop-control tools inside a VM, with each one's required arguments and whether it's read-only (or one tool's full schema, with its annotations); a wrong name returns close matches
- **use_desktop_tool** — Call one of them: click, type, launch apps, read the UI tree, … A call with wrong arguments or a wrong name returns the tool's arguments or close matches. Marked destructive
- **inspect_desktop** — The read-only twin of `use_desktop_tool`, with the same arguments: it runs a tool only if the VM's driver explicitly marks it read-only, and refuses anything else before dispatching it

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/pawanpaudel93/agentpc), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
curl -fsSL https://agentpc.pawanpaudel.com.np/install.sh | sh
```

2. Add to your MCP client:

```sh
agentpc mcp-install                  # or pick: agentpc mcp-install claude claude-desktop codex
```

## Documentation

## What agentpc MCP server does

The agentpc MCP server gives AI agents access to local desktop virtual machines hosted on an Apple Silicon Mac. Supported guest environments include Windows 11 ARM, Ubuntu releases, and Arch Linux ARM. Ubuntu and Arch images use XFCE desktops; each supported guest includes a desktop-control service that agents can use for graphical interaction.

VMs can be created for a selected operating system version and size, then returned to a clean image state with a reset. Checkpoints preserve a VM's disk and memory under a label so an agent can revisit a known state after a risky operation. The server also provides a browser viewer for observing a VM's desktop.

## How it works

The agentpc MCP server is a Rust binary that runs QEMU using Apple's hypervisor support. MCP communication uses stdio, with one server managing multiple VMs. Operations stay on the Mac and the service listens on localhost.

Agents can combine graphical and command-line workflows. Desktop tools handle actions such as clicking, typing, launching applications, and reading the UI tree. Shell commands run through PowerShell on Windows or bash on Ubuntu and Arch. Screenshots come directly from the hypervisor, including when a guest is still booting or is unresponsive.

A foreground command returns its exit code and output, and is terminated at the configured timeout with partial output if necessary. Background commands return a job identifier that can be checked later. Files and directories can move between the Mac and a guest, while SSH-based port forwarding makes services inside a VM reachable from the host, including services bound to the guest's loopback address.

## Setup and configuration

Install with the repository's shell installer. It installs the binary under `~/.local/bin` by default, adds it to `PATH`, installs QEMU through Homebrew when needed, registers the MCP server with supported clients it finds, and runs a diagnostic check. `AGENTPC_VERSION` selects a release, `AGENTPC_INSTALL_DIR` changes the installation location, and `AGENTPC_NO_MCP=1` skips client registration.

The server can be registered manually with a client configuration using the `agentpc` command and the `mcp` argument. The repository documents setup for Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, and VS Code, as well as a generic MCP configuration.

## Tools and capabilities

Available operations cover:

- Listing VMs, images, operating system versions, states, sizes, checkpoints, and viewer URLs.
- Creating, starting, stopping, resetting, and deleting VMs.
- Saving and restoring checkpoints, or deleting individual checkpoints without deleting the VM.
- Taking PNG screenshots and optionally saving them to a Mac path.
- Running guest commands, checking background jobs, and reading QEMU or serial logs.
- Uploading files and folders, forwarding ports, and listing or stopping active forwards.
- Discovering and calling the desktop-control tools installed in a guest.

## Limitations and notes

The host must be an Apple Silicon Mac, such as an M1 or later system, with a compatible macOS version. Running guests require memory and disk space: the documented baseline is 4 GB of memory per Ubuntu or Arch VM, 8 GB per Windows VM, about 10 GB per Ubuntu or Arch image, and about 30 GB per Windows image.

Ubuntu and Arch images can be prepared by agentpc. Windows images cannot be redistributed by the project, so the first Windows setup downloads Microsoft's Windows 11 ARM64 ISO or accepts an existing ISO and builds the image locally. The initial Windows image preparation takes substantially longer than creating later VMs.

The server is local-only by default. Agents still have command execution, file transfer, port forwarding, and graphical input inside the guest, so VM contents and exposed services should be treated according to the permissions granted to the MCP client.

_Full upstream README: https://allmcps.com/mcp/agentpc/readme_

