Read-only Kubernetes diagnostics: pods, logs, events, workloads, services, PVCs and nodes.
npx @getmcp/cli add io.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcpRequires Docker Engine. Community-contributed server. Review source before installing.
KUBECONFIGPath 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_NAMESPACESComma-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.
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"io.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcp": {
"command": "docker",
"args": [
"type=bind,src={kubeconfig_path},dst=/kubeconfig,readonly",
"run",
"-i",
"--rm",
"-e",
"KUBECONFIG",
"-e",
"ALLOWED_NAMESPACES",
"-e",
"LOG_LEVEL",
"-e",
"API_TIMEOUT_SECONDS",
"-e",
"MAX_LOG_LINES",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "/kubeconfig",
"ALLOWED_NAMESPACES": "",
"LOG_LEVEL": "INFO",
"API_TIMEOUT_SECONDS": "30",
"MAX_LOG_LINES": "200"
}
}
}
}