> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macstadium.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Orka MCP server tools

> Reference for the Orka MCP server tools that AI agents use to deploy, inspect, list, save, and delete macOS VMs, with arguments, results, and error codes.

The Orka MCP server provides five tools for the VM lifecycle. To connect an agent, see [Connect an AI agent to the Orka MCP server](https://docs.macstadium.com/orka/orka-devops-integrations/orka-mcp-server.md).

Every tool acts as the service account whose token the agent presents, and only acts on VMs that service account created. A VM that another service account created behaves as if it doesn't exist, even for an admin.

## vm\_deploy

Starts a macOS VM from an OCI image and waits, for up to 10 minutes, until it's running and answers on SSH. It returns the VM, in the same form as `vm_get`.

The following table lists the arguments.

| Argument | Required | Description |
| - | - | - |
| `image` | Yes | An OCI image reference, for example `ghcr.io/macstadium/orka-images/tahoe:latest`. The MCP server supports OCI images, not names from the Orka image catalog. |
| `idempotency_key` | Yes | Any string up to 256 characters, unique for each VM you want. |
| `cpu` | No | CPU cores. Defaults to 3. |
| `memory_gib` | No | Memory in GiB. Defaults to your cluster's setting for the CPU count. |
| `namespace` | No | The Orka namespace. Defaults to the service account's own namespace. |

The server names the VM from the namespace, the service account, and the `idempotency_key`, so you don't choose the name. That makes `vm_deploy` safe to retry:

* A retry with the same key and arguments returns the same VM, and waits for it if it's still starting. Retry this way after a timeout or a lost connection, instead of deploying a new VM.
* A retry with the same key and different arguments fails with `idempotency_key_conflict`.
* Once a VM is fully deleted, you can use its key again. While it's still being deleted, a deploy with that key fails with `internal`. Wait a few seconds and retry.

If the deploy fails because the image can't be pulled, no node can take the VM, or the VM never answers on SSH, the server deletes the VM. A VM that a retry found is never deleted, because the agent may already be using it.

## vm\_get

Returns one VM.

The following table lists the arguments.

| Argument | Required | Description |
| - | - | - |
| `name` | Yes | The VM's name. |
| `namespace` | No | The Orka namespace. Defaults to the service account's own namespace. |

The following table lists the fields in the result.

| Field | Description |
| - | - |
| `name`, `namespace` | The VM's name and namespace. |
| `status` | `Pending`, `Running`, or `Failed`. A VM that Orka hasn't picked up yet is `Pending`. |
| `ssh_host`, `ssh_port` | Where to connect over SSH. `ssh_port` is missing until the VM is running. |
| `vnc_port`, `screen_share_port` | Ports on `ssh_host` for VNC and Screen Sharing, when the VM has them. |
| `image` | The image the VM was deployed from. |
| `cpu`, `memory`, `node` | The VM's CPU cores, memory, and the node it runs on. |
| `created_at` | When the VM was created. |
| `error_message` | Why the deployment failed, when `status` is `Failed`. |
| `push` | The VM's latest `vm_push`: its target image, status (`Pending`, `Running`, `Succeeded`, or `Failed`, with `error_message` on failure), and `started_at`. Missing when the VM has no push in the last hour. |

The result doesn't include SSH credentials. They come from the image.

## vm\_list

Lists the VMs this service account created, sorted by name.

The following table lists the arguments.

| Argument | Required | Description |
| - | - | - |
| `namespace` | No | The Orka namespace. Defaults to the service account's own namespace. |
| `limit` | No | VMs per page, from 1 to 200. Defaults to 50. |
| `cursor` | No | The `next_cursor` from the previous page. |

The result has `vms`, a list of VMs in the same form as `vm_get`, and `next_cursor` when there are more pages.

## vm\_push

Saves a running VM as an OCI image and pushes it to a registry. It returns right away, and the push runs in the background. To follow it, call `vm_get` and read `push`.

The following table lists the arguments.

| Argument | Required | Description |
| - | - | - |
| `name` | Yes | The VM's name. The VM must be `Running`. |
| `image` | Yes | The full OCI reference to push to, for example `registry.example.com/team/ci-base:1.2`. |
| `namespace` | No | The Orka namespace. Defaults to the service account's own namespace. |

The result is the VM's `name`, `namespace`, and `push`, in the same form as `vm_get` reports it.

Your namespace needs credentials for the target registry. Add them with `orka regcred add`. See [Manage OCI registry credentials in Orka](https://docs.macstadium.com/orka/oci-images/oci-images-manage-registry-credentials.md).

`vm_push` is safe to retry: a retry while that VM's push to the same image is still running returns that push. A push to a different image while one is running fails with `push_in_progress`.

## vm\_delete

Deletes a VM.

The following table lists the arguments.

| Argument | Required | Description |
| - | - | - |
| `name` | Yes | The VM's name. |
| `namespace` | No | The Orka namespace. Defaults to the service account's own namespace. |

The result is the VM's `name` and `namespace`. `vm_delete` is safe to retry: it returns the same result whether it deleted the VM, the VM was already gone, or another service account created it. It returns once Orka accepts the delete, and Orka finishes removing the VM afterward.

## Errors

A failed tool call returns an MCP tool error. Its text starts with a code, followed by a message, for example `vm_not_found: no VM named "ci-1" in namespace "orka-default" was created by this service account`.

The following table lists the codes.

| Code | Meaning |
| - | - |
| `invalid_argument` | An argument is wrong, or Orka rejected the VM's settings. The message says why. |
| `vm_not_found` | This service account has no VM with that name. A VM another service account created gets the same error. |
| `forbidden` | The service account can't act on VMs in that namespace. |
| `auth_failed` | Orka stopped accepting the token during the call, for example because it expired. Get a new token. |
| `image_not_found` | Orka couldn't pull the image. Either the image doesn't exist, or your namespace's registry credentials don't give access to it. |
| `capacity_unavailable` | No node can take the VM, or it was still `Pending` after 10 minutes. |
| `idempotency_key_conflict` | The `idempotency_key` already names a VM with different arguments. |
| `push_in_progress` | The VM already has a push running to a different image. Wait for it to finish, then retry. |
| `internal` | Something failed on the server, or the VM started but didn't answer on SSH. Retry after a few seconds, and don't assume the call succeeded. |

A call with a missing required argument, such as `vm_get` without `name`, is rejected before the tool runs. Its error text starts with `validating "arguments"`.

A request with a missing or rejected token doesn't reach the tools at all: the server answers with HTTP `401`, which your MCP client reports as an authentication error.


## Related topics

- [Connect an AI agent to the Orka MCP server](https://docs.macstadium.com/orka/orka-devops-integrations/orka-mcp-server.md)
- [Use these docs with AI tools](https://docs.macstadium.com/macstadium/macstadium-overview/use-these-docs-with-ai-tools.md)
- [Orka Desktop 3.0 local macOS virtualization tool](https://docs.macstadium.com/orka/orka-desktop/welcome-to-orka-desktop-30.md)
- [Working with Orka VM metadata and custom tags](https://docs.macstadium.com/orka/orka-resources/working-with-vm-metadata.md)
- [Orka component versions by release](https://docs.macstadium.com/orka/orka-upgrades-and-release-notes/orka-component-versions.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.