Secure Kubernetes MCP server: redacted diagnostics and human-approved writes, credentials never leave the process.
Project description
Two faces. One cluster. No exposed keys.
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 │ │ │
└──────────────┘ └────────────────┘ └───────────────┘
- 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, events, logs, deployments, cluster summaries.
- ✍️ Guarded write operations — rollout restart, scale, and more, with a human‑in‑the‑loop.
- 🧹 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. - 🧪 Works with any MCP client — Claude Code, Claude Desktop, VS Code, Codex, or your own agent loop.
Roadmap
- PyPI / Homebrew / container distribution
- Streamable HTTP sidecar mode (bearer token + Origin validation)
diagnose_namespaceprompt template
Quick start
# from a checkout (PyPI release pending)
git clone https://github.com/tonylchang/janus-mcp && cd janus-mcp
uv sync
cp examples/config.yaml ~/.config/janus-mcp/config.yaml
$EDITOR ~/.config/janus-mcp/config.yaml # set your kubeconfig context + namespaces
# register with Claude Code:
claude mcp add kubernetes -- uv --directory "$PWD" run janus-mcp serve
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file janus_mcp_server-0.1.0.tar.gz.
File metadata
- Download URL: janus_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 527.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
468d78cf118413c7b8181dd518591d46659859bdce3a1ad92a554cd333273545
|
|
| MD5 |
81c6a43a39b59c5ed33f4b92474c0480
|
|
| BLAKE2b-256 |
aff2ec988e1f116cc59d7f5d1d4a6cd87257232d815f344b38b0af83641b0018
|
Provenance
The following attestation bundles were made for janus_mcp_server-0.1.0.tar.gz:
Publisher:
release.yml on tonylchang/janus-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
janus_mcp_server-0.1.0.tar.gz -
Subject digest:
468d78cf118413c7b8181dd518591d46659859bdce3a1ad92a554cd333273545 - Sigstore transparency entry: 1787108981
- Sigstore integration time:
-
Permalink:
tonylchang/janus-mcp@e437a43b38fc04f420792d888a8a85b2d4140a1c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tonylchang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e437a43b38fc04f420792d888a8a85b2d4140a1c -
Trigger Event:
push
-
Statement type:
File details
Details for the file janus_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: janus_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64075285b8eb5ac505c381017daffa55c506fdcf0734240e0dc9c8f4b68a35f6
|
|
| MD5 |
3aedc0b6eb960a011f4aef5327447cc4
|
|
| BLAKE2b-256 |
d60e8add26b67cfdc46c5512fb6799245a474e305d0dc7ded88a7f222934dd04
|
Provenance
The following attestation bundles were made for janus_mcp_server-0.1.0-py3-none-any.whl:
Publisher:
release.yml on tonylchang/janus-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
janus_mcp_server-0.1.0-py3-none-any.whl -
Subject digest:
64075285b8eb5ac505c381017daffa55c506fdcf0734240e0dc9c8f4b68a35f6 - Sigstore transparency entry: 1787109067
- Sigstore integration time:
-
Permalink:
tonylchang/janus-mcp@e437a43b38fc04f420792d888a8a85b2d4140a1c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tonylchang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e437a43b38fc04f420792d888a8a85b2d4140a1c -
Trigger Event:
push
-
Statement type: