
Janus
io.github.tonylchang由 GitHub 账号 tonylchang 发布v0.4.1更新于 Oct 24, 2026
Secure Kubernetes MCP server: scoped, redacted diagnostics and human-approved writes
概览
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 服务器的网络。清单未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Janus,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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
- 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. - 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.
- 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.
- 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
KUBECONFIGpermits.
Features
- 🔒 Zero‑credential exposure — your
KUBECONFIGnever 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_summarytool, plus a pinnablecluster://summaryMCP resource that gives the LLM context without a flurry of tool calls. - 🩺 Guided triage — the
diagnose_namespaceprompt 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· containerghcr.io/tonylchang/janus-mcp· Homebrewtonylchang/tap/janus-mcp - Streamable HTTP sidecar mode (bearer token + Origin validation)
Quick start
No Python toolchain? The same server ships as a container image:
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版本历史
1- v0.4.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分