rancher-mcp

v1.82.0
io.github.rex/rancher-mcp Checked 11 hours ago Published 13 days ago

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

Values you need

VariableWhat it is
RANCHER_URLrequired Rancher server URL (single-instance mode)
RANCHER_TOKENrequired secret Rancher API token (token-xxxxx:yyyyyyyyy)
RANCHER_VERIFY_SSLoptional Verify TLS certificates (default true)
RANCHER_INSTANCES_JSONoptional secret Multi-instance config JSON (overrides single-instance mode; supports per-instance read_only)

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add rancher-mcp -e 'RANCHER_TOKEN=<RANCHER_TOKEN>' -e 'RANCHER_URL=<RANCHER_URL>' -- uvx rancher-mcp==1.82.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "rancher-mcp": {
      "args": [
        "rancher-mcp==1.82.0"
      ],
      "command": "uvx",
      "env": {
        "RANCHER_TOKEN": "<RANCHER_TOKEN>",
        "RANCHER_URL": "<RANCHER_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "rancher-mcp": {
      "args": [
        "rancher-mcp==1.82.0"
      ],
      "command": "uvx",
      "env": {
        "RANCHER_TOKEN": "<RANCHER_TOKEN>",
        "RANCHER_URL": "<RANCHER_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "RANCHER_TOKEN",
      "id": "rancher-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "RANCHER_URL",
      "id": "rancher-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "rancher-mcp": {
      "args": [
        "rancher-mcp==1.82.0"
      ],
      "command": "uvx",
      "env": {
        "RANCHER_TOKEN": "${input:rancher-token}",
        "RANCHER_URL": "${input:rancher-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.rancher-mcp]
command = "uvx"
args = ["rancher-mcp==1.82.0"]
env = { "RANCHER_TOKEN" = "<RANCHER_TOKEN>", "RANCHER_URL" = "<RANCHER_URL>" }

For AI agents

  1. Ask the user for: RANCHER_URL, RANCHER_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: rancher_instance_list, rancher_capability_domain_list, rancher_server_profile_get, rancher_server_health, rancher_server_version, rancher_api_plane_list, rancher_norman_schema_list, rancher_norman_schema_get, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json