Get the FREE Ultimate OpenClaw Setup Guide →

kubeview

A fast, read-only MCP server enabling code-driven AI analysis of Kubernetes clusters

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mikhae1-kubeview-mcp npx -y kubeview-mcp \
  --env MCP_MODE="Server mode: all, code, or tools (default: all)" \
  --env KUBECONFIG="Path to kubeconfig file (default: ~/.kube/config)" \
  --env MCP_LOG_LEVEL="Log level: error, warn, info, debug (default: info)" \
  --env MCP_HIDE_SENSITIVE="Enable global sensitive data masking (default: false)"

How to use

KubeView MCP is a read-only MCP server that lets AI agents safely inspect and diagnose Kubernetes clusters. It provides a suite of Kubernetes, Helm, Argo, and utility tools designed for read-only access, with sensitive data masking and a sandboxed code mode for complex reasoning. Agents can list resources, fetch metrics, stream logs, query Helm releases, view Argo Workflows and Argo CD apps, and run diagnostic utilities. To use it, connect your MCP client (e.g., Cursor IDE or Claude Code CLI) to the kubeview MCP server entry (kubeview) and choose the desired tool (kube_list, kube_get, kube_metrics, kube_logs, kube_exec in read-only mode, kube_port, kube_net, helm_list, helm_get, argo_list, argo_get, argocd_app, run_code, plan_step). The system is designed to be API-first, with a code-mode runtime that lets you execute sandboxed TypeScript code for complex investigations while keeping the environment isolated and safe.

How to install

Prerequisites:

  • Node.js version 18 or newer
  • Access to a Kubernetes cluster (and optionally CLIs like helm, argo, argocd in PATH)

Installation steps:

  1. Install dependencies and clone the repository (example):
git clone https://github.com/mikhae1/kubeview-mcp.git
cd kubeview-mcp
npm install
  1. Build and run the server locally:
npm run build
npm start
  1. If you want to test tools directly via CLI:
npm run command -- kube_list --namespace=default
  1. Add the MCP server to your client configuration (example for Cursor/Claude):
{
  "mcpServers": {
    "kubeview": {
      "command": "npx",
      "args": ["-y", "kubeview-mcp"]
    }
  }
}

Optional: run the server in code mode for sandboxed TS execution by setting MCP_MODE=code in environment variables.

Additional notes

Tips and notes:

  • KubeView is read-only by design; sensitive data masking is enabled via MCP_HIDE_SENSITIVE. Ensure you understand your cluster’s security requirements when enabling additional tracing or logs.
  • Environment variables guide behavior: MCP_MODE controls the feature set (all, code, tools). MCP_LOG_LEVEL tunes verbosity. KUBECONFIG should point to a kubeconfig with appropriate permissions.
  • The MCP SDK compatibility note indicates reliance on @modelcontextprotocol/sdk@^1.25.3; ensure your client side matches this version for full tool compatibility.
  • For Helm interactions, the API-first approach means you typically don’t need the helm binary unless API access is restricted.
  • If you encounter connectivity issues, verify that the MCP server is reachable from your client and that Kubernetes API permissions are correctly configured.

Related MCP Servers

Sponsor this space

Reach thousands of developers