Kubeview Mcp

by mikhae1

218 downloads
Not rated
GitHub

About

KubeView MCP is a read-only Model Context Protocol (MCP) server that exposes rich, AI-ready operations for Kubernetes clusters.

Details

Author
mikhae1
Downloads
218
Categories
Cloud Service, Other, Developer Tools, Infrastructure

- Read-only access to Pods, Services, Deployments, and more.
- Deep inspection of Helm releases, manifests, values, and history.
- Seamless integration with Argo Workflows and ArgoCD applications.
- Out-of-the-box CPU and memory metrics from Kubernetes.
- Optional enrichment with Prometheus monitoring data.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Kubeview Mcp
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

— (No installation or configuration instructions are present in the provided README.)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "kubeview mcp": {
            "kubeview-mcp": {
                "command": "npx",
                "args": [
                    "https://github.com/mikhae1/kubeview-mcp"
                ],
                "env": {
                    "KUBECONFIG": "$HOME/.kube/config"
                }
            }
        }
    }
}

McpServers

{
    "kubeview-mcp": {
        "command": "npx",
        "args": [
            "https://github.com/mikhae1/kubeview-mcp"
        ],
        "env": {
            "KUBECONFIG": "$HOME/.kube/config"
        }
    }
}

Read-onlyModel Context Protocolserver for Kubernetes diagnostics. Agents get two public tools, load schemas on demand, and run multi-step cluster workflows in asingle execution pass— soKubernetes,Helm,Argo Workflows, andArgo CDstay reachable without saturating the context window.

Background:Evicting MCP tool calls from your Kubernetes cluster

v2 publishes exactly two public tools:run_codeand approval-gatedkube_pod_exec. Everything else is discovered inside the sandbox viatools.list(),tools.search(), andtools.help()progressive discovery + programmatic calling.

run_codeexecutes bounded TypeScript with top-levelawait. One call can list workloads, correlate events, fetch logs, and diff Helm state without shipping intermediate payloads back through the model:

const pods = await tools.kubernetes.list({ namespace: 'payments' }); const unhealthy = pods.items.filter((p) => p.status?.phase !== 'Running'); return Promise.all( unhealthy.map(async (pod) => ({ pod: pod.metadata?.name, logs: await tools.kubernetes.logs({ namespace: 'payments', podName: pod.metadata?.name, tailLines: 100, }), })), );

- Sensitive isolationkube_pod_execis unreachable from sandboxed code. Top-level exec requires MCP elicitation, is bound to the argument digest, expires after 10 minutes, and fails closed.kube_port_forwardis never a top-level tool and is denied inside code mode by default.tools.disabled()reports which policy blocked a capability and whether that denial is configurable.
- API-driven discovery— Argo Workflows and Argo CD are detected from the Kubernetes API, scoped to the active kube context, cached for 60 s. An unavailable optional API never blocks startup.
- Native reads— resources, metrics, logs, events, and network probes go through the Kubernetes API. Helm releases are parsed from cluster Secrets or ConfigMaps; a localhelmbinary is a fallback, not a prerequisite.

Prerequisites:Node.js ≥ 22 and access to a cluster (KUBECONFIGor in-cluster service account).

npx -y kubeview-mcp # Claude Code claude mcp add kubernetes -- npx kubeview-mcp
{ "mcpServers": { "kubeview": { "command": "npx", "args": ["-y", "kubeview-mcp"] } } }

In Cursor,/kubeview/code-modeinjects the typed API into context.

mkdir -p /tmp/kubeview-mcp-approvals MCP_APPROVAL_STATE_SECRET='replace-with-at-least-32-random-bytes' \ MCP_APPROVAL_REPLAY_DIR=/tmp/kubeview-mcp-approvals \ MCP_TRANSPORT=http MCP_HTTP_HOST=127.0.0.1 MCP_HTTP_PORT=3000 npx -y kubeview-mcp

Endpoint:http://127.0.0.1:3000/mcp. HTTP follows theMCP 2026-07-28 stateless core: a fresh server per request, noinitialize, noMcp-Session-Id. Each request carries protocol version, client identity, and capabilities in_meta; modern requests addMcp-Method/Mcp-Namefor gateway routing. 2025-era clients use the SDK's stateless fallback on the same endpoint. State that must survive across calls has to be passed as tool arguments or handles.

