rancher
MCP server for Rancher - Kubernetes management and deployment platform
claude mcp add --transport stdio lokimcpuniverse-rancher-mcp-server python -m rancher_mcp \ --env RANCHER_API_URL="https://<your-rancher-server>" \ --env RANCHER_API_TOKEN="Your Rancher API token"
How to use
This MCP server provides an integration layer between Rancher and GenAI applications. It exposes Rancher APIs through the MCP framework, enabling model-driven interactions with your Kubernetes cluster, deployments, and resources via MCP requests. Once running, you can configure environment variables for authenticating with your Rancher instance and then use the MCP endpoints to query resources, manage deployments, or trigger actions from your GenAI workflows. The server is designed with comprehensive error handling and retry logic to ensure reliable operation in production environments.
How to install
Prerequisites:
- Python 3.8+ and pip
- Git
Option A: Install from PyPI
- Install the package from PyPI:
pip install rancher-mcp-server - Run the MCP server (module-based entry point):
python -m rancher_mcp
Option B: Install from source
- Clone the repository:
git clone https://github.com/LokiMCPUniverse/rancher-mcp-server.git cd rancher-mcp-server - Install in editable mode:
pip install -e . - Run the MCP server:
python -m rancher_mcp
Configuration:
- Create or set a .env file or export environment variables for Rancher authentication as described in the README (e.g., RANCHER_API_TOKEN and RANCHER_API_URL).
Additional notes
Notes and tips:
- Ensure your Rancher API token has sufficient permissions for the operations you intend to perform.
- Set RANCHER_API_URL to the base URL of your Rancher server (e.g., https:// rancher.example.com).
- The server reads configuration from environment variables; consider using a .env file for local development.
- If you encounter authentication errors, verify token scope and Rancher server URL reachability.
- For production deployments, consider enabling rate limiting and retry backoffs as supported by the MCP framework.
Related MCP Servers
hootsuite
MCP server for Hootsuite - Social media management platform
uipath
MCP server for UiPath - Robotic Process Automation (RPA) platform
google-maps
Google Maps MCP Server: Connect AI Agents to Places, Directions, Geocoding & Roads APIs. Deployed on Kubernetes.
rundeck
MCP server for Rundeck - Runbook automation and job scheduling
mailchimp
MCP server for Mailchimp - Email marketing and automation platform
argocd
MCP server for ArgoCD - GitOps continuous delivery for Kubernetes with GenAI