kubeview
A fast, read-only MCP server enabling code-driven AI analysis of Kubernetes clusters
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:
- Install dependencies and clone the repository (example):
git clone https://github.com/mikhae1/kubeview-mcp.git
cd kubeview-mcp
npm install
- Build and run the server locally:
npm run build
npm start
- If you want to test tools directly via CLI:
npm run command -- kube_list --namespace=default
- 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
bytebot
Bytebot is a self-hosted AI desktop agent that automates computer tasks through natural language commands, operating within a containerized Linux desktop environment.
kubectl
A Model Context Protocol (MCP) server for Kubernetes. Install: npx kubectl-mcp-server or pip install kubectl-mcp-server
mcp-cli
mcpc is a CLI client for MCP. It supports persistent sessions, stdio/HTTP, OAuth 2.1, JSON output for code mode, proxy for AI sandboxes, and much more.
ai-infrastructure-agent
AI Infrastructure Agent is an intelligent system that allows you to manage AWS infrastructure using natural language commands.
k8s
K8s-mcp-server is a Model Context Protocol (MCP) server that enables AI assistants like Claude to securely execute Kubernetes commands. It provides a bridge between language models and essential Kubernetes CLI tools including kubectl, helm, istioctl, and argocd, allowing AI systems to assist with cluster management, troubleshooting, and deployments
rancher
MCP server for Rancher - Kubernetes management and deployment platform