rancher
MCP server from futuretea/rancher-mcp-server
claude mcp add --transport stdio futuretea-rancher-mcp-server npx -y @futuretea/rancher-mcp-server@latest --rancher-server-url https://your-rancher-server.com --rancher-token your-token
How to use
This Rancher MCP Server provides a centralized Model Context Protocol (MCP) interface over the Rancher API, allowing you to manage multiple Kubernetes clusters through Rancher with a unified set of tools. It exposes a suite of capabilities via the Steve API for Kubernetes resources (CRUD operations on pods, deployments, services, ConfigMaps, Secrets, CRDs, etc.), advanced features like patching, describing with events, filtering and searching resources, querying container logs, multi-pod log aggregation, and viewing rollout histories. It also offers Rancher-specific resource discovery through Norman API for clusters and projects, along with security controls to restrict write operations and sensitive data visibility. Output formats include table, YAML, and JSON, with configurable output filtering and pagination to tailor responses to your needs. The server supports multiple platforms and ships as a Node-based MCP server via an npm package, executable through npx or in your preferred tooling.
To use it, install and run the server using your Rancher server URL and a valid bearer token (or access key/secret). The CLI flags and environment variables let you enable/disable features, set the listening port, configure output formats, and control sensitive data exposure. Once running, you can access endpoints such as /healthz for health checks, /mcp for streamable MCP operations, and /sse for Server-Sent Events-based streaming. The toolset is designed to work with kubernetes and rancher toolchains, enabling safe, auditable multi-cluster management across your Rancher-managed environments.
How to install
Prerequisites:
- Node.js (version 14+ recommended) and npm/yarn installed on your system
- Access to a Rancher server with a valid API token
- (Optional) Docker if you prefer containerized usage
Install and run using npx (recommended):
- Ensure you have Node.js and npm installed
- Run the MCP server via npx (no global install required):
npx @futuretea/rancher-mcp-server@latest --rancher-server-url https://your-rancher-server.com --rancher-token your-token
Configure via environment variables (optional):
- RANCHER_MCP_PORT
- RANCHER_MCP_RANCHER_SERVER_URL
- RANCHER_MCP_RANCHER_TOKEN
Alternatively, if you prefer a local install (not required):
npm install -g @futuretea/rancher-mcp-server@latest
rancher-mcp-server --rancher-server-url https://your-rancher-server.com --rancher-token your-token
For VS Code / Claude Code integration, you can store the configuration in a mcp.json file as shown in the README:
{
"servers": {
"rancher": {
"command": "npx",
"args": [
"-y",
"@futuretea/rancher-mcp-server@latest",
"--rancher-server-url",
"https://your-rancher-server.com",
"--rancher-token",
"your-token"
]
}
}
}
Additional notes
Tips and known considerations:
- Security: The server supports a global show_sensitive_data flag to mask sensitive data by default. Consider enabling it in production and using per-tool overrides if needed.
- Output and filtering: Use output_filters to remove verbose fields (e.g., metadata.managedFields) for cleaner responses. Adjust list_output (json, table, yaml) to fit downstream tooling.
- Access controls: Use read_only and disable_destructive to prevent unintended changes during audits or in CI environments.
- Environment prefix: When using environment variables, prefix with RANCHER_MCP_ (e.g., RANCHER_MCP_RANCHER_TOKEN) to match the documented convention.
- Port and URLs: If deploying behind a reverse proxy, supply sse-base-url so clients can correctly connect via the public URL.
- Toolsets: By default, the toolsets include kubernetes and rancher; enable or disable specific tools as needed for your environment.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go