Kubernetes MCP server for LLM agents — 91 tools covering CRUD on workloads/services/storage/RBAC, logs/events, Prometheus queries, NVIDIA GPU diagnostics, plus pod & deployment diagnosis / RBAC & NetworkPolicy & resource-usage analyzers / owner-chain explain.
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"k8s-mcp-bilbilmyc","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
<div align="center"> # k8s-mcp **面向 LLM Agent 的、可控 Kubernetes MCP Server** [English](./README.en.md) · [快速开始](./docs/quickstart.md) · [安全模型](./docs/security.md) · [GPU 运维](./docs/gpu.md) · [完整文档](./docs/README.md) · [贡献](./CONTRIBUTING.md) [](https://github.com/bilbilmyc/k8s-mcp/actions/workflows/ci.yml) [](https://www.python.org/) [](./LICENSE) [](https://modelcontextprotocol.io/) </div> `k8s-mcp` 将 Kubernetes 运维能力以 MCP 工具暴露给 Claude、Cursor、Cline、Cherry Studio 等 Agent。当前提供 **91 个**工具,覆盖资源检索、日志与事件、工作负载交付、RBAC/NetworkPolicy 分析、Prometheus、告警通知、集群诊断与 NVIDIA GPU 运维。 > [!IMPORTANT] > **默认允许读写与删除。** 需要审计、演练或诊断时,显式设置 `K8S_MCP_READ_ONLY=true` 进入只读模式。生产写入仍建议配置 `K8S_MCP_NAMESPACE_ALLOWLIST` 与最小 RBAC。 ## 为什么选择它 - **安全可控**:可随时切换只读模式、namespace 写入边界、每工具限流、调用超时、有界 worker pool、Kubernetes 错误脱敏。 - **Agent 友好**:工具说明提供参数约束与下一步建议;诊断、解释和分析工具减少“先 list 再猜”的多轮调用。 - **可运营**:`doctor` 命令、可复现的组件 manifest、CI 中的工具数/文档/版本一致性检查。 - **可渐进授权**:从只读 `view` 身份开始;仅为需要写入的 namespace 配置窄权限 Role。 ## 5 分钟快速开始 ### 1. 安装并自检 ```bash pip install k8s-mcp-bilbilmyc k8s-mcp --help k8s-mcp doctor ``` `doctor` 不会连接集群,也不会输出 token;它显示生效的默认值、认证来源、传输边界和配置警告。默认输出中 `read_only` 为 `false`。 ### 2. 准备 Kubernetes 凭据 ```bash export KUBECONFIG="$HOME/.kube/config" # 已使用默认路径时可省略 ``` 详细认证路径(kubeconfig、API Server token、in-cluster)见[快速开始](./docs/quickstart.md)。 ### 3. 配置 MCP 客户端 ```json { "mcpServers": { "k8s": { "command": "k8s-mcp", "env": { "KUBECONFIG": "/absolute/path/to/kubeconfig" } } } } ``` `k8s-mcp` 默认以 stdio 启动;`serve` 仅保留为显式别名。若客户端能访问默认 `~/.kube/config`,上面的 `env` 也可以省略。客户端配置、Windows 路径和排障请看[快速开始](./docs/quickstart.md)。 ### 4. 必要时切换为只读模式 ```bash export …
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.