# Rancher MCP

> Rancher MCP is an open-source MCP server. Capability-aware MCP server for Rancher-managed Kubernetes: discovery, resources, workflows. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/rex/mcp-rancher
- **MCP Registry name:** io.github.rex/rancher-mcp
- **Listing updated:** 2026-11-13

## About

Capability-aware MCP server for Rancher-managed Kubernetes: discovery, resources, workflows.

## Install

### Claude Code (Terminal)

```sh
claude mcp add rancher-mcp --env RANCHER_URL='<RANCHER_URL>' --env RANCHER_TOKEN='<RANCHER_TOKEN>' --env RANCHER_INSTANCES_JSON='<RANCHER_INSTANCES_JSON>' -- uvx rancher-mcp
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "rancher-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "rancher-mcp"
      ],
      "env": {
        "RANCHER_URL": "<RANCHER_URL>",
        "RANCHER_TOKEN": "<RANCHER_TOKEN>",
        "RANCHER_INSTANCES_JSON": "<RANCHER_INSTANCES_JSON>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## FAQ

### Is Rancher MCP free?

Yes. Rancher MCP is open source, so you can use and self-host it for free.

### How do I add Rancher MCP to Claude Code?

Run this command in your terminal: claude mcp add rancher-mcp --env RANCHER_URL='<RANCHER_URL>' --env RANCHER_TOKEN='<RANCHER_TOKEN>' --env RANCHER_INSTANCES_JSON='<RANCHER_INSTANCES_JSON>' -- uvx rancher-mcp

---
Source: https://ai-powered.com/mcp/rancher-mcp
