kubevirt
A simple Model Context Protocol server for KubeVirt
claude mcp add --transport stdio lyarwood-kubevirt-mcp-server ./kubevirt-mcp-server \ --env KUBECONFIG="path/to/your/kubeconfig"
How to use
This MCP server provides a set of Tools and Resources for managing KubeVirt virtual machines via the Model Context Protocol. It exposes tools such as list_vms, start_vm, stop_vm, restart_vm, pause_vm, unpause_vm, create_vm, delete_vm, patch_vm, list_instancetypes, get_instancetype, get_preference, get_vm_instancetype, get_vm_status, get_vm_conditions, get_vm_phase, and get_vm_disks. Widgets for prompts include describe_vm, troubleshoot_vm, and health_check_vm, enabling rich VM descriptions, diagnostics, and health checks. The Resources endpoints allow querying VMs, VMIs, DataVolumes, and instance types at both namespace and cluster scope. You can use these endpoints to enumerate VMs, fetch complete specifications, status, console access details, and related runtime information. To operate, run the MCP server and use your MCP client (e.g.,Claude CLI) to invoke tools by name with the appropriate URIs and payloads. Authentication and cluster access are managed via your KUBECONFIG and Kubernetes credentials set in your environment.
How to install
Prerequisites:
- Go toolchain or a prebuilt binary for kubevirt-mcp-server
- Access to a Kubernetes cluster with KubeVirt deployed
- Docker or Make installed if building from source
Install steps:
-
Clone the repository: git clone <your-repo> cd kubevirt-mcp-server
-
Build the server (recommended via Makefile): make build
// If the binary is built, note the path, e.g. ./kubevirt-mcp-server
-
(Optional) Run with the built binary: ./kubevirt-mcp-server
-
Ensure environment is configured to access your Kubernetes cluster (KUBECONFIG or in-cluster config).
-
If using Claude CLI integration, point your Claude config to the running binary and provide KUBECONFIG in the environment block.
Additional notes
Tips and common issues:
- Ensure KUBECONFIG is correctly set so the server can access the cluster resources (VMS, VMIs, DataVolumes, etc.).
- When creating VMs, the server supports OS name lookup, optional instancetype, and VM preferences; supply the required fields in the payload.
- Use the resources endpoints to browse available instance types and preferences before creation to avoid invalid configurations.
- For local development with kubevirtci, use the provided scripts (scripts/kubevirtci.sh and scripts/sync.sh) to bootstrap a test environment and run the MCP server with cluster access.
- If you encounter URI parsing or tool invocation errors, verify that the MCP tool names match exactly (e.g., list_vms, start_vm, get_vm_status) and that the namespace is correct.
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