home / mcp / harvester mcp server

Harvester MCP Server

Go-based MCP server enabling AI assistants to perform CRUD operations on Harvester clusters via the MCP protocol.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "starbops-harvester-mcp-server": {
      "command": "/path/to/harvester-mcp-server",
      "args": [
        "--kubeconfig",
        "/path/to/kubeconfig.yaml",
        "--log-level",
        "info"
      ]
    }
  }
}

You can run a Go-based MCP server that lets AI assistants interact with Harvester clusters through the Model Context Protocol. This server translates natural language requests into Kubernetes operations, formats results for easy reading, and exposes Harvester resources to tools like Claude Desktop and Cursor.

How to use

Use an MCP client such as Claude Desktop or Cursor to connect to the Harvester MCP Server. Configure the client to point at the local or remote MCP instance, then ask natural language questions or give CRUD-oriented requests. The server handles resource identification, formatter selection, and presents human-readable results tailored for large language model consumption. You can perform common operations like listing resources, inspecting details, or querying Harvester-specific resources such as virtual machines, images, volumes, and networks.

How to install

Prerequisites you need before installing the Harvester MCP Server are a Go toolchain (Go 1.23+) and access to a Harvester cluster with a valid kubeconfig. You will also need a system where you can run commands and build binaries.

# Clone the repository
git clone https://github.com/starbops/harvester-mcp-server.git
cd harvester-mcp-server

# Build
make build

# Run
./bin/harvester-mcp-server

Alternatively, you can install the MCP server from source using Go's module mechanism and run the server directly if you prefer not to build locally. Run the following command to install the latest version and then start it as needed.

go install github.com/starbops/harvester-mcp-server/cmd/harvester-mcp-server@latest

Configuration and running notes

When you run the server, it will automatically look for Kubernetes configuration in a specific order: in-cluster configuration, a kubeconfig specified by a flag, the KUBECONFIG environment variable, or the default location at ~/.kube/config. Use the provided command-line flags to customize behavior, including the kubeconfig path and log level.

Usage:
  harvester-mcp-server [flags]

Flags:
  -h, --help                help for harvester-mcp-server
      --kubeconfig string   Path to the kubeconfig file (default is $KUBECONFIG or $HOME/.kube/config)
      --log-level string    Log level (debug, info, warn, error, fatal, panic) (default "info")

Example for Claude Desktop configuration

Configure Claude Desktop to use the Harvester MCP Server by adding a Harvester MCP entry in the mcpServers section of Claude Desktop’s configuration. The snippet shows how to point Claude Desktop to the local Harvester MCP Server and pass kubeconfig and log level options.

{
  "mcpServers": {
    "harvester": {
      "command": "/path/to/harvester-mcp-server",
      "args": ["--kubeconfig", "/path/to/kubeconfig.yaml", "--log-level", "info"]
    }
  }
}

Practical usage tips

After configuring Claude Desktop, you can ask questions such as which nodes exist in your cluster, what pods are running in a specific namespace, or inspect details of a particular resource. The MCP server will return human-friendly summaries and allow deeper inspection on demand.

Troubleshooting and notes

If the Harvester MCP Server fails to start, verify that the kubeconfig is reachable and that you have network access to the Harvester cluster. Check the log level for additional details and ensure the binary path in your MCP client configuration is correct. If you are running inside a cluster, ensure the in-cluster configuration is available and that the Harvester MCP Server process has the necessary permissions to access Kubernetes resources.