Rancher

MCP server for Rancher API integration

OtherPythonv0.1.0

Rancher MCP Server

Rancher Mcp Server

GitHub stars GitHub forks GitHub watchers

License Issues Pull Requests Last Commit

Python MCP

Commit Activity Code Size Contributors

A Model Context Protocol (MCP) server for integrating Rancher with GenAI applications.

Overview

Kubernetes management and deployment platform

Features

  • Comprehensive Rancher API coverage
  • Multiple authentication methods
  • Enterprise-ready with rate limiting
  • Full error handling and retry logic
  • Async support for better performance

Installation

pip install rancher-mcp-server

Or install from source:

git clone https://github.com/asklokesh/rancher-mcp-server.git
cd rancher-mcp-server
pip install -e .

Configuration

Create a .env file or set environment variables according to Rancher API requirements.

Quick Start

from rancher_mcp import RancherMCPServer

# Initialize the server
server = RancherMCPServer()

# Start the server
server.start()

License

MIT License - see LICENSE file for details

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
uvx rancher-mcp-server

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-asklokesh-rancher-mcp-server": {
      "command": "uvx",
      "args": [
        "rancher-mcp-server"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

rancher-mcp-serverpypi

Compatible MCP Clients

Rancher works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More