Janus

io.github.tonylchangPublished by GitHub account tonylchangv0.4.1Updated Oct 24, 2026

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

Overview

AI-generated overview

Janus is a local MCP server that gives an AI assistant scoped, redacted read access to Kubernetes clusters, with human-approved write actions.

What you can do
Inspect pods, workloads, services, events, logs, endpoints, quotas and live CPU/memory usage, plus rollout history with sanitized diffs (get_pods, describe_deployment, get_events and similar tools). Get a cluster overview through the get_cluster_summary tool or the cluster://summary resource. Run a guided triage prompt (diagnose_namespace) that walks through overview, pods, warnings, logs and diagnosis. Propose guarded write operations such as rollout restart and rollback, scale, delete-pod, CronJob suspend/resume/trigger and node cordon, each requiring explicit human confirmation and only registered when the operator enables them.
When to use it
Useful when you want an AI assistant to help debug and operate Kubernetes clusters without pasting a kubeconfig or cluster credentials into a chat or external API. Fits teams that want read-only diagnostics by default and a deliberate, human-approved path for destructive actions.
Requirements
Runs locally over stdio as a Python package (uvx, uv tool or pipx) or as a container image. Needs a KUBECONFIG and a config file (for example under ~/.config/janus-mcp) setting the kubeconfig context, namespaces and enabled tools. Network access to the Kubernetes API server is required. No authentication, environment variables or headers are declared in the manifest.
Before you install
The server holds your KUBECONFIG and has administrative access to the cluster; keep it local and review the least-privilege RBAC manifests. Write tools (restart, rollback, scale, delete-pod, CronJob actions, node cordon) change cluster state and should only be enabled deliberately; they rely on human approval in the MCP client. Redaction is pattern-based, so verify sanitized output before trusting it with sensitive workloads. The project is in active development.

Installation

In SourceWeft

  1. Open Janus in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: README.md at commit 6132939

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.4.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts