MCP directory
KT

Kubernetes Troubleshoot

by github.com/NanaGyamfiPrempeh30 · v1.0.0 · updated Aug 24, 2026

Read-only Kubernetes diagnostics: pods, logs, events, workloads, services, PVCs and nodes.

Docker

Run it locally

Install the package and point your AI client at it.

Docker

docker run -i --rm docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0

Environment variables

  • KUBECONFIGrequired

    Path to the kubeconfig inside the container. Must match the mount destination. There is no fallback to ~/.kube/config and no in-cluster config: a missing, unreadable or malformed file is a startup failure rather than a silent downgrade to an ambient credential.

  • ALLOWED_NAMESPACESrequired

    Comma-separated namespaces the server may read, e.g. staging,production. Wildcards (* and all) are rejected at startup, and kube-system and kube-public are stripped even if listed. This is defense-in-depth, not the security boundary — the boundary is the ServiceAccount's RBAC bindings.

  • LOG_LEVEL

    DEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.

  • API_TIMEOUT_SECONDS

    Kubernetes API request timeout. Must be a positive integer.

  • MAX_LOG_LINES

    Maximum log lines any single get_pod_logs call may return. Must be a positive integer; clamped to a hard ceiling of 1000 with a warning.

More MCP servers