{"id":51436460,"url":"https://github.com/kaneg/k8s-mcp-go","last_synced_at":"2026-07-05T07:02:04.875Z","repository":{"id":361584192,"uuid":"1255020816","full_name":"kaneg/k8s-mcp-go","owner":"kaneg","description":"Safe Kubernetes access for AI agents via MCP. Read-only by default, with explicit permission modes.","archived":false,"fork":false,"pushed_at":"2026-06-20T13:31:03.000Z","size":65,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T14:35:43.830Z","etag":null,"topics":["ai-agents","claude-desktop","cursor","devops","k8s","kubectl","kubernetes","mcp","mcp-server"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaneg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-31T09:50:40.000Z","updated_at":"2026-06-20T13:28:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kaneg/k8s-mcp-go","commit_stats":null,"previous_names":["kaneg/k8s-mcp-go"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kaneg/k8s-mcp-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaneg%2Fk8s-mcp-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaneg%2Fk8s-mcp-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaneg%2Fk8s-mcp-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaneg%2Fk8s-mcp-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaneg","download_url":"https://codeload.github.com/kaneg/k8s-mcp-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaneg%2Fk8s-mcp-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35145900,"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-07-05T02:00:06.290Z","response_time":100,"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":["ai-agents","claude-desktop","cursor","devops","k8s","kubectl","kubernetes","mcp","mcp-server"],"created_at":"2026-07-05T07:01:58.985Z","updated_at":"2026-07-05T07:02:03.302Z","avatar_url":"https://github.com/kaneg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-mcp-go\n\n**Safe, read-only-by-default Kubernetes access for AI agents.**\n\nA Kubernetes MCP server that lets AI assistants inspect your cluster safely — without giving them unrestricted `kubectl`.\n\n![GitHub release](https://img.shields.io/github/v/release/kaneg/k8s-mcp-go?sort=semver)\n![License](https://img.shields.io/github/license/kaneg/k8s-mcp-go)\n![Go](https://img.shields.io/badge/Go-1.24+-00ADD8)\n![MCP](https://img.shields.io/badge/MCP-Kubernetes-326CE5)\n\n## What makes it different\n\n- **Read-only by default**: useful for diagnosis without giving AI permission to mutate the cluster.\n- **Explicit permission modes**: choose `readonly`, `readwrite`, or `dangerous` before the assistant starts.\n- **No Docker required**: install via MCPB bundles or a single native binary.\n- **Kubernetes-native visibility**: inspect pods, deployments, services, logs, events, nodes, and live CPU/memory usage.\n- **Registry-ready distribution**: published as `io.github.kaneg/k8s-mcp-go` for MCP Registry consumers and packaged clients.\n\n## Distribution\n\n- [MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.kaneg/k8s-mcp-go): published as `io.github.kaneg/k8s-mcp-go`.\n- [PulseMCP](https://www.pulsemcp.com/servers/kaneg-k8s-mcp-go): indexed from the MCP ecosystem with the official `server.json`.\n- [Claude Code Marketplaces](https://claudemarketplaces.com/mcp/kaneg/k8s-mcp-go): listed with MCPB installation metadata.\n\n## Why\n\nMost AI agents can use Kubernetes tools.\nThe real problem is **how to stop them from changing the wrong thing**.\n\nGiving an AI raw `kubectl` access is risky. Even a capable model can:\n\n- delete the wrong resource\n- restart the wrong workload\n- apply a dangerous change\n- turn a debugging session into a production incident\n\n`k8s-mcp-go` gives AI agents a **guardrailed interface** to Kubernetes instead of unrestricted shell access.\n\nIt is built for the real-world question:\n\n\u003e How can I let AI help with Kubernetes, without letting it break my cluster?\n\n## Permission Modes\n\nYou choose the boundary up front:\n\n| What you want | Mode |\n|---------------|------|\n| \"Let AI inspect and diagnose, but change nothing\" | `readonly` |\n| \"Allow safe operational actions like scale and restart\" | `readwrite` |\n| \"Give it full cluster power\" | `dangerous` |\n\n### `readonly` (default)\nFor diagnosis, inspection, and safe exploration.\n\nAI can do things like:\n- list pods, deployments, services, nodes, and namespaces\n- read logs and events\n- inspect cluster state\n- check resource usage\n\nIt **cannot** modify workloads or delete resources.\n\n### `readwrite`\nFor controlled operational workflows.\n\nAI can do things like:\n- scale deployments\n- restart deployments\n- restart statefulsets\n- update images\n- patch deployments\n- create namespaces\n\nIt still cannot perform the most destructive operations.\n\n### `dangerous`\nFull access.\n\nUse this only when you explicitly want AI to be able to:\n- delete resources\n- delete namespaces\n- apply arbitrary YAML\n\nIf you are unsure, use `readonly`.\n\n## Quick Start\n\n### Option 1: MCPB Install (Recommended)\n\nDownload the `.mcpb` bundle for your platform from [Releases](https://github.com/kaneg/k8s-mcp-go/releases/latest). MCPB-compatible clients (Claude Desktop, Cursor, etc.) can install it directly — no Docker, no Go, no manual setup.\n\n| OS | Arch | File |\n|----|------|------|\n| Linux | x86_64 | `k8s-mcp-go_*_linux_amd64.mcpb` |\n| Linux | ARM64 | `k8s-mcp-go_*_linux_arm64.mcpb` |\n| macOS | Intel | `k8s-mcp-go_*_darwin_amd64.mcpb` |\n| macOS | Apple Silicon | `k8s-mcp-go_*_darwin_arm64.mcpb` |\n| Windows | x86_64 | `k8s-mcp-go_*_windows_amd64.mcpb` |\n| Windows | ARM64 | `k8s-mcp-go_*_windows_arm64.mcpb` |\n\n### Option 2: Manual Binary Install\n\nGrab the binary archive from [Releases](https://github.com/kaneg/k8s-mcp-go/releases/latest) and extract it:\n\n```bash\n# Example: Linux x86_64\ntar xzf k8s-mcp-go_*_linux_amd64.tar.gz\nchmod +x k8s-mcp-go\nsudo mv k8s-mcp-go /usr/local/bin/\n```\n\nThen add it to your MCP client.\n\n**Claude Desktop** (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"k8s\": {\n      \"command\": \"k8s-mcp-go\",\n      \"args\": [\"-mode=readonly\"]\n    }\n  }\n}\n```\n\n**Cursor** (`.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"k8s\": {\n      \"command\": \"k8s-mcp-go\",\n      \"args\": [\"-mode=readonly\"]\n    }\n  }\n}\n```\n\nRestart your client and start asking questions about your cluster.\n\n## Example prompts\n\nOnce installed, ask your AI assistant things like:\n\n- \"Show me unhealthy pods in all namespaces.\"\n- \"Which pods are using the most memory?\"\n- \"Summarize recent warning events.\"\n- \"Inspect this deployment and explain why it is not ready.\"\n- \"Check rollout status for this deployment.\"\n\nIn `readonly` mode, the assistant can investigate but cannot change the cluster.\n\n## Why not just use kubectl?\n\nBecause the problem is not whether AI can talk to Kubernetes.\nThe problem is whether it can do so **safely**.\n\n`kubectl` is powerful, but it does not give you a product-level permission mode for AI behavior.\nWith `k8s-mcp-go`, you decide whether the assistant can:\n\n- inspect only\n- perform limited operational actions\n- or get full control\n\n**The permission boundary is the product.**\n\n## Available Tools (35 total)\n\nTools are grouped by permission level.\nNames start with an action verb such as `get`, `list`, or `delete`; `top_nodes`\nand `top_pods` retain Kubernetes' established `kubectl top` terminology.\n\n### Readonly (24)\n\n| Tool | Description |\n|------|-------------|\n| `get_server_info` | Show server version, mode, Kubernetes config source, and runtime details |\n| `resolve_workload` | Resolve an app/workload name to matching resources and suggested next tools |\n| `list_pods` | List pods; supports `all_namespaces=true` |\n| `get_pod` | Get pod details |\n| `get_pod_logs` | Get pod logs |\n| `list_deployments` | List deployments; supports `all_namespaces=true` |\n| `get_deployment` | Get deployment details |\n| `list_statefulsets` | List StatefulSets; supports `all_namespaces=true` |\n| `get_statefulset` | Get StatefulSet details |\n| `list_services` | List services; supports `all_namespaces=true` |\n| `get_service` | Get service details |\n| `list_configmaps` | List ConfigMaps; supports `all_namespaces=true` |\n| `get_configmap` | Get ConfigMap data |\n| `list_secrets` | List Secrets (keys only); supports `all_namespaces=true` |\n| `get_secret` | Get Secret metadata and keys |\n| `list_pvc` | List PersistentVolumeClaims; supports `all_namespaces=true` |\n| `list_ingress` | List Ingress resources; supports `all_namespaces=true` |\n| `list_jobs` | List Jobs; supports `all_namespaces=true` |\n| `top_nodes` | Current node CPU and memory usage |\n| `top_pods` | Current pod CPU and memory usage |\n| `list_nodes` | List cluster nodes |\n| `list_namespaces` | List namespaces |\n| `get_cluster_overview` | Cluster health summary |\n| `list_events` | List events |\n\n### Readwrite (7)\n\n| Tool | Description |\n|------|-------------|\n| `scale_deployment` | Scale deployment replicas |\n| `restart_deployment` | Rolling restart a deployment |\n| `restart_statefulset` | Rolling restart a statefulset |\n| `set_image` | Update container image |\n| `get_rollout_status` | Check rollout progress |\n| `create_namespace` | Create a new namespace |\n| `patch_deployment` | Apply strategic merge patch |\n\n### Dangerous (7)\n\n| Tool | Description |\n|------|-------------|\n| `delete_pod` | Delete a pod |\n| `delete_deployment` | Delete a deployment |\n| `delete_statefulset` | Delete a StatefulSet and its pods |\n| `delete_daemonset` | Delete a DaemonSet and its pods |\n| `delete_resource` | Delete a resource without a dedicated delete tool |\n| `delete_namespace` | Delete a namespace and all resources |\n| `apply_yaml` | Apply arbitrary YAML manifest |\n\nPrefer the dedicated delete tools above when one exists. Use `delete_resource`\nas the fallback for other kinds. It resolves namespaced versus cluster-scoped\nresources through Kubernetes discovery.\n\n```json\n{\"api_version\":\"v1\",\"kind\":\"ServiceAccount\",\"namespace\":\"apps\",\"name\":\"builder\"}\n{\"api_version\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"ClusterRole\",\"name\":\"auditor\"}\n```\n\n## Kubernetes Configuration\n\nConfiguration is selected in this order:\n\n1. The file specified by `KUBECONFIG`, when set.\n2. The Pod's in-cluster ServiceAccount configuration.\n3. `~/.kube/config` when running outside a cluster.\n\nAn explicit `KUBECONFIG` is authoritative. If it cannot be loaded, the server\nreturns an error instead of silently switching to the Pod's ServiceAccount.\nIn-cluster configuration uses Kubernetes' mounted token file so projected\nServiceAccount token rotation continues to work without copying tokens into a\nkubeconfig.\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `KUBECONFIG` | Explicit kubeconfig path. When unset, use in-cluster configuration or fall back to `~/.kube/config`. |\n\n## Build from Source\n\n```bash\ngit clone https://github.com/kaneg/k8s-mcp-go.git\ncd k8s-mcp-go\ngo build -o k8s-mcp-go .\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaneg%2Fk8s-mcp-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaneg%2Fk8s-mcp-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaneg%2Fk8s-mcp-go/lists"}