Kubernetes Troubleshoot
io.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcp · v1.0.0
Read-only Kubernetes diagnostics: pods, logs, events, workloads, services, PVCs and nodes.
Connect Runs on your machine
claude mcp add k8s-troubleshoot-mcp -e KUBECONFIG=<KUBECONFIG> -e ALLOWED_NAMESPACES=<ALLOWED_NAMESPACES> -e LOG_LEVEL=<LOG_LEVEL> -e API_TIMEOUT_SECONDS=<API_TIMEOUT_SECONDS> -e MAX_LOG_LINES=<MAX_LOG_LINES> -- docker run -i --rm docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0
{
"mcpServers": {
"k8s-troubleshoot-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "<KUBECONFIG>",
"ALLOWED_NAMESPACES": "<ALLOWED_NAMESPACES>",
"LOG_LEVEL": "<LOG_LEVEL>",
"API_TIMEOUT_SECONDS": "<API_TIMEOUT_SECONDS>",
"MAX_LOG_LINES": "<MAX_LOG_LINES>"
}
}
}
}
{
"mcpServers": {
"k8s-troubleshoot-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "<KUBECONFIG>",
"ALLOWED_NAMESPACES": "<ALLOWED_NAMESPACES>",
"LOG_LEVEL": "<LOG_LEVEL>",
"API_TIMEOUT_SECONDS": "<API_TIMEOUT_SECONDS>",
"MAX_LOG_LINES": "<MAX_LOG_LINES>"
}
}
}
}
{
"servers": {
"k8s-troubleshoot-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "<KUBECONFIG>",
"ALLOWED_NAMESPACES": "<ALLOWED_NAMESPACES>",
"LOG_LEVEL": "<LOG_LEVEL>",
"API_TIMEOUT_SECONDS": "<API_TIMEOUT_SECONDS>",
"MAX_LOG_LINES": "<MAX_LOG_LINES>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
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_LEVELOptional | DEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively. |
API_TIMEOUT_SECONDSOptional | Kubernetes API request timeout. Must be a positive integer. |
MAX_LOG_LINESOptional | 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. |
Details
| Package | docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0 (OCI, stdio) |
| First published | 24 Aug 2026 |
| Last updated | 24 Aug 2026 |
| Registry name | io.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcp |
More cloud and devops servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
