Rancher MCP Server

Model Context Protocol (MCP) server for the **Rancher ecosystem**: multi-cluster Kubernetes, Harvester HCI (VMs, storage, networks), and Fleet GitOps.

Local serverstdioGo

What is the Rancher MCP server?

Model Context Protocol (MCP) server for the Rancher ecosystem: multi-cluster Kubernetes, Harvester HCI (VMs, storage, networks), and Fleet GitOps. Exposed over MCP by the rancher mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

  • Harvester toolset — List/get VMs, images, volumes, networks, hosts; VM actions; addon list/switch (enable/disable)
  • Kubernetes toolset — List/get/create/patch/delete resources by apiVersion/kind; describe (resource + events), events, capacity
  • Helm toolset — List/get/history of releases; install, upgrade, rollback, uninstall; repo list
  • Fleet toolset — GitRepo list/get/create; Bundle list; Fleet cluster list; drift detection
  • Rancher APIs — Same Bearer token for Steve (/k8s/clusters/...) and Norman (/v3/...); no CLI wrappers
  • Security — Read-only default, disable-destructive, sensitive data masking (Norman token/credential fields redacted unless --show-sensitive-data)

Its toolset

Everything the assistant can do here goes through one of these:

  • harvester_vm_list — List VMs with status, namespace, spec/status
  • harvester_vm_get — Get one VM (full spec and status)
  • harvester_vm_action — start, stop, restart, pause, unpause, migrate
  • harvester_vm_create — Create VM (when not read-only). Supports network, interface_type (managedtap/bridge/masquerade), subnet for KubeOVN VPC
  • harvester_vm_snapshot — Create/list/restore/delete VM snapshots
  • harvester_vm_backup — Create/list/restore VM backups (Backup Target)
  • harvester_image_list — List VM images (VirtualMachineImage)
  • harvester_image_create — Create VM image from URL (when not read-only)
  • harvester_volume_list — List PVCs (Longhorn-backed volumes)
  • harvester_volume_create — Create volume/PVC (optionally from image)
  • harvester_network_list — List VM networks (NetworkAttachmentDefinition)
  • harvester_network_create — Create VM network - KubeOVN overlay or VLAN (when not read-only)

Adding it to your client

rancher-mcp-server on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration

You will need 5 environment variables: RANCHER_MCP_RANCHER_SERVER_URL, RANCHER_MCP_RANCHER_TOKEN, RANCHER_MCP_TOOLSETS, YOUR_TOKEN, YOUR_RANCHER_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

When to reach for it

Plenty of cloud and infrastructure servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Rancher's toolset — harvester_vm_list, harvester_vm_get, harvester_vm_action and 11 more — is a fair guide to whether it matches your workflow. It is maintained by mrostamii; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Rancher.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the rancher mcp server does with a few real requests.

Available tools

ToolWhat it does
harvester_vm_listList VMs with status, namespace, spec/status
harvester_vm_getGet one VM (full spec and status)
harvester_vm_actionstart, stop, restart, pause, unpause, migrate
harvester_vm_createCreate VM (when not read-only). Supports network, interface_type (managedtap/bridge/masquerade), subnet for KubeOVN VPC.
harvester_vm_snapshotCreate/list/restore/delete VM snapshots
harvester_vm_backupCreate/list/restore VM backups (Backup Target)
harvester_image_listList VM images (VirtualMachineImage)
harvester_image_createCreate VM image from URL (when not read-only)
harvester_volume_listList PVCs (Longhorn-backed volumes)
harvester_volume_createCreate volume/PVC (optionally from image)
harvester_network_listList VM networks (NetworkAttachmentDefinition)
harvester_network_createCreate VM network - KubeOVN overlay or VLAN (when not read-only)
harvester_network_updateUpdate VM network config (when not read-only)
harvester_network_deleteDelete VM network (when destructive allowed)

How to install the Rancher MCP server

{
  "mcpServers": {
    "rancher": {
      "command": "npx",
      "args": ["-y", "rancher-mcp-server"],
      "env": {
        "RANCHER_MCP_RANCHER_SERVER_URL": "your-value",
        "RANCHER_MCP_RANCHER_TOKEN": "your-value",
        "RANCHER_MCP_TOOLSETS": "your-value",
        "YOUR_TOKEN": "your-value",
        "YOUR_RANCHER_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
RANCHER_MCP_RANCHER_SERVER_URLEndpoint or connection string the server talks to.Yes
RANCHER_MCP_RANCHER_TOKENCredential the server authenticates with.Yes
RANCHER_MCP_TOOLSETSConfiguration value read at startup.Optional
YOUR_TOKENCredential the server authenticates with.Yes
YOUR_RANCHER_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Rancher to harvester vm list.
  • Use Rancher to harvester vm get.
  • Use Rancher to harvester vm action.

Frequently asked questions

It connects Rancher to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (harvester_vm_list, harvester_vm_get, harvester_vm_action, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Rancher directly.