Skip to main content
The Orka MCP server lets an AI agent start a clean macOS VM in your Orka cluster, work in it over SSH, and delete it when it’s done. Any client that supports the Model Context Protocol (MCP) can connect, including Claude Code and Cursor. The server runs inside your cluster, next to the Orka API, so it’s reachable on the same network you already use for Orka. It’s off by default, and MacStadium turns it on per cluster. For the tools the server provides, see Orka MCP server tools.

How access works

The agent signs in with an Orka service account token. Every request the server makes to Orka runs as that service account, so the agent can do what the service account can do in its namespace, and nothing more. An agent only sees the VMs its service account created through Orka. It can’t list, inspect, or delete VMs that people or other service accounts created, even in the same namespace, and an admin’s token gets no wider view through the MCP server. Agents that use the same service account share VMs, so give each agent its own.

Before you begin

  • Your cluster is hosted by MacStadium.
  • You’re an Orka admin, so you can create service accounts.
  • The commands on this page use the orka CLI from Orka 4.0. On an Orka 3.6 cluster, use orka3 instead. The commands and flags are the same.
  • You’re connected to your cluster’s network (for example, over the VPN), and so is the machine where the agent runs.

Connect an agent

1

Enable the MCP server

Contact MacStadium support and ask to turn on the Orka MCP server for your cluster. MacStadium turns it on and sends you the server’s URL, which looks like https://<CUSTOMER>.orka.app/mcp.
2

Create a service account for the agent

Create one service account for each agent. Don’t reuse a person’s service account, or one that your CI pipelines use.Orka adds the new service account to the orka-dev role binding in its namespace, which is the access the MCP server needs. For more on service accounts, see Manage Orka service accounts for CI/CD.
3

Get a token for the service account

Give the token a short lifetime, such as 720h (30 days). Without --duration, it lasts 1 year, and Orka can return a different lifetime than the one you ask for. The MCP server doesn’t renew tokens, so when the token expires, the agent’s requests fail until you give it a new one.To cut an agent off, delete its service account. That revokes its token within about 10 seconds. See Which credential should you use, and how long does it last?
4

Add the server to your MCP client

The server uses the streamable HTTP transport and reads the token from an Authorization: Bearer header.
To make the server available in every project, add --scope user. Don’t use --scope project, which writes the token into .mcp.json in your repository.
Treat the token as a full Orka account, not just an MCP key. It also works with the orka CLI and kubectl, and it can delete images and VM configs in its namespace. Keep it out of files you commit, and use your client’s support for environment variables or secret storage where it has one.
5

Check the connection

Ask the agent to list its Orka VMs. A new agent has none yet, so an empty list means the connection and token work. An authentication error means the token is wrong or has expired.

Work inside a VM

The server doesn’t run commands inside a VM. When the agent deploys a VM, the server waits until the VM answers on SSH, then returns its SSH host and port, and the agent connects over SSH to do its work. The result also includes VNC and Screen Sharing ports, when the VM has them. The SSH username and password come from the image the VM was created from, so the agent needs the image’s credentials. MacStadium’s base images ship with well-known default credentials, so change them in any image you give an agent. See Understanding Orka credentials.

Clean up

Each VM the agent creates uses capacity in your cluster until it’s deleted. Ask the agent to delete VMs when it’s finished with them. If an agent crashes or loses track of a VM, it can list the VMs it owns and delete the ones it no longer needs. If a deploy times out or the connection drops, the agent should retry it with the same idempotency_key, which returns the same VM instead of starting a second one.

What the MCP server doesn’t do yet

The first release covers the VM lifecycle only. It deploys from OCI images, and it doesn’t:
  • Run commands inside a VM without SSH
  • Check capacity before it deploys a VM
  • Report per-VM usage, or limit how much a single agent can use