Kubernetes Troubleshoot MCP Server
by nanagyamfiprempeh30io.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcpv1.0.0
Read-only Kubernetes diagnostics: pods, logs, events, workloads, services, PVCs and nodes.
context tax
queued
security
queued
cold start
queued
freshness
Maintained47d ago
Install Kubernetes Troubleshoot MCP server
Install in Claude Code
claude mcp add k8s-troubleshoot -e KUBECONFIG=/kubeconfig -e ALLOWED_NAMESPACES='<allowed-namespaces>' -- docker run -i --rm -e KUBECONFIG -e ALLOWED_NAMESPACES docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0Install in Cursor
{
"mcpServers": {
"k8s-troubleshoot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"KUBECONFIG",
"-e",
"ALLOWED_NAMESPACES",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "/kubeconfig",
"ALLOWED_NAMESPACES": "<allowed-namespaces>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"k8s-troubleshoot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"KUBECONFIG",
"-e",
"ALLOWED_NAMESPACES",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "/kubeconfig",
"ALLOWED_NAMESPACES": "<allowed-namespaces>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"k8s-troubleshoot": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"KUBECONFIG",
"-e",
"ALLOWED_NAMESPACES",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "/kubeconfig",
"ALLOWED_NAMESPACES": "<allowed-namespaces>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"k8s-troubleshoot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"KUBECONFIG",
"-e",
"ALLOWED_NAMESPACES",
"docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0"
],
"env": {
"KUBECONFIG": "/kubeconfig",
"ALLOWED_NAMESPACES": "<allowed-namespaces>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| KUBECONFIG | yes | — | 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_NAMESPACES | yes | — | 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. |
Freshness
Maintained — last maintenance signal 47d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-08-25 · 47d ago · GitHub
Latest release
no data · GitHub
Package published
no data · npm/PyPI
Registry entry updated
2026-08-24 · 47d ago · official registry · v1.0.0
FAQ
›How do I install the Kubernetes Troubleshoot MCP server in Claude Code?
Run: claude mcp add k8s-troubleshoot -e KUBECONFIG=/kubeconfig -e ALLOWED_NAMESPACES='<allowed-namespaces>' -- docker run -i --rm -e KUBECONFIG -e ALLOWED_NAMESPACES docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Kubernetes Troubleshoot require an API key?
Yes. It expects KUBECONFIG, ALLOWED_NAMESPACES.
›Can I use Kubernetes Troubleshoot as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Kubernetes Troubleshoot in the official MCP registry?
Yes, as io.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcp.
Alternatives to Kubernetes Troubleshoot
Other devops & ci/cd MCP servers.