An MCP 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 model operate through carefully scoped tools: no token, certificate, or API server URL ever leaves your machine.
Declarative tool definitions and sanitized results, never raw cluster state, never a text dump.
ToolAnnotations: readOnlyHint, openWorldHint: false, so the client knows what is safe to call unattended.cluster://summary into context: a cached health overview for free, no tool call spent.status=pending with an approval id.Operator-authoritative config, checked at startup and again at call time.
~/.local/state/janus-mcp/audit.jsonl.Secrets are not filtered out of the kind registry. They were never in it.
exec: credential plugins.Rendering failures fail closed: the model gets a generic error, never a partially-redacted payload.
Read-only diagnostics come free. Write tools only register when an operator lists them in the config, and a global read-only switch removes them from the listing entirely.
| Tool | What it returns | Mode |
|---|---|---|
| get_pods | Pod inventory and status for an allowed namespace | read |
| get_events | Recent warning and normal events, sanitized | read |
| get_logs | Bounded log tail, scrubbed for secrets and high-entropy strings | read |
| list_namespaces | Namespaces the operator has put in scope | read |
| describe_resource | One resource by kind and name, without env-var values or credential annotations | read |
| get_cluster_summary | One-screen health overview, cached | read |
| cluster://summary | The same overview as a pinnable MCP resource | resource |
| rollout_restart | Restarts a deployment after human approval | write |
| scale_deployment | Scales within max_replicas after human approval | write |
Every tool declares its annotations up front, output is bounded by a byte cap, and each call is rate-limited per tool. Parameter reference lives in the operator runbook.
Three ways from PyPI, all giving you the janus-mcp CLI. Contributors can clone and uv sync instead.
uv tool install janus-mcp-server
pipx install janus-mcp-server
pip install janus-mcp-server
No install at all: uvx janus-mcp-server serve runs it one-shot.
Two settings are required: the pinned context and the namespaces it may touch. The server refuses to start on any other context.
context: limited-sa@prod-cluster scope: allowed_namespaces: ["prod", "staging"] denied_namespaces: ["kube-system"] allow_cluster_scoped: false read_only: false write_tools: enabled: ["rollout_restart", "scale_deployment"] max_replicas: 20
{{ snippetCode }}
{{ snippetNote }}