Rancher

v1.0.0Cloud Servicesstable

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

ranchermcpai-integration
Share:
10
Stars
0
Downloads
0
Weekly
0/5

What is Rancher?

Rancher is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server for the rancher ecosystem: multi-cluster kubernetes, harvester hci (vms, storage, networks), and fleet gitops.

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

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Model Context Protocol (MCP) server for the Rancher ecosyste

Use Cases

Manage multi-cluster Kubernetes and Harvester HCI through AI.
Automate VM, storage, and network management.
Implement Fleet GitOps workflows with AI assistance.
mrostamii

Maintainer

LicenseApache-2.0
Languagego
Versionv1.0.0
UpdatedApr 27, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx rancher

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Rancher

The Rancher MCP Server brings multi-cluster Kubernetes management, Harvester HCI infrastructure control, Helm release management, and Fleet GitOps operations into AI assistants through a Go-based MCP server. It supports five independent toolsets (rancher, kubernetes, harvester, helm, fleet), runs in read-only mode by default for safety, and can be deployed via npm or Docker.

Prerequisites

  • Rancher 2.x instance accessible over HTTPS with a valid API token (obtain from Profile > Account & API Keys in the Rancher UI)
  • Node.js 18+ for npx/npm installation, or Go 1.21+ to build from source, or Docker for containerized deployment
  • Claude Desktop or another MCP-compatible client
  • Rancher API token in the format token-xxxxx:yyyy
  • Network access from the machine running Claude Desktop to the Rancher server URL
1

Obtain a Rancher API token

Log into the Rancher UI, navigate to your profile in the top-right corner, select Account & API Keys, and create a new API key. Copy the token in the format token-xxxxx:yyyy — you will need it for all configuration methods.

2

Install the package via npm (optional)

Install rancher-mcp-server globally with npm to avoid downloading it each time. Alternatively, npx with -y will download and run it on demand without a global install.

npm install -g rancher-mcp-server

# Or build from Go source:
git clone https://github.com/mrostamii/rancher-mcp-server.git
cd rancher-mcp-server
go build -o rancher-mcp-server ./cmd/rancher-mcp-server
3

Configure Claude Desktop with inline flags

Add the rancher server to claude_desktop_config.json. Pass the server URL, token, and desired toolsets as command-line arguments. The server runs read-only by default.

{
  "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"
      ]
    }
  }
}
4

Alternative: Configure with environment variables

Keep credentials out of the args array by passing them as environment variables. This is recommended for shared or version-controlled config files.

{
  "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": "rancher,kubernetes,helm,fleet,harvester"
      }
    }
  }
}
5

Enable write operations if needed

The server defaults to read-only mode. To allow resource creation and modification, set --read-only=false. To also allow deletions, add --disable-destructive=false.

# Add these args to enable writes:
"--read-only=false"

# Also add this to allow deletions:
"--disable-destructive=false"
6

Restart Claude Desktop and verify

Restart Claude Desktop to activate the Rancher MCP server. Ask Claude to list Rancher clusters to confirm the connection is working.

Rancher Examples

Client configuration

claude_desktop_config.json entry for the Rancher MCP server using environment variables for credentials and all five toolsets enabled.

{
  "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": "rancher,kubernetes,harvester,helm,fleet",
        "RANCHER_MCP_READ_ONLY": "true"
      }
    }
  }
}

Prompts to try

Sample prompts for managing Kubernetes clusters, Harvester VMs, Helm releases, and Fleet GitOps bundles through the Rancher MCP server.

- "List all Rancher clusters and their status"
- "Show me all running VMs in Harvester and their resource usage"
- "List all Helm releases in the production namespace of the local cluster"
- "Show me all Fleet bundles and which ones have drift detected"
- "Get all pods in the kube-system namespace of the downstream cluster"
- "List Rancher users and their assigned roles"

Troubleshooting Rancher

Authentication error: 401 Unauthorized when connecting to Rancher

Verify the Rancher API token is in the correct format (token-xxxxx:yyyy). Tokens are shown only once when created in the Rancher UI — if lost, create a new one. Ensure the token has not expired and has sufficient permissions for the requested resources.

TLS certificate verification error connecting to Rancher

If your Rancher instance uses a self-signed or private CA certificate, add RANCHER_MCP_TLS_INSECURE=true to the env block. For production environments, configure the proper CA certificate on the machine running the MCP server instead.

Tools from a specific toolset (e.g., helm or fleet) are not appearing

Confirm the toolset name is included in RANCHER_MCP_TOOLSETS or the --toolsets argument. Valid values are: harvester, rancher, kubernetes, helm, fleet. The default is harvester only, so all other toolsets must be explicitly listed.

Frequently Asked Questions about Rancher

What is Rancher?

Rancher is a Model Context Protocol (MCP) server that model context protocol (mcp) server for the rancher ecosystem: multi-cluster kubernetes, harvester hci (vms, storage, networks), and fleet gitops. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Rancher?

Follow the installation instructions on the Rancher GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Rancher?

Rancher works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Rancher free to use?

Yes, Rancher is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "rancher": { "command": "npx", "args": ["-y", "rancher"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Rancher?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides