
Mcp K8s Ro
io.github.your-ko由 GitHub 帳號 your-ko 發布v1.2.2更新於 Oct 30, 2026
Read-only Kubernetes MCP server: inspect resources, logs, events, and metrics. Secrets are masked.
概覽
唯讀的 Kubernetes MCP 伺服器,讓助理列出與檢視資源、讀取 Pod 日誌與事件,並查詢 CPU/記憶體用量。
- 可以做什麼
- 列出並檢視叢集資源,支援任意資源類型及其完整 YAML
- 透過 discovery API 列出可用資源類型,可依 API 群組篩選
- 讀取 Pod 日誌,支援選擇容器、指定行數以及查看崩潰前的日誌
- 依命名空間或整個叢集列出 Kubernetes 事件,依時間由新到舊
- 檢視每個 Pod 與每個節點的 CPU 與記憶體用量,並顯示占可分配容量的百分比
- 適用情境
- 適合值班與排錯情境:讓助理在不變更叢集的前提下檢視 Pod 狀態、重啟次數、日誌、事件與資源壓力。也適合希望每個伺服器實例固定對應一個叢集內容的團隊。
- 執行需求
- 以 stdio 本機程序執行,可使用預先編譯的執行檔或 Docker 映像。需要 kubeconfig 檔案,透過 KUBECONFIG 指定,預設為 ~/.kube/config,並需具備目標叢集的憑證。指標類工具要求叢集已部署 metrics-server。macOS 執行檔未簽章,需要繞過 Gatekeeper。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp K8s Ro,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[Main] [golangci-lint] [Link validation]
mcp-k8s-ro
A read-only MCP server that gives Claude access to Kubernetes clusters. Built in Go, it communicates over stdio using the MCP protocol.
Design
- Read-only — only
get,describe,logs, andtopstyle operations. No create, update, or delete. If a mutating operation is needed, the server prints the equivalentkubectlcommand for you to run manually. Safe to use while on-call at night: Claude can never accidentally mutate your cluster, even under prompt fatigue. - Secret-safe — secret values are masked before being sent to the model, so your secrets cannot leak due to misconfiguration or prompt injection.
- Token-efficient — responses include only relevant fields (name, status, restarts, etc.) rather than raw Kubernetes API objects, keeping context usage low.
- Cluster-aware — every response includes the active context and cluster name, so Claude always knows which cluster it is talking to.
- Context-pinned — the server locks to the active kubeconfig context at startup. Switching contexts in another terminal has no effect on the running server.
- No extra infra — runs as a local binary or Docker container, connects to whatever kubeconfig context is active at startup.
Redacted fields
Tools
Configuration
Usage with Claude
Docker (recommended)
Pinning a specific version (check the latest release ) is recommended for production use:
Binary
Download a pre-built binary from GitHub Releases:
macOS Gatekeeper: The binary is not code-signed, so macOS will block it. The
xattrcommand above removes the quarantine flag. Alternatively, go to System Settings → Privacy & Security and click "Allow Anyway" after the first blocked attempt. [img.png]
Or build from source:
Custom kubeconfig location
If your kubeconfig is not at ~/.kube/config, set the KUBECONFIG environment variable:
Single-cluster design
The server intentionally operates on one kubeconfig context and provides no tool to switch clusters at runtime. The reasons are:
- Prompt injection isolation — a malicious value in one cluster's resources (e.g. a pod annotation) cannot instruct Claude to pivot to a different cluster, including production.
- Explicit audit boundary — every tool response includes the context and cluster name, so there is never ambiguity about which cluster was queried.
To point the server at a different cluster, stop the server, switch context, and restart:
To work with multiple clusters simultaneously, register a separate server instance per cluster in your MCP config:
Claude will address each server by name and each instance only ever sees its own cluster.
MCP registry
This server is published on registry.modelcontextprotocol.io
來源:README.md,提交 d083672
工具
0版本歷史
2- v1.2.2最新Oct 30, 2026
- v1.2.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分