# rancher-mcp [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/rex/mcp-rancher  
**GitHub Stars:** 0  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/rancher-mcp

## Description
319 tools for Rancher-managed Kubernetes over MCP: discovery, generic access, operator workflows

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "rancher-mcp": {
    "command": "uvx",
    "args": ["rancher-mcp"],
    "env": {
      "RANCHER_URL": "",
      "RANCHER_TOKEN": "",
      "RANCHER_READ_ONLY": "",
      "RANCHER_INSTANCES_JSON": "",
      "RANCHER_DEFAULT_INSTANCE": "",
      "RANCHER_TOOLSETS": ""
    }
  }
}
```

**Requires environment variables:** `RANCHER_URL`, `RANCHER_TOKEN`, `RANCHER_READ_ONLY`, `RANCHER_INSTANCES_JSON`, `RANCHER_DEFAULT_INSTANCE`, `RANCHER_TOOLSETS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What rancher-mcp does

rancher-mcp exposes Rancher-managed Kubernetes operations through the Model Context Protocol. It is designed for Rancher environments where management data and cluster resources may be exposed through different API surfaces. The server works with Rancher’s Norman `/v3` API, Steve `/v1` API, and Kubernetes resources reached through Rancher’s proxy.

Its tool registry covers discovery, schema inspection, generic resource operations, typed reads, guarded mutations, and higher-level operator tasks. The registry includes 207 tools: 179 read-only tools, 28 write tools, and 5 destructive tools. Supported areas include clusters, nodes, projects, namespaces, workloads, pods, services, storage, networking, RBAC, authentication, applications, catalogs, monitoring, logging, policy reports, compliance, backups, Longhorn, Fleet, provisioning, alerts, and settings.

## How it works

The server separates its capabilities into three layers. Discovery tools identify the Rancher version, available schemas, API planes, and supported capability domains. The generic engine then provides resource listing, retrieval, creation, updates, deletion, actions, links, and watches for resources exposed by either API plane. Curated tools provide typed inputs and shaped responses for common operational tasks, with suggested next steps included in responses.

Operator rollups combine several checks into focused workflows. Examples include cluster health checks, failing-pod searches, stalled-rollout detection, project health summaries, and waiting for a rollout to complete. Every configured instance can be selected with an optional `instance` argument.

Safety controls apply around these operations. An instance marked `read_only` rejects mutations before sending them, and its HTTP client only performs reads. Requests are constrained to the resource named by their arguments, while confirmation phrases, human approval, audit logging, rate limiting, and data masking provide additional controls. Secret values and certificate keys are masked in tool output.

## Setup and configuration

The normal runtime requires `uv` and Python 3.12 or newer, which `uv` supplies when using the published package. A Rancher API token is also required. The simplest client configuration runs `uvx rancher-mcp` with `RANCHER_URL` and `RANCHER_TOKEN` environment variables. Source checkouts can be started with `uv run --directory /path/to/mcp-rancher rancher-mcp`, and the development setup uses the repository’s `make setup` and `make dev` commands.

Multiple Rancher installations can be configured with `RANCHER_INSTANCES_JSON`. Each instance can define its URL, token, SSL verification behavior, and read-only status. `RANCHER_DEFAULT_INSTANCE` selects the default, and must refer to a configured instance. The `RANCHER_READ_ONLY` setting can be used as an additional read-only control.

The server communicates over stdio and can be registered with Claude Code, Claude Desktop, or another MCP client that accepts a JSON server entry. Tool exposure can be reduced for constrained hosts with `RANCHER_TOOLSETS`; otherwise, the full registry remains available.

## Tools and capabilities

Representative tool groups include:

- Discover Rancher versions, schemas, and capability domains.
- List and manipulate generic Norman or Steve resources.
- Inspect pods, deployments, Longhorn volumes, policy reports, and other typed domains.
- Scale or restart deployments, suspend CronJobs, cordon nodes, and create secrets through guarded write tools.
- Run cluster, project, pod, and rollout operator workflows.
- Watch resources and wait for rollout changes.

The generic engine is useful when a Rancher resource does not have a dedicated curated tool. Curated tools are intended for common paths where typed models and structured output are preferable.

_Full upstream README: https://allmcps.com/mcp/rancher-mcp/readme_

