Back to Browse

Kubeview MCP Server

by Mikhae1
Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Read-only Model Context Protocol MCP server enabling code-driven AI analysis of Kubernetes clusters.

About

Read-only Model Context Protocol MCP server enabling code-driven AI analysis of Kubernetes clusters.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (3 strong, 4 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

5 files analyzed Β· 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Path to kubeconfig file; defaults to ~/.kube/config if unset.Optional

Environment variable: KUBECONFIG

Transport mode: 'stdio' (default) or 'http'. The published package metadata still targets stdio by default.Optional

Environment variable: MCP_TRANSPORT

Server mode: 'all' (default), 'code', or 'tools'. Controls which features are enabled.Optional

Environment variable: MCP_MODE

Logging level: 'error', 'warn', 'info' (default), or 'debug'.Optional

Environment variable: MCP_LOG_LEVEL

Kubernetes context name to use. If unset, uses the current context from kubeconfig.Optional

Environment variable: MCP_KUBE_CONTEXT

Skip TLS certificate verification for Kubernetes API (use 'true' or '1'). Not recommended for production.Optional

Environment variable: MCP_K8S_SKIP_TLS_VERIFY

Enable global sensitive data masking. Set to 'true' or '1' to mask sensitive values in responses.Optional

Environment variable: MCP_HIDE_SENSITIVE

Default timeout in milliseconds for operations. If unset, uses plugin-specific defaults.Optional

Environment variable: MCP_TIMEOUT

HTTP bind host when MCP_TRANSPORT=http. Defaults to 127.0.0.1.Optional

Environment variable: MCP_HTTP_HOST

HTTP port when MCP_TRANSPORT=http. Defaults to 3000.Optional

Environment variable: MCP_HTTP_PORT

HTTP endpoint path when MCP_TRANSPORT=http. Defaults to /mcp.Optional

Environment variable: MCP_HTTP_PATH

Disable session IDs in HTTP mode. Set to 'true' or '1' for stateless request handling.Optional

Environment variable: MCP_HTTP_STATELESS

Prefer JSON responses over SSE in HTTP mode. Set to 'true' or '1' to enable.Optional

Environment variable: MCP_HTTP_JSON_RESPONSE

Comma-separated Host allowlist for HTTP mode. Required when binding to 0.0.0.0 or ::.Optional

Environment variable: MCP_ALLOWED_HOSTS

Comma-separated Origin allowlist for HTTP mode.Optional

Environment variable: MCP_ALLOWED_ORIGINS

Disable Kubernetes plugin. Set to 'true' or '1' to disable.Optional

Environment variable: MCP_DISABLE_KUBERNETES_PLUGIN

Disable Helm plugin. Set to 'true' or '1' to disable.Optional

Environment variable: MCP_DISABLE_HELM_PLUGIN

Disable Argo Workflows plugin. Set to 'true' or '1' to disable.Optional

Environment variable: MCP_DISABLE_ARGO_PLUGIN

Disable Argo CD plugin. Set to 'true' or '1' to disable.Optional

Environment variable: MCP_DISABLE_ARGOCD_PLUGIN

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-mikhae1-kubeview": {
      "env": {
        "MCP_MODE": "your-mcp-mode-here",
        "KUBECONFIG": "your-kubeconfig-here",
        "MCP_TIMEOUT": "your-mcp-timeout-here",
        "MCP_HTTP_HOST": "your-mcp-http-host-here",
        "MCP_HTTP_PATH": "your-mcp-http-path-here",
        "MCP_HTTP_PORT": "your-mcp-http-port-here",
        "MCP_LOG_LEVEL": "your-mcp-log-level-here",
        "MCP_TRANSPORT": "your-mcp-transport-here",
        "MCP_KUBE_CONTEXT": "your-mcp-kube-context-here",
        "MCP_ALLOWED_HOSTS": "your-mcp-allowed-hosts-here",
        "MCP_HIDE_SENSITIVE": "your-mcp-hide-sensitive-here",
        "MCP_HTTP_STATELESS": "your-mcp-http-stateless-here",
        "MCP_ALLOWED_ORIGINS": "your-mcp-allowed-origins-here",
        "MCP_HTTP_JSON_RESPONSE": "your-mcp-http-json-response-here",
        "MCP_DISABLE_ARGO_PLUGIN": "your-mcp-disable-argo-plugin-here",
        "MCP_DISABLE_HELM_PLUGIN": "your-mcp-disable-helm-plugin-here",
        "MCP_K8S_SKIP_TLS_VERIFY": "your-mcp-k8s-skip-tls-verify-here",
        "MCP_DISABLE_ARGOCD_PLUGIN": "your-mcp-disable-argocd-plugin-here",
        "MCP_DISABLE_KUBERNETES_PLUGIN": "your-mcp-disable-kubernetes-plugin-here"
      },
      "args": [
        "-y",
        "kubeview-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

KubeView MCP – Kubernetes Model Context Protocol Server

npm version License: MIT Node.js Version TypeScript

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.
  • πŸ”Œ MCP 2026-07-28 – Stateless protocol core with discovery, self-describing requests, and header-based routing.

πŸš€ Quick Start

Prerequisites

  • Node.js β‰₯ 20
  • 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

VariableDescriptionDefault
KUBECONFIGPath to kubeconfig file~/.kube/config
MCP_TRANSPORTTransport: stdio (default) or httpstdio
MCP_MODEServer mode: all, code, or toolsall
MCP_LOG_LEVELLog level: error, warn, info, debuginfo
MCP_HIDE_SENSITIVEMask sensitive data globallyfalse
MCP_HTTP_HOSTHTTP bind host when MCP_TRANSPORT=http127.0.0.1
MCP_HTTP_PORTHTTP port when MCP_TRANSPORT=http3000
MCP_HTTP_PATHStreamable HTTP endpoint path/mcp
MCP_HTTP_JSON_RESPONSEPrefer JSON responses over SSEfalse
MCP_ALLOWED_HOSTSComma-separated Host allowlist for HTTP modelocal defaults
MCP_ALLOWED_ORIGINSComma-separated Origin allowlist for HTTP modeunset

Streamable HTTP Mode

KubeView can also run as a standalone Streamable HTTP server for hosted or manually managed deployments. HTTP follows the MCP 2026-07-28 stateless core and creates a fresh MCP server for every request.

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 negotiates either the modern 2026 era or the legacy 2025 era on connection startup.
  • HTTP requests do not use initialize, notifications/initialized, or Mcp-Session-Id. Clients can call server/discover, and each request carries the protocol version, client identity, and client capabilities in _meta.
  • Modern Streamable HTTP requests include Mcp-Method and, when applicable, Mcp-Name headers for gateway routing and authorization.
  • 2025-era clients remain supported through the SDK's stateless legacy fallback on the same HTTP endpoint.
  • Application state that must survive multiple HTTP calls should use an explicit tool argument or handle. In particular, plan_step history does not persist across stateless HTTP requests.
  • MCP_HTTP_JSON_RESPONSE=true forces JSON-only responses and drops mid-call notifications; leave it disabled for tools that may stream related messages.
  • If you bind HTTP mode to 0.0.0.0 or ::, you must set MCP_ALLOWED_HOSTS.
  • HTTP mode is intended for manual deployment. The published MCP registry metadata still targets stdio.

πŸ› οΈ Tools

Kubernetes

ToolDescription
kube_listList resources or get cluster diagnostics
kube_getDescribe a specific resource (all K8s types supported)
kube_metricsFetch CPU/memory metrics for nodes and pods
kube_logsFetch or stream container logs
kube_execExecute commands inside containers
kube_portPort-forward to pods or services
kube_netRun in-cluster network diagnostics

Helm

ToolDescription
helm_listList Helm releases (Kubernetes API first, CLI fallback)
helm_getFetch 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

ToolDescription
argo_listList Argo Workflows
argo_getInspect a specific Argo Workflow
argocd_appInspect Argo CD applications

Utilities

ToolDescription
run_codeExecute sandboxed TypeScript for complex tasks
plan_stepPersist 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() and tools.list() let agents find capabilities at runtime without loading the full schema.
  • Sandboxed Execution – Locked-down Node.js vm environment with access only to console and the tools global.

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

Testing the MCP 2026-07-28 migration

The migration tests use the SDK v2 client pinned to 2026-07-28 and route requests directly through the server handler, so they do not require an open network port.

# Compile against the split MCP SDK v2 packages
npm run typecheck

# Verify modern discovery, stateless requests, required headers,
# cache hints, header mismatch rejection, and HTTP runtime configuration
npm test -- --runInBand \
  tests/server/StreamableHttpTransport.integration.test.ts \
  tests/server/StreamableHttpRuntime.test.ts \
  tests/server/TransportConfig.test.ts \
  tests/compat/McpSdkCompatibility.test.ts

# Regression suite and production build
npm test
npm run build

For a deployment smoke test, start HTTP mode, connect with an SDK v2 client using versionNegotiation: { mode: { pin: '2026-07-28' } }, then run tools/list and one read-only tool call. Confirm that requests can be distributed across replicas without affinity, contain Mcp-Method/Mcp-Name, and never return Mcp-Session-Id.


πŸ“„ License

MIT Β© mikhae1

Reviews

No reviews yet

Be the first to review this server!