Overview
What is Mcp Cluster Api?
capi-mcp is a tool that integrates Cluster API (CAPI) resources with the Model Context Protocol (MCP), enabling programmatic and prompt-based management of Kubernetes clusters and machines. It is designed for Kubernetes operators and developers who manage clusters declaratively using CAPI.
How to use Mcp Cluster Api?
Build the binary with make build (requires Go, Make, npm, kubectl, and a valid kubeconfig). Run the MCP inspector for testing: npx @modelcontextprotocol/inspector -e KUBECONFIG=kubeconfig.yaml bin/capi-mcp. For use with Claude Desktop or VSCode, add the server configuration to the respective MCP settings file, specifying the absolute path to the binary and the KUBECONFIG environment variable.
Key features of Mcp Cluster Api
- List all CAPI clusters in your environment
- Get detailed cluster information and kubeconfigs
- Check upgrade eligibility for target Kubernetes versions
- List and inspect machines across clusters
- Perform control plane rollout (write operation, requires RBAC permissions)
- Debugging prompts for cluster and machine issues
Use cases of Mcp Cluster Api
- Querying the status of CAPI-managed clusters from AI assistants
- Generating kubeconfigs for accessing workload clusters
- Checking safe upgrade paths before version changes
- Debugging cluster or machine issues with step-by-step guidance
- Triggering control plane rolling updates in natural language
FAQ from Mcp Cluster Api
What are the prerequisites to run this server?
Go 1.20+, Make, npm, kubectl, access to a Kubernetes cluster, and a valid kubeconfig.yaml file with appropriate permissions.
How do I install and build the server?
Clone the repository and run make build to compile the binary.
How do I use it with Claude Desktop?
Configure the server in Claude Desktop’s configuration file (claude_desktop_config.json) by adding the absolute path to the binary and setting the KUBECONFIG environment variable.
What tools does the server provide?
Tools include list_clusters, get_cluster, get_cluster_kubeconfig, `check_upgrade