harvester
Model Context Protocol (MCP) server for Harvester HCI
claude mcp add --transport stdio starbops-harvester-mcp-server ./bin/harvester-mcp-server \ --env LOG_LEVEL="debug|info|warn|error (default: info)" \ --env KUBECONFIG="Path to kubeconfig file (optional; server will fall back to in-cluster config if running in cluster)"
How to use
Harvester MCP Server enables AI assistants like Claude Desktop and Cursor to interact with Harvester clusters via the MCP protocol. It translates natural language commands into Kubernetes/Harvester API operations, formats results into human-readable text, and returns them to the AI client for presentation. The server exposes tools for both Kubernetes core resources (Pods, Deployments, Services, Namespaces, Nodes, etc.) and Harvester-specific resources (Virtual Machines, Images, Volumes, Networks), with standardized formatters to produce concise lists and detailed views optimized for LLM consumption.
To use the server, run it with access to a kubeconfig for your Harvester cluster (or run inside a cluster to use in-cluster configuration). Then configure your MCP client (e.g., Claude Desktop) to point at the Harvester MCP Server endpoint. Once connected, you can ask high-level questions like: “List all virtual machines in the default namespace” or “Show details for the pod named rancher-789c976c6-xbvmd in cattle-system.” The MCP server will handle request parsing, resource handling, formatting, and response delivery, providing human-friendly outputs suitable for AI assistants to present to users.
How to install
Prerequisites:
- Go 1.23+ installed on your machine
- Access to a Harvester cluster with a kubeconfig file (or run inside a Kubernetes cluster with proper permissions)
From Source
- Clone the repository:
git clone https://github.com/starbops/harvester-mcp-server.git
cd harvester-mcp-server
- Build the server binary:
make build
- Run the server (requires kubeconfig or in-cluster config):
./bin/harvester-mcp-server
Using Go install
go install github.com/starbops/harvester-mcp-server/cmd/harvester-mcp-server@latest
- Run the installed binary (if installed via Go install):
harvester-mcp-server
Optional with kubeconfig path or log level:
harvester-mcp-server --kubeconfig=/path/to/kubeconfig.yaml --log-level=debug
Additional notes
Tips and considerations:
- Ensure your kubeconfig has sufficient privileges to read the resources you want to query (rbac considerations).
- The server automatically discovers kubeconfig in this order: in-cluster config, --kubeconfig flag, KUBECONFIG env var, default ~/.kube/config.
- If you plan to run inside a Kubernetes cluster, consider running with appropriate service account permissions and configuring network access for your MCP clients.
- When using Claude Desktop or similar tools, add the Harvester MCP server under the mcpServers section with the correct command path and, optionally, kubeconfig and log level.
- If you add new resources, register their tooling in the MCP server (types.go mappings, formatters, and server registration).
- For debugging, run with --log-level=debug and inspect the formatted outputs for any adjustments needed in formatter logic.
Related MCP Servers
yokai
Simple, modular, and observable Go framework for backend applications.
agentcontrolplane
ACP is the Agent Control Plane - a distributed agent scheduler optimized for simplicity, clarity, and control. It is designed for outer-loop agents that run without supervision, and make asynchronous tool calls like requesting human feedback on key operations. Full MCP support.
jetski
Authentication, analytics, and prompt visibility for MCP servers with zero code changes. Supports OAuth2.1, DCR, real-time logs, and client onboarding out of the box
k8s
Manage Your Kubernetes Cluster with k8s mcp-server
sandbox
A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.
github-brain
An experimental GitHub MCP server with local database.