Connects Claude to Kubernetes clusters through a read-only MCP interface that covers core resources, Helm releases, Argo Workflows, and Argo CD. Exposes tools for listing and describing resources, streaming logs, executing commands in containers, fetching metrics, and running network diagnostics. Includes a sandboxed TypeScript runtime where agents can write multi-step inspection scripts with full access to the MCP tool catalog. Reads Helm metadata directly from Kubernetes storage (secrets and configmaps) without requiring the CLI. Ships with sensitive data masking for production use and a plan_step tool for persisting investigation state across long debugging sessions.
KubeView is a read-only Model Context Protocol (MCP) server that lets AI agents (Cursor, Claude Code, Codex CLI, Gemini CLI, etc.) safely inspect, diagnose, and debug Kubernetes clusters. It covers Kubernetes core, Helm, Argo Workflows, and Argo CD.
Read more: Evicting MCP tool calls from your Kubernetes cluster
$PATH: helm (fallback only), argo, argocd# Run the server directly
npx -y kubeview-mcp
# Add to Claude Code
claude mcp add kubernetes -- npx kubeview-mcp
Add to your mcpServers config (Cursor, Claude Desktop, etc.):
{
"mcpServers": {
"kubeview": {
"command": "npx",
"args": ["-y", "kubeview-mcp"]
}
}
}
| Variable | Description | Default |
|---|---|---|
KUBECONFIG | Path to kubeconfig file | ~/.kube/config |
MCP_TRANSPORT | Transport: stdio (default) or http | stdio |
MCP_MODE | Server mode: all, code, or tools | all |
MCP_LOG_LEVEL | Log level: error, warn, info, debug | info |
MCP_HIDE_SENSITIVE | Mask sensitive data globally | false |
MCP_HTTP_HOST | HTTP bind host when MCP_TRANSPORT=http | 127.0.0.1 |
MCP_HTTP_PORT | HTTP port when MCP_TRANSPORT=http | 3000 |
MCP_HTTP_PATH | Streamable HTTP endpoint path | /mcp |
MCP_HTTP_STATELESS | Disable session IDs in HTTP mode | false |
MCP_HTTP_JSON_RESPONSE | Prefer JSON responses over SSE | false |
MCP_ALLOWED_HOSTS | Comma-separated Host allowlist for HTTP mode | local defaults |
MCP_ALLOWED_ORIGINS | Comma-separated Origin allowlist for HTTP mode | unset |
KubeView can also run as a standalone Streamable HTTP server for hosted or manually managed deployments.
MCP_TRANSPORT=http \
MCP_HTTP_HOST=127.0.0.1 \
MCP_HTTP_PORT=3000 \
npx -y kubeview-mcp
This starts a Streamable HTTP endpoint at http://127.0.0.1:3000/mcp.
Notes:
stdio remains the default and is still the right choice for MCP client configs such as Claude Desktop, Cursor, and Codex CLI.MCP_HTTP_STATELESS=true disables session IDs. That is useful for simple request/response patterns, but stateful features such as plan_step history are not meaningful in that mode.0.0.0.0 or ::, you must set MCP_ALLOWED_HOSTS.stdio.| Tool | Description |
|---|---|
kube_list | List resources or get cluster diagnostics |
kube_get | Describe a specific resource (all K8s types supported) |
kube_metrics | Fetch CPU/memory metrics for nodes and pods |
kube_logs | Fetch or stream container logs |
kube_exec | Execute commands inside containers |
kube_port | Port-forward to pods or services |
kube_net | Run in-cluster network diagnostics |
| Tool | Description |
|---|---|
helm_list | List Helm releases (Kubernetes API first, CLI fallback) |
helm_get | Fetch release values, manifests, notes, hooks, status, history |
Helm execution strategy: Tools read Helm metadata directly from Kubernetes storage (Secrets / ConfigMaps) by default — no helm binary needed for standard read-only use. CLI fallback is used for non-JSON formatting or non-Kubernetes storage backends (e.g. SQL).
| Tool | Description |
|---|---|
argo_list | List Argo Workflows |
argo_get | Inspect a specific Argo Workflow |
argocd_app | Inspect Argo CD applications |
| Tool | Description |
|---|---|
run_code | Execute sandboxed TypeScript for complex tasks |
plan_step | Persist step-by-step planning state across long investigations |
Why plan_step? It keeps the chat context clean by storing progress externally, gives agents a structured state machine (plan → execute → verify → branch), and encourages the think-then-act rhythm that produces better results on complex workflows.
Inspired by Code execution with MCP, KubeView ships a sandboxed code runtime for agents to explore the API and run complex workflows.
run_code.global.d.ts, preventing hallucinated parameters.tools.search() and tools.list() let agents find capabilities at runtime without loading the full schema.vm environment with access only to console and the tools global.Enable code-only mode:
"env": { "MCP_MODE": "code" }
code-mode PromptThe server includes a code-mode MCP prompt that injects full TypeScript API docs and examples into the agent context. In Cursor, type /kubeview/code-mode in the prompt bar to activate it.
# Clone and install
git clone https://github.com/mikhae1/kubeview-mcp.git
cd kubeview-mcp
npm install
# Build and run
npm run build
npm start
# Test
npm test
# Run a tool directly via CLI
npm run command -- kube_list --namespace=default
MIT © mikhae1
KUBECONFIGPath to kubeconfig file; defaults to ~/.kube/config if unset.
MCP_TRANSPORTTransport mode: 'stdio' (default) or 'http'. The published package metadata still targets stdio by default.
MCP_MODEServer mode: 'all' (default), 'code', or 'tools'. Controls which features are enabled.
MCP_LOG_LEVELLogging level: 'error', 'warn', 'info' (default), or 'debug'.
MCP_KUBE_CONTEXTKubernetes context name to use. If unset, uses the current context from kubeconfig.
MCP_K8S_SKIP_TLS_VERIFYSkip TLS certificate verification for Kubernetes API (use 'true' or '1'). Not recommended for production.
MCP_HIDE_SENSITIVEEnable global sensitive data masking. Set to 'true' or '1' to mask sensitive values in responses.
MCP_TIMEOUTDefault timeout in milliseconds for operations. If unset, uses plugin-specific defaults.
MCP_HTTP_HOSTHTTP bind host when MCP_TRANSPORT=http. Defaults to 127.0.0.1.
MCP_HTTP_PORTHTTP port when MCP_TRANSPORT=http. Defaults to 3000.
MCP_HTTP_PATHHTTP endpoint path when MCP_TRANSPORT=http. Defaults to /mcp.
MCP_HTTP_STATELESSDisable session IDs in HTTP mode. Set to 'true' or '1' for stateless request handling.
MCP_HTTP_JSON_RESPONSEPrefer JSON responses over SSE in HTTP mode. Set to 'true' or '1' to enable.
MCP_ALLOWED_HOSTSComma-separated Host allowlist for HTTP mode. Required when binding to 0.0.0.0 or ::.
MCP_ALLOWED_ORIGINSComma-separated Origin allowlist for HTTP mode.
MCP_DISABLE_KUBERNETES_PLUGINDisable Kubernetes plugin. Set to 'true' or '1' to disable.
MCP_DISABLE_HELM_PLUGINDisable Helm plugin. Set to 'true' or '1' to disable.
MCP_DISABLE_ARGO_PLUGINDisable Argo Workflows plugin. Set to 'true' or '1' to disable.
MCP_DISABLE_ARGOCD_PLUGINDisable Argo CD plugin. Set to 'true' or '1' to disable.
silenceper/mcp-k8s
azure/containerization-assist
io.github.evozim/aws-builder
reza-gholizade/k8s-mcp-server
flux159/mcp-server-kubernetes