Harvester MCP Server

by starbops

3 stars
349 downloads
Not rated
GitHub

About

Model Context Protocol (MCP) server for Harvester HCI

Details

Author
starbops
GitHub stars
3
Downloads
349
Categories
Other

- Kubernetes core resources: Pods (List, Get, Delete), Deployments, Services, Namespaces, Nodes (List, Get), CRDs (List)
- Harvester-specific resources: Virtual Machines (List, Get), Images, Volumes, Networks (List)
- Human-readable formatted outputs optimized for LLM consumption
- Automatic grouping of resources by namespace or status
- Concise summaries and detailed views for resource inspection
- Unified resource handler architecture for extensibility

Install from source (git clone && make build) or via go install. Configure with a valid kubeconfig (using --kubeconfig flag, KUBECONFIG env var, or default ~/.kube/config). For Claude Desktop, add the server binary and args to claude_desktop_config.json under mcpServers. Then ask natural-language queries about cluster resources.

Harvester MCP Server

Model Context Protocol (MCP) server for Harvester HCI that enables Claude Desktop, Cursor, and other AI assistants to interact with Harvester clusters through the MCP protocol.

Overview

Harvester MCP Server is a Go implementation of the Model Context Protocol (MCP) specifically designed for Harvester HCI. It allows AI assistants like Claude Desktop and Cursor to perform CRUD operations on Harvester clusters, which are essentially Kubernetes clusters with Harvester-specific CRDs.

Workflow

The following diagram illustrates how Harvester MCP Server bridges the gap between AI assistants and Harvester clusters:

graph LR;
    subgraph "AI Assistants"
        A[Claude Desktop] --> C[MCP Client];
        B[Cursor IDE] --> C;
    end
    
    subgraph "Harvester MCP Server"
        C --> D[MCP Server];
        D --> E[Resource Handler];
        E --> F[Formatter Registry];
        F -->|Get Formatter| G[Core Resource Formatters];
        F -->|Get Formatter| H[Harvester Resource Formatters];
    end
    
    subgraph "Kubernetes / Harvester"
        G --> I[Kubernetes API];
        H --> I;
        I --> J[Harvester Cluster];
    end
    
    style A fill:#f9f,stroke:#333,stroke-width:2px;
    style B fill:#f9f,stroke:#333,stroke-width:2px;
    style D fill:#bbf,stroke:#333,stroke-width:2px;
    style J fill:#bfb,stroke:#333,stroke-width:2px;

How It Works

1. LLM Integration: AI assistants like Claude Desktop and Cursor connect to Harvester MCP Server via the MCP protocol.
2. Request Processing: The MCP Server receives natural language requests from the AI assistants and translates them into specific Kubernetes operations.
3. Resource Handling: The Resource Handler identifies the resource type and operation being requested.
4. Formatter Selection: The Formatter Registry selects the appropriate formatter for the resource type.
5. API Interaction: The server interacts with the Kubernetes API of the Harvester cluster.
6. Response Formatting: Results are formatted into human-readable text optimized for LLM consumption.
7. User Presentation: Formatted responses are returned to the AI assistant to present to the user.

This architecture enables AI assistants to interact with Harvester clusters through natural language, making complex Kubernetes operations more accessible to users.

Features

- Kubernetes Core Resources:

- Pods: List, Get, Delete
- Deployments: List, Get
- Services: List, Get
- Namespaces: List, Get
- Nodes: List, Get
- Custom Resource Definitions (CRDs): List

- Harvester-Specific Resources:

- Virtual Machines: List, Get
- Images: List
- Volumes: List
- Networks: List

- Enhanced User Experience:
- Human-readable formatted outputs for all resources
- Automatic grouping of resources by namespace or status
- Concise summaries with the most relevant information
- Detailed views for comprehensive resource inspection

Requirements

- Go 1.23+
- Access to a Harvester cluster with a valid kubeconfig

Installation

From Source

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.