{"id":34660133,"url":"https://github.com/linode/mcp-cluster-api","last_synced_at":"2026-05-28T19:02:36.735Z","repository":{"id":311789699,"uuid":"991591941","full_name":"linode/mcp-cluster-api","owner":"linode","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-27T14:59:25.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T00:36:19.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-27T21:28:30.000Z","updated_at":"2026-03-27T14:59:27.000Z","dependencies_parsed_at":"2025-08-26T21:42:13.866Z","dependency_job_id":"b4e93954-0321-434f-8fca-5c358f991333","html_url":"https://github.com/linode/mcp-cluster-api","commit_stats":null,"previous_names":["linode/mcp-cluster-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linode/mcp-cluster-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fmcp-cluster-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fmcp-cluster-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fmcp-cluster-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fmcp-cluster-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linode","download_url":"https://codeload.github.com/linode/mcp-cluster-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linode%2Fmcp-cluster-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33622070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T18:52:01.687Z","updated_at":"2026-05-28T19:02:36.729Z","avatar_url":"https://github.com/linode.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# capi-mcp\n\n**capi-mcp** is a tool that integrates [CAPI](https://cluster-api.sigs.k8s.io/) (Cluster API) resources with the [Model Context Protocol (MCP)](https://mcp.so/), enabling programmatic and prompt-based management of Kubernetes clusters and machines.\n\n### What is MCP?\n**MCP (Model Context Protocol)** is an open protocol for describing, invoking, and managing tools and prompts in a standardized way. It enables interoperability between tools, agents, and UIs.\n\n### What is CAPI?\n**CAPI (Cluster API)** is a Kubernetes project to manage Kubernetes clusters declaratively using Kubernetes-style APIs. It provides a consistent way to create, update, and manage clusters and their infrastructure.\n\n## Prerequisites\n\n- [Go](https://golang.org/doc/install) (v1.20+ recommended)\n- [Make](https://www.gnu.org/software/make/)\n- [npm](https://nodejs.org/)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/)\n- Access to a Kubernetes cluster and a valid `kubeconfig.yaml`\n\n## Installation \u0026 Build\n\nClone the repository and build the binary:\n\n```sh\nmake build\n```\n\n## Linting\n\nRun linting (installs golangci-lint if not present):\n\n```sh\nmake lint\n```\n\n## Running \u0026 Testing\n\n**Transport support**: `capi-mcp` supports only stdio transport.\n\nTo run the MCP inspector with your built binary:\n\n```sh\nnpx @modelcontextprotocol/inspector -e KUBECONFIG=kubeconfig.yaml bin/capi-mcp\n```\n\nReplace `kubeconfig.yaml` with your actual kubeconfig file.\n\n## Usage with Claude and VSCode\n\n### Using with Claude Desktop\n\nTo use this MCP server with Claude Desktop, you need to configure it in Claude's settings:\n\n1. **Build the binary** (if not already done):\n   ```sh\n   make build\n   ```\n\n2. **Locate Claude's configuration file**:\n   - On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n   - On Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n   - On Linux: `~/.config/Claude/claude_desktop_config.json`\n\n3. **Add the MCP server configuration**:\n   ```json\n   {\n     \"mcpServers\": {\n       \"capi-mcp\": {\n         \"command\": \"/absolute/path/to/capi-mcp/bin/capi-mcp\",\n         \"env\": {\n           \"KUBECONFIG\": \"/absolute/path/to/your/kubeconfig.yaml\"\n         }\n       }\n     }\n   }\n   ```\n\n4. **Restart Claude Desktop** to load the new configuration.\n\n5. **Verify the connection**: In a new conversation with Claude, you should see that the CAPI MCP server is connected and running through developer settings.\n\u003cimg width=\"2578\" height=\"1226\" alt=\"image\" src=\"https://github.com/user-attachments/assets/953dc171-0d08-40aa-ade3-67b67fc5aad4\" /\u003e\n\n\n### Using with VSCode\n\n#### Via Claude Extension\n\nIf you're using Claude through a VSCode extension that supports MCP:\n\n1. **Install the Claude extension** from the VSCode marketplace.\n\n2. **Configure the MCP server** in your VSCode settings or the extension's configuration file:\n   ```json\n   {\n     \"claude.mcpServers\": {\n       \"capi-mcp\": {\n         \"command\": \"/absolute/path/to/capi-mcp/bin/capi-mcp\",\n         \"env\": {\n           \"KUBECONFIG\": \"/absolute/path/to/your/kubeconfig.yaml\"\n         }\n       }\n     }\n   }\n   ```\n\n3. **Restart VSCode** to apply the configuration.\n\n#### Via VSCode Toolsets\n\nYou can also integrate this MCP server with VSCode toolsets for enhanced development workflows:\n\n1. **Create a toolset configuration** in your workspace:\n   - Open the Command Palette (`Cmd/Ctrl + Shift + P`)\n   - Run \"Toolsets: Configure Toolsets\" \n   - Add a new toolset configuration\n\n2. **Configure the CAPI MCP toolset**:\n   ```json\n   {\n     \"name\": \"CAPI MCP Server\",\n     \"description\": \"Cluster API management via MCP\",\n     \"tools\": [\n       {\n         \"name\": \"capi-mcp\",\n         \"command\": \"/absolute/path/to/capi-mcp/bin/capi-mcp\",\n         \"env\": {\n           \"KUBECONFIG\": \"/absolute/path/to/your/kubeconfig.yaml\"\n         },\n         \"protocol\": \"mcp\"\n       }\n     ]\n   }\n   ```\n\n3. **Use the toolset**:\n   - Access via the Toolsets panel in the sidebar\n   - Invoke tools directly from the Command Palette\n   - Integrate with other VSCode AI features and extensions\n\nThis allows you to use CAPI management tools directly within your VSCode development environment alongside other development toolsets.\n\n### Available Tools and Prompts\n\nOnce connected, you can use Claude to:\n\n**Tools:**\n- `list_clusters` - List all CAPI clusters in your Kubernetes environment\n- `get_cluster` - Get detailed information about a specific cluster\n- `get_cluster_kubeconfig` - Generate and retrieve a kubeconfig for accessing a CAPI cluster\n- `check_upgrade_eligibility` - Verify if a cluster can be safely upgraded to a target Kubernetes version\n- `list_machines` - List all machines (nodes) across clusters\n- `get_machine` - Get detailed information about a specific machine\n- `get_kube_resource` - Get any Kubernetes resource by name, kind, and API version\n- `rollout_controlplane` - Rollout a restart of control plane (triggers rolling update - **non-read-only**)\n- `get_control_plane_status` - Get status of control plane components for a CAPI cluster\n\n**Prompts:**\n- `debug_capi_cluster` - Get step-by-step debugging guidance for cluster issues\n- `debug_capi_machine` - Get step-by-step debugging guidance for machine issues\n- `restart_control_plane` - Get step-by-step instructions for restarting a cluster's control plane\n\n### Example Usage\n\nAsk Claude / Copilot questions like:\n- \"Show me all my CAPI clusters\"\n- \"What's the status of my cluster named 'production'?\"\n- \"List all machines in the cluster 'staging'\"\n- \"Get me the kubeconfig for my cluster 'dev-cluster' in namespace 'default'\"\n- \"Check if my cluster can be upgraded to Kubernetes v1.32.0\"\n- \"Help me debug my cluster using the debug_capi_cluster prompt\"\n- \"Get the status of control plane components for my cluster\"\n- \"Get the deployment named 'my-app' in the default namespace using kind 'Deployment' and apiVersion 'apps/v1'\"\n\n**Note**: Make sure your `kubeconfig.yaml` file has the necessary permissions to access CAPI resources in your Kubernetes cluster. Some tools like `rollout_controlplane` are write operations and require appropriate RBAC permissions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinode%2Fmcp-cluster-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinode%2Fmcp-cluster-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinode%2Fmcp-cluster-api/lists"}