Skip to main content

Secure Kubernetes MCP server: redacted diagnostics and human-approved writes, credentials never leave the process.

Project description

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

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 │       │               │
└──────────────┘       └────────────────┘       └───────────────┘
  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, 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_summary tool, plus a pinnable cluster://summary MCP 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_namespace prompt 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

janus_mcp_server-0.1.0.tar.gz (527.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

janus_mcp_server-0.1.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

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

Hashes for janus_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 468d78cf118413c7b8181dd518591d46659859bdce3a1ad92a554cd333273545
MD5 81c6a43a39b59c5ed33f4b92474c0480
BLAKE2b-256 aff2ec988e1f116cc59d7f5d1d4a6cd87257232d815f344b38b0af83641b0018

See more details on using hashes here.

Provenance

The following attestation bundles were made for janus_mcp_server-0.1.0.tar.gz:

Publisher: release.yml on tonylchang/janus-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file janus_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for janus_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64075285b8eb5ac505c381017daffa55c506fdcf0734240e0dc9c8f4b68a35f6
MD5 3aedc0b6eb960a011f4aef5327447cc4
BLAKE2b-256 d60e8add26b67cfdc46c5512fb6799245a474e305d0dc7ded88a7f222934dd04

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page