Janus

io.github.tonylchang由 GitHub 帳號 tonylchang 發布v0.4.1更新於 Oct 24, 2026

Secure Kubernetes MCP server: scoped, redacted diagnostics and human-approved writes

概覽

AI 產生的概覽

Janus 是本地 MCP 伺服器,讓 AI 助理以受限、去識別化的方式讀取 Kubernetes 叢集,寫入操作需人工核准。

可以做什麼
檢視 Pod、工作負載、服務、事件、日誌、端點、配額與即時 CPU/記憶體用量,以及含去識別化範本差異的推出歷史(get_pods、describe_deployment、get_events 等工具)。透過 get_cluster_summary 工具或 cluster://summary 資源取得叢集概觀。使用 diagnose_namespace 提示範本進行引導式排查,依序檢視概觀、Pod、警告、日誌並提出診斷。提出受保護的寫入操作,例如滾動重啟與回復、擴縮、刪除 Pod、CronJob 暫停/恢復/觸發與節點封鎖,每項都需在 MCP 用戶端人工確認,且僅在維運人員啟用後才會註冊。
適用情境
適合想讓 AI 助理協助排查與維運 Kubernetes 叢集,又不願把 kubeconfig 或叢集憑證貼進聊天視窗或外部 API 的情境。也適合預設只做唯讀診斷、對破壞性操作要求人工核准流程的團隊。
執行需求
以 Python 套件(uvx、uv tool 或 pipx)或容器映像透過 stdio 在本機執行。需要 KUBECONFIG 與設定檔(例如位於 ~/.config/janus-mcp),用來設定 kubeconfig 內容、命名空間與啟用的工具。需要能連線至 Kubernetes API 伺服器的網路。清單未宣告驗證、環境變數或標頭。
安裝前請注意
伺服器持有你的 KUBECONFIG 並對叢集具備管理權限,應保持本機執行並審閱最小權限 RBAC 清單。寫入工具(重啟、回復、擴縮、刪除 Pod、CronJob 操作、節點封鎖)會改變叢集狀態,應審慎啟用,並依賴 MCP 用戶端中的人工核准。去識別化採規則比對,處理敏感工作負載前應先核實輸出。專案仍在積極開發中。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Janus,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Janus — Kubernetes-native MCP server that protects secrets and blocks leaks to LLMs]

Two faces. One cluster. No exposed keys.

janus-mcp.ns47.com · PyPI · Changelog


What is Janus?

Janus is an MCP (Model Context Protocol) server that gives AI assistants a safe, controlled window into your Kubernetes clusters. It runs locally, holds your KUBECONFIG close to its chest, and lets the LLM operate through carefully‑scoped tools — so you get the power of an AI copilot without ever shipping a token, certificate, or API server URL to a third‑party model.

Named after the Roman god of gateways (who famously looks both ways at once), Janus faces the LLM with clean, declarative tool definitions, and faces your cluster with full administrative access — while ensuring the two never meet inappropriately.

The problem

LLMs are incredibly useful for debugging, operating, and reasoning about Kubernetes. But the moment you paste a KUBECONFIG into a chat window or send it to an external API, you’ve handed over the keys to your kingdom. For most organisations, that’s a non‑starter.

Self‑hosting a model helps, but not everyone can or wants to run frontier‑grade LLMs locally. Janus gives you a third path: keep the credentials on‑prem (or on your laptop) and let the remote model work with sanitised, high‑level cluster information only.

How it works

┌──────────────┐       ┌────────────────┐       ┌───────────────┐│ LLM Client   │<─────>│ Janus (local)  │<─────>│ Kubernetes    ││ (Claude,     │   MCP │ holds the      │   k8s │ API Server    ││ VS Code,     │       │ KUBECONFIG     │   API │               ││ custom)      │       │ redacts output │       │               │└──────────────┘       └────────────────┘       └───────────────┘
  1. Tools, not text dumps — Janus exposes a set of MCP tools (get_pods, describe_deployment, get_events, etc.) that the LLM can call. It never hands over raw cluster state.
  2. Automatic redaction — Every response from the Kubernetes API is sanitised. Secrets, tokens, env‑var values, and sensitive metadata are stripped before the LLM ever sees them.
  3. Human approval for writes — Read‑only operations are instant. Destructive actions (restart, scale, delete) require an explicit confirmation step inside your MCP client. The LLM can propose the action, but a human has to pull the trigger.
  4. Scoped access — Janus can be locked to a specific namespace, set of clusters, or even a subset of resources, adding an extra safety net beyond whatever your KUBECONFIG permits.

Features

  • 🔒 Zero‑credential exposure — your KUBECONFIG never leaves the process running Janus.
  • 🔍 Rich read‑only diagnostics — pods, workloads, services, events, logs, endpoints, quotas, live CPU/memory usage vs requests (kubectl top+), and rollout history with sanitized template diffs (“what changed recently?”).
  • ✍️ Guarded write operations — rollout restart & rollback, scale, delete‑pod (UID‑bound), CronJob suspend/resume/trigger, node cordon — every one behind out‑of‑model human approval, none registered unless the operator enables it.
  • 🧹 Pluggable redaction engine — sensible defaults, easily extended to your own patterns.
  • 🧭 Cluster overview, two ways — the get_cluster_summary tool, plus a pinnable cluster://summary MCP resource that gives the LLM context without a flurry of tool calls.
  • 🩺 Guided triage — the diagnose_namespace prompt template walks the model through a structured investigation (overview → pods → warnings → targeted logs → diagnosis) in any client that supports MCP prompts.
  • 🧪 Works with any MCP client — Claude Code, Claude Desktop, VS Code, Codex, or your own agent loop.

Roadmap

  • Distribution ✓ — PyPI janus-mcp-server · container ghcr.io/tonylchang/janus-mcp · Homebrew tonylchang/tap/janus-mcp
  • Streamable HTTP sidecar mode (bearer token + Origin validation)

Quick start

bash
uv tool install janus-mcp-server   # or: pipx install janus-mcp-server#     brew install tonylchang/tap/janus-mcp
mkdir -p ~/.config/janus-mcpcurl -fsSL https://raw.githubusercontent.com/tonylchang/janus-mcp/main/examples/config.yaml \  -o ~/.config/janus-mcp/config.yaml$EDITOR ~/.config/janus-mcp/config.yaml   # set your kubeconfig context + namespaces
# register with Claude Code:claude mcp add kubernetes -- janus-mcp serve

No Python toolchain? The same server ships as a container image:

bash
claude mcp add kubernetes -- docker run -i --rm \  -v ~/.kube/config:/home/janus/.kube/config:ro \  -v ~/.config/janus-mcp:/home/janus/.config/janus-mcp:ro \  ghcr.io/tonylchang/janus-mcp:latest

Registration recipes for Claude Desktop, VS Code/Copilot, Codex CLI, and Cursor are in the quick start guide.

Now ask your AI assistant something like: “Why are pods crashing in the prod namespace?”

Janus will fetch the relevant information, sanitise it, and the LLM will walk you through what’s happening — safely.

Docs

  • Operator runbook — install, least-privilege RBAC, approvals, audit log, troubleshooting
  • Threat model — the five security invariants and how CI verifies them
  • rbac/ — least-privilege manifests (note what is absent: secrets — nowhere, ever)

Janus is currently in active development.

來源:README.md,提交 6132939

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.4.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分