# kubeview

Runs Kubernetes diagnostics through an isolated TypeScript runtime. Keeps intermediate logs and cluster events out of the model prompt.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: mikhae1
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mikhae1/kubeview-mcp
- Updated: 2026-10-17
- HTML: https://affpapa.org/en/nevibecode/mcp/kubeview

## What it does

Kubeview provides code execution mode instead of dozens of standalone tools. The assistant evaluates TypeScript via `run_code`, querying the cluster API and Helm releases directly. Raw payloads never touch the context window. Intermediate logs stay inside the sandbox runtime.

Only two tools are exposed: `run_code` and `kube_pod_exec`. Shell execution in pods requires explicit elicitation and expires after 10 minutes. Network port forwarding stays blocked by default. Without Node.js 22 or higher and valid cluster access in `KUBECONFIG`, the server will not start.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `KUBECONFIG`, `MCP_TRANSPORT`, `MCP_MODE`, `MCP_CODE_MODE_DISABLED_TOOLS`, `MCP_ARGO_TOOLS`, `MCP_ARGOCD_TOOLS`, `MCP_LOG_LEVEL`, `MCP_KUBE_CONTEXT`, `MCP_K8S_SKIP_TLS_VERIFY`, `MCP_HIDE_SENSITIVE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env KUBECONFIG=<KUBECONFIG> --env MCP_TRANSPORT=<MCP_TRANSPORT> --env MCP_MODE=<MCP_MODE> --env MCP_CODE_MODE_DISABLED_TOOLS=<MCP_CODE_MODE_DISABLED_TOOLS> --env MCP_ARGO_TOOLS=<MCP_ARGO_TOOLS> --transport stdio kubeview -- npx -y kubeview-mcp
```
Replace <…> with your own values. 19 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add kubeview --env KUBECONFIG=<KUBECONFIG> --env MCP_TRANSPORT=<MCP_TRANSPORT> --env MCP_MODE=<MCP_MODE> --env MCP_CODE_MODE_DISABLED_TOOLS=<MCP_CODE_MODE_DISABLED_TOOLS> --env MCP_ARGO_TOOLS=<MCP_ARGO_TOOLS> -- npx -y kubeview-mcp
```
Replace <…> with your own values. 19 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "kubeview": {
            "command": "npx",
            "args": [
                "-y",
                "kubeview-mcp"
            ],
            "env": {
                "KUBECONFIG": "<KUBECONFIG>",
                "MCP_TRANSPORT": "<MCP_TRANSPORT>",
                "MCP_MODE": "<MCP_MODE>",
                "MCP_CODE_MODE_DISABLED_TOOLS": "<MCP_CODE_MODE_DISABLED_TOOLS>",
                "MCP_ARGO_TOOLS": "<MCP_ARGO_TOOLS>"
            }
        }
    }
}
```
Replace <…> with your own values. 19 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "kubeview": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "kubeview-mcp"
            ],
            "env": {
                "KUBECONFIG": "<KUBECONFIG>",
                "MCP_TRANSPORT": "<MCP_TRANSPORT>",
                "MCP_MODE": "<MCP_MODE>",
                "MCP_CODE_MODE_DISABLED_TOOLS": "<MCP_CODE_MODE_DISABLED_TOOLS>",
                "MCP_ARGO_TOOLS": "<MCP_ARGO_TOOLS>"
            }
        }
    }
}
```
Replace <…> with your own values. 19 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e KUBECONFIG=<KUBECONFIG> -e MCP_TRANSPORT=<MCP_TRANSPORT> -e MCP_MODE=<MCP_MODE> -e MCP_CODE_MODE_DISABLED_TOOLS=<MCP_CODE_MODE_DISABLED_TOOLS> -e MCP_ARGO_TOOLS=<MCP_ARGO_TOOLS> kubeview npx -y kubeview-mcp
```
Replace <…> with your own values. 19 more environment variables are in the server README

## When to use it
- inspect failing pods across namespaces without context bloat
- correlate cluster events with Helm releases and Argo state
- run diagnostic commands in containers behind approval gates
- fetch and filter container logs in a single batch

## Example prompts
- Check pods with errors in the payments namespace and summarize their logs
- Inspect cluster events and compare them against recent Helm revisions
- Execute run_code to find pods restarting frequently and inspect their exit codes

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23654
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17191
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12110

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