HTTP mode refuses to start without both approval variables. Multi-replica deployments need the same secret and a shared writable replay directory; the/tmpexample is for a single process only. The published MCP registry entry still targetsstdio.

Domain tools use anoperationdiscriminator:

- helmlist|get|debug
- argolist|get|logs|cron_list(whenWorkfloworCronWorkflowis discoverable)
- argocdlist|get|resources|logs|history|status(whenApplicationis discoverable, or withARGOCD_SERVER+ARGOCD_AUTH_TOKEN)

Discovery is cached per kube context for 60 s. Missing optional APIs are omitted, not fatal.

Code mode is the default (MCP_MODE=code). The agent writes short TypeScript against a typedtoolsglobal instead of calling dozens of MCP tools.

- Typedtoolsnamespaces for Kubernetes, Helm, and any detected Argo capabilities, generated from live schemas so parameters cannot be hallucinated.
- Progressive discovery:tools.list(),tools.search(),tools.help(), andtools.disabled()(the last reportswhya capability was blocked).
- A locked-down runtime with onlyconsoleandtoolsin scope — no filesystem, no network, noprocess.

Pod exec approval uses MCP elicitation and fails closed. The standalonenpm run code-modelauncher has no trusted approval UI, so it always denies pod exec.

MCP_CODE_MODE_DISABLED_TOOLS(comma-separated) controls which capabilities are blocked insiderun_code. Resolution order:
- MCP_CODE_MODE_DISABLED_TOOLSenv var
- disabledToolsinkube-mcp.code-mode.json
- Default:
["kube_port_forward"]

An empty env value clears the list.kube_pod_execcannot be added — it is permanently blocked.

- JSON Schema 2020-12 in/out contracts with server-side validation
- Machine-readablestructuredContentwith text fallback
- Accurateread-only,destructive,idempotent,open-worldannotations
- Deterministic tool ordering with cache hints for fixed vs. discovery-dependent surfaces
- Stateless HTTP with discovery and header-based routing (Mcp-Method,Mcp-Name)
- Execution failures returned as tool errors; protocol errors reserved for malformed requests

git clone https://github.com/mikhae1/kubeview-mcp.git cd kubeview-mcp && npm install npm run build # compile npm start # build + run npm test # jest suite npm run typecheck # tsc --noEmit # Invoke a tool directly npm run command -- kube_list --namespace=default

Protocol tests pin the SDK v2 client to2026-07-28and route through the server handler in-process (no open ports):

npm test -- --runInBand \ tests/server/StreamableHttpTransport.integration.test.ts \ tests/server/StreamableHttpRuntime.test.ts \ tests/server/TransportConfig.test.ts \ tests/compat/McpSdkCompatibility.test.ts

Contributions are welcome! Please feel free to submit an issue or a pull request.

Help AI agents write accurate, up-to-date Kubernetes manifests by giving them the official Kubernetes API reference, so they can look up kinds, fields, and nested types with current specs across the latest and three previous Kubernetes versions

Expose the entire ArgoCD API to LLMs via MCP using just 2 auto-generated tools powered by the OpenAPI spec.

An MCP server for managing Kubernetes clusters, configured via an external JSON file.

A comprehensive Model Context Protocol (MCP) server for the Cloudability API, providing advanced cost management, Kubernetes container analytics, and budget forecasting capabilities.

Debug, build, and manage Microsoft Power Automate cloud flows with AI agents. 15 tools for action-level error details, flow creation, run history, and multi-tenant operations.

A server for managing Giant Swarm App Platform deployments using Kubernetes credentials.

Provides safe, read-only access to Kubernetes cluster resources for debugging and inspection.

Tilt MCP is a Model Context Protocol server that integrates with Tilt to provide programmatic access to Tilt resources, logs, and management operations for Kubernetes development environments

Operate a k3s / Kubernetes cluster from your AI agent — health, logs, and guarded restart/scale/delete; safe by default with a read-only switch and namespace allowlist.

Search and retrieve detailed information, including READMEs, for Helm charts on Artifact Hub.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.