Rancher MCP Server logo

Rancher MCP Server

by mrostamii

MCP server for Rancher ecosystem managing multi-cluster Kubernetes, Harvester HCI, Helm, and Fleet GitOps.

Install Rancher MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mrostamii-rancher-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "rancher-mcp-server"
      ],
      "env": {
        "RANCHER_MCP_RANCHER_SERVER_URL": "YOUR_VALUE_HERE",
        "RANCHER_MCP_RANCHER_TOKEN": "YOUR_VALUE_HERE",
        "RANCHER_MCP_TOOLSETS": "YOUR_VALUE_HERE",
        "RANCHER_MCP_READ_ONLY": "YOUR_VALUE_HERE",
        "RANCHER_MCP_DISABLE_DESTRUCTIVE": "YOUR_VALUE_HERE",
        "RANCHER_MCP_SHOW_SENSITIVE_DATA": "YOUR_VALUE_HERE",
        "RANCHER_MCP_TRANSPORT": "YOUR_VALUE_HERE",
        "RANCHER_MCP_PORT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y rancher-mcp-server

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1mo ago.

Overview

This MCP server integrates with the Rancher ecosystem to provide management capabilities across multi-cluster Kubernetes environments, Harvester HCI (virtual machines, storage, networks), Helm releases, and Fleet GitOps resources. It supports read-only and writable operations with security features like sensitive data masking and destructive action controls. Use it to automate or script Rancher cluster and resource management via the MCP protocol.

Use cases

  • Manage Kubernetes clusters and resources across multiple clusters
  • Control Harvester HCI virtual machines, storage, and network components
  • Operate Helm releases including install, upgrade, rollback, and uninstall
  • Manage Fleet GitOps repositories, bundles, and cluster drift detection
  • Automate Rancher Norman and Steve API interactions for users, tokens, and settings

Key features

  • Harvester toolset for VM, image, volume, network, and host management
  • Rancher toolset accessing clusters, projects, users, tokens, and settings
  • Kubernetes resource CRUD operations with event and capacity descriptions
  • Helm release lifecycle management and repository listing
  • Fleet GitOps management including GitRepo and drift detection
  • Security controls: read-only default, disable destructive actions, sensitive data masking

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

6/6 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2d ago via OSV.dev · rancher-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars12Stargazers on the source repository.
npm downloads210Package downloads in the last 30 days.
Last commit15d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

rancher-mcp-server

GitHub License npm GitHub release (latest SemVer) Build MCP Badge

rancher-mcp-server banner

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

Demo

A walkthrough of how this MCP server works (example in Cursor).

https://github.com/user-attachments/assets/7d8fb814-e504-47b4-956d-28f43aeea3b8

Features

  • Harvester toolset: List/get VMs, images, volumes, networks, hosts; VM actions; addon list/switch (enable/disable)
  • Rancher toolset: Clusters and projects via Steve (management proxy); Norman management API (/v3) for schemas, users, tokens, auth configs, global role bindings, cluster registration tokens, node drivers, cloud credentials, catalogs, cluster repos, feature flags, settings, audit (when exposed); support bundle and generic actions when writes are enabled
  • 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)
  • Config: Flags, env (RANCHER_MCP_*), or file (YAML/TOML)

Quick start

Install

Terminal
npm install -g rancher-mcp-server

Cursor

Add to .cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global):

config.json
{
  "mcpServers": {
    "rancher": {
      "command": "npx",
      "args": [
        "-y", "rancher-mcp-server",
        "--rancher-server-url", "https://rancher.example.com",
        "--rancher-token", "token-xxxxx:yyyy",
        "--toolsets", "harvester,rancher,kubernetes,fleet"
      ]
    }
  }
}

Restart Cursor after saving. Check Settings → Tools & MCP that rancher is listed and enabled.

Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

config.json
{
  "mcpServers": {
    "rancher": {
      "command": "npx",
      "args": [
        "-y", "rancher-mcp-server",
        "--rancher-server-url", "https://rancher.example.com",
        "--rancher-token", "token-xxxxx:yyyy",
        "--toolsets", "harvester,rancher,kubernetes,fleet"
      ]
    }
  }
}

With env vars instead of args

If you prefer to keep the token out of the JSON config:

config.json
{
  "mcpServers": {
    "rancher": {
      "command": "npx",
      "args": ["-y", "rancher-mcp-server"],
      "env": {
        "RANCHER_MCP_RANCHER_SERVER_URL": "https://rancher.example.com",
        "RANCHER_MCP_RANCHER_TOKEN": "token-xxxxx:yyyy",
        "RANCHER_MCP_TOOLSETS": "harvester,rancher,kubernetes"
      }
    }
  }
}

Enable write operations

For VM create, snapshots, backups, image/volume create, addon switch, host maintenance mode, VPC create/update/delete, VPC NAT gateway create, Harvester setting updates, Kubernetes create/patch/delete, Helm install/upgrade/rollback, Fleet gitrepo create/delete, and Norman writes (tokens, users, auth configs, role bindings, cluster registration tokens, cloud credentials, catalog refresh, feature flags, settings, rancher_norman_action, support bundle), add --read-only=false. Delete operations (Norman tokens/bindings/registration tokens/cloud credentials, VPC NAT gateway delete, plus existing toolset deletes) also require --disable-destructive=false (default).

config.json
{
  "mcpServers": {
    "rancher": {
      "command": "npx",
      "args": [
        "-y", "rancher-mcp-server",
        "--rancher-server-url", "https://rancher.example.com",
        "--rancher-token", "token-xxxxx:yyyy",
        "--toolsets", "harvester,rancher,kubernetes,helm,fleet",
        "--read-only=false"
      ]
    }
  }
}

Streamable HTTP transport

For web clients or remote access (e.g. Claude Code claude mcp add -t http), add --transport and --port:

config.json
{
  "mcpServers": {
    "rancher": {
      "command": "npx",
      "args": [
        "-y", "rancher-mcp-server",
        "--rancher-server-url", "https://rancher.example.com",
        "--rancher-token", "token-xxxxx:yyyy",
        "--transport", "http",
        "--port", "8080"
      ]
    }
  }
}

The server uses the MCP Streamable HTTP transport. The default MCP path is /mcp; connect to http://localhost:8080/mcp (or your server base URL + /mcp). Best supported with Claude Code; Cursor support may vary.

Build from source

If you prefer to build the Go binary yourself:

bash
go build -o rancher-mcp-server ./cmd/rancher-mcp-server

Then reference the binary directly in your MCP config:

config.json
{
  "mcpServers": {
    "rancher": {
      "command": "/absolute/path/to/rancher-mcp-server",
      "args": [
        "--rancher-server-url", "https://rancher.example.com",
        "--rancher-token", "token-xxxxx:yyyy",
        "--toolsets", "harvester,rancher,kubernetes,fleet"
      ]
    }
  }
}

Configuration

OptionEnvDefaultDescription
--rancher-server-urlRANCHER_MCP_RANCHER_SERVER_URL—Rancher server URL (required)
--rancher-tokenRANCHER_MCP_RANCHER_TOKEN—Bearer token (required)
--tls-insecureRANCHER_MCP_TLS_INSECUREfalseSkip TLS verification
--read-onlyRANCHER_MCP_READ_ONLYtrueDisable write operations
--disable-destructiveRANCHER_MCP_DISABLE_DESTRUCTIVEfalseDisable delete operations
--show-sensitive-dataRANCHER_MCP_SHOW_SENSITIVE_DATAfalseShow Norman token/credential fields without redaction (use with care)
--toolsetsRANCHER_MCP_TOOLSETSharvesterToolsets to enable: harvester, rancher, kubernetes, helm, fleet
--transportRANCHER_MCP_TRANSPORTstdioTransport: stdio or http (Streamable HTTP; default path /mcp)
--portRANCHER_MCP_PORT0Port for HTTP (0 = stdio only)

Harvester tools

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Rancher MCP Server

Add the flag --read-only=false to enable write operations and --disable-destructive=false to allow delete operations.

Yes, use the --transport http and --port flags to enable streamable HTTP transport for remote clients.

You can pass Rancher server URL and token via environment variables prefixed with RANCHER_MCP_ or as command-line arguments.

It uses the Steve API for cluster and project management and the Norman API (/v3) for schemas, users, tokens, and other management functions.

No, sensitive fields are masked by default and only shown if the --show-sensitive-data flag is set.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRancher MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mrostamii-rancher-mcp-server?style=directory)](https://allmcps.com/mcp/mrostamii-rancher-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/mrostamii-rancher-mcp-server"><img src="https://allmcps.com/api/badge/mrostamii-rancher-mcp-server?style=directory" alt="Rancher MCP Server on AllMCPs" /></a>