kubeview-mcp
Read-only MCP server for AI-powered Kubernetes debugging with support of code execution
KubeView MCP β Kubernetes Model Context Protocol Server
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
β¨ Features
- π§ Code Mode β Sandboxed TypeScript runtime for complex reasoning and multi-step workflows.
- π‘οΈ Read-Only & Safe β Zero write access; sensitive data masking for production clusters.
- βΈοΈ Kubernetes β List/get resources, fetch metrics, stream logs and events, exec into containers, diagnose network issues.
- π¦ Helm (API-first) β Inspect releases, values, manifests, and history via the Kubernetes API with CLI fallback.
- π Argo Ecosystem β Manage Argo Workflows and Argo CD via the Kubernetes API or CLI.
π Quick Start
Prerequisites
- Node.js β₯ 18
- Access to a Kubernetes cluster
- Optional CLIs in
$PATH:helm(fallback only),argo,argocd
Installation
# Run the server directly
npx -y kubeview-mcp
# Add to Claude Code
claude mcp add kubernetes -- npx kubeview-mcp
MCP Client Configuration
Add to your mcpServers config (Cursor, Claude Desktop, etc.):
{
"mcpServers": {
"kubeview": {
"command": "npx",
"args": ["-y", "kubeview-mcp"]
}
}
}
Environment Variables
| Variable | Description | Default |
|---|---|---|
KUBECONFIG | Path to kubeconfig file | ~/.kube/config |
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 |
π οΈ Tools
Kubernetes
| 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 |
Helm
| 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).
Argo
| Tool | Description |
|---|---|
argo_list | List Argo Workflows |
argo_get | Inspect a specific Argo Workflow |
argocd_app | Inspect Argo CD applications |
Utilities
| 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.
π§ Code Mode
Inspired by Code execution with MCP, KubeView ships a sandboxed code runtime for agents to explore the API and run complex workflows.
- MCP Bridge β All registered MCP tools are callable from within
run_code. - Dynamic TypeScript Definitions β Tool schemas are auto-converted to a typed
global.d.ts, preventing hallucinated parameters. - Tool Discovery β
tools.search()andtools.list()let agents find capabilities at runtime without loading the full schema. - Sandboxed Execution β Locked-down Node.js
vmenvironment with access only toconsoleand thetoolsglobal.
Enable code-only mode:
"env": { "MCP_MODE": "code" }
Built-in code-mode Prompt
The 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.
π» Local Development
# 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
π License
MIT Β© mikhae1
Related Servers
Arc MCP Server
Simplifies framework deployments on various hosting environments, with a focus on shared hosting.
ServiceNow
An MCP server for interacting with ServiceNow instances to manage records, incidents, and other platform features.
CData TaxJar
A read-only server to query live TaxJar data, powered by the CData JDBC Driver.
Tembo Cloud
An MCP server for managing databases and services on the Tembo Cloud platform.
Whissle AI
Provides speech-to-text, diarization, translation, and text summarization via the Whissle AI API.
APISIX-MCP
APISIX Model Context Protocol (MCP) server is used to bridge large language models (LLMs) with the APISIX Admin API, supporting querying and managing all resources in Apache APISIX.
Bitpin Exchange
Interact with the Bitpin cryptocurrency exchange API to manage wallets, view market data, and execute orders.
Ned AI MCP Server
Connect your Shopify store to Claude, Cursor, or Windsurf and get 100+ pre-calculated ecommerce metrics like net profit, blended CAC, per-channel ROAS, and customer LTV segments.
Terragrunt GCP MCP Tool
Manage Google Cloud Platform (GCP) infrastructure using Terragrunt, with support for experimental features like AutoDevOps and cost management.
Hygraph
Integrate Hygraph directly into MCP-compatible tools like Claude and Cursor, executing content operations via natural language