# Kubeview

> Kubeview is an open-source MCP server for developer tools. Read-only Kubernetes diagnostics through a sandboxed TypeScript runtime. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, macOS, Linux, Windows
- **Repository:** https://github.com/mikhae1/kubeview-mcp
- **MCP Registry name:** io.github.mikhae1/kubeview
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-18

## About

Instead of publishing dozens of tools, Kubeview gives the agent a single run_code tool that executes bounded TypeScript. Inside that sandbox, code can query Kubernetes, Helm, Argo Workflows and Argo CD, correlate the results and return only the answer, so intermediate payloads never enter the model's context window. The README credits Anthropic's code-execution-with-MCP pattern.

The only other public tool is kube_pod_exec, which is gated by approval: it needs MCP elicitation, is bound to the argument digest and expires after 10 minutes. Port forwarding is denied in code mode by default. Argo is detected from the Kubernetes API, and Helm releases are read from cluster Secrets or ConfigMaps with a local helm binary only as a fallback.

It runs over stdio by default via npx, needs Node.js 22 or later and a kubeconfig, and has an optional HTTP mode that requires an approval signing secret.

## Features

- **Single code tool:** run_code runs sandboxed TypeScript across Kubernetes, Helm and Argo.
- **Approval-gated exec:** kube_pod_exec needs elicitation and expires after 10 minutes.
- **Argo discovery:** Detects Argo Workflows and Argo CD from the Kubernetes API.
- **Sensitive masking:** An option masks sensitive values in responses.
- **Context allowlist:** Limits which kube contexts the server can use.
- **HTTP mode:** Optional streamable HTTP transport with signed approvals.

## Good for

- Find unhealthy pods and pull their recent logs in one call
- Diff Helm release state across environments
- Correlate events and metrics during an incident
- Inspect Argo CD or Argo Workflows state from an assistant

## Install

### Claude Code (Terminal)

```sh
claude mcp add kubeview --env MCP_APPROVAL_STATE_SECRET='<MCP_APPROVAL_STATE_SECRET>' -- npx -y kubeview-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "kubeview": {
      "command": "npx",
      "args": [
        "-y",
        "kubeview-mcp"
      ],
      "env": {
        "MCP_APPROVAL_STATE_SECRET": "<MCP_APPROVAL_STATE_SECRET>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "kubeview": {
      "command": "npx",
      "args": [
        "-y",
        "kubeview-mcp"
      ],
      "env": {
        "MCP_APPROVAL_STATE_SECRET": "<MCP_APPROVAL_STATE_SECRET>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "kubeview": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "kubeview-mcp"
      ],
      "env": {
        "MCP_APPROVAL_STATE_SECRET": "<MCP_APPROVAL_STATE_SECRET>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "kubeview": {
      "command": "npx",
      "args": [
        "-y",
        "kubeview-mcp"
      ],
      "env": {
        "MCP_APPROVAL_STATE_SECRET": "<MCP_APPROVAL_STATE_SECRET>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "kubeview": {
      "command": "npx",
      "args": [
        "-y",
        "kubeview-mcp"
      ],
      "env": {
        "MCP_APPROVAL_STATE_SECRET": "<MCP_APPROVAL_STATE_SECRET>"
      }
    }
  }
}
```

## Tools

- `run_code`: Runs sandboxed TypeScript that queries Kubernetes, Helm, Argo Workflows and Argo CD.
- `kube_pod_exec`: Approval-gated command execution in a pod.

## FAQ

### Can it change my cluster?

It is described as read-only. The one exception is the approval-gated kube_pod_exec.

### What do I need to run it?

Node.js 22 or later and access to a cluster through KUBECONFIG or an in-cluster service account.

### Does it run over HTTP?

Yes, optionally. HTTP mode refuses to start without an approval signing secret and replay directory.

### What licence is it?

The README badge shows MIT.

### Is Kubeview free?

Yes. Kubeview is open source, so you can use and self-host it for free.

### How do I add Kubeview to Claude Code?

Run this command in your terminal: claude mcp add kubeview --env MCP_APPROVAL_STATE_SECRET='<MCP_APPROVAL_STATE_SECRET>' -- npx -y kubeview-mcp

### What are the best alternatives to Kubeview?

The closest alternatives to Kubeview are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/kubeview
