← Back to directory
K

Kubernetes MCP Server

Community
Native Kubernetes and OpenShift control for AI assistants via MCP.
GitHub source repository ↗
★ 2.0k Stars Category · Dev Tools Very popular Source revision d98b21b48464
63FMRS · C
Reliability
10/20
Security and permissions
10/20
Maintenance
14/20
Documentation
17/20
Setup experience
12/20

The README describes an actively maintained, well-documented Go-native MCP server with broad tool coverage (Kubernetes, OpenShift, Helm, Tekton, KubeVirt, Kiali, NetObserv) and multiple install paths (npm, PyPI/uvx, native binaries, Docker); no third-party user reviews are included in the source material.

Read the FMRS scoring method →

Kubernetes MCP Server is a Go-native Model Context Protocol server that talks directly to the Kubernetes/OpenShift API server rather than wrapping kubectl or helm CLI tools. It supports CRUD on pods, generic resources, namespaces, and events, plus optional toolsets for Helm, Tekton, KubeVirt, Kiali (Istio service mesh), and NetObserv (network observability), with multi-cluster, read-only, and fine-grained resource-restriction support.

Tools

configuration_contexts_list
List all available context names and associated server URLs from the kubeconfig file
targets_list
List all available targets
configuration_view
Get the current Kubernetes configuration content as a kubeconfig YAML
events_list
List Kubernetes events (warnings, errors, state changes) for debugging and troubleshooting
namespaces_list
List all Kubernetes namespaces in the current cluster
projects_list
List all OpenShift projects in the current cluster
nodes_log
Get logs from a Kubernetes node (kubelet, kube-proxy, or other system logs) via the API proxy
nodes_stats_summary
Get detailed resource usage statistics from a node via the kubelet Summary API, including PSI metrics
nodes_top
List CPU and memory consumption for nodes as recorded by the Kubernetes Metrics Server
pods_list
List all Kubernetes pods in the current cluster from all namespaces
pods_list_in_namespace
List all Kubernetes pods in the specified namespace
pods_get
Get a Kubernetes Pod in the current or provided namespace by name
pods_delete
Delete a Kubernetes Pod in the current or provided namespace by name
pods_top
List CPU and memory consumption for pods as recorded by the Metrics Server
pods_exec
Execute a command in a Kubernetes Pod (shell access, run commands in container)
pods_log
Get the logs of a Kubernetes Pod by name
pods_run
Run a Kubernetes Pod with the provided container image and optionally expose a port
resources_list
List Kubernetes resources and objects by apiVersion and kind, optionally namespace and label selector
resources_get
Get a Kubernetes resource by apiVersion, kind, namespace, and name
resources_create_or_update
Create or update a Kubernetes resource via Server-Side Apply using a complete desired-state manifest
resources_delete
Delete a Kubernetes resource by apiVersion, kind, namespace, and name
resources_scale
Get or update the scale (replica count) of a Kubernetes resource
helm_install
Install a Helm chart to create a release in the current or provided namespace
helm_list
List Helm releases in the current, provided, or all namespaces
helm_uninstall
Uninstall a Helm release in the current or provided namespace
kcp_workspaces_list
List all available kcp workspaces in the current cluster
kcp_workspace_describe
Get detailed information about a specific kcp workspace
kiali_get_mesh_traffic_graph
Return service-to-service traffic topology, dependencies, and network metrics for the specified namespaces
kiali_get_mesh_status
Retrieve the high-level health, topology, and environment details of the Istio service mesh
kiali_manage_istio_config_read
Read Istio, Gateway API, and Inference API configuration (list or get)
kiali_manage_istio_config
Create, patch, or delete Istio, Gateway API, and Inference API configuration
kiali_list_mesh_clusters
List Istio mesh clusters accessible to Kiali
kiali_get_resource_details
Fetch a list of resources or detailed data for a specific resource (apps, ArgoCD apps)
kiali_list_traces
List distributed traces for a service in a namespace
kiali_get_trace_details
Fetch a single distributed trace by trace ID and return its call hierarchy
kiali_get_pod_performance
Return a summary of Pod CPU/memory usage compared to Kubernetes requests/limits
kiali_get_logs
Get the logs of a Kubernetes Pod or workload in a namespace
kiali_get_metrics
Return a compact summary of Istio metrics (latency, traffic, throughput, payload sizes) for a resource
vm_clone
Clone a VirtualMachine on KubeVirt by creating a VirtualMachineClone resource
vm_create
Create a VirtualMachine on KubeVirt with automatic instance type, preference, and image resolution
vm_guest_info
Get guest OS information from a VirtualMachine's QEMU guest agent
vm_lifecycle
Manage KubeVirt VirtualMachine lifecycle: start, stop, or restart
vm_troubleshoot
Diagnose KubeVirt VirtualMachine issues with automated root-cause detection
netobserv_list_flows
List NetObserv network flow records from Loki
netobserv_get_flow_metrics
Return aggregated NetObserv flow metrics as topology or time-series data
netobserv_export_flows
Export NetObserv flow records as CSV with the same filters as list_flows

Setup

For Claude Desktop, edit claude_desktop_config.json to add: {"mcpServers":{"kubernetes":{"command":"npx","args":["-y","kubernetes-mcp-server@latest"]}}} (requires Node.js/npm). Alternatively run the PyPI package via uvx (requires Python/uv), or download a native Go binary release. For Docker/OCI, mount the kubeconfig file as a volume, set the KUBECONFIG env var, map port 8080, and connect over streamable-http to http://localhost:8080/mcp. VS Code, VS Code Insiders, and Cursor have one-click install links; Goose CLI uses a similar npx entry in config.yaml. Requires access to a Kubernetes cluster.

claude_desktop_config.json
{"mcpServers":{"kubernetes":{"command":"npx","args":["-y","kubernetes-mcp-server@latest"]}}}

Fit and risk

Best for

  • Developers and platform engineers who want AI assistants (Claude Desktop, Claude Code, VS Code, Cursor) to interact directly with Kubernetes/OpenShift clusters
  • Teams needing lightweight, dependency-free cluster access without kubectl/helm binaries installed locally
  • Multi-cluster environments defined across kubeconfig contexts

Not for

  • Users without access to a Kubernetes cluster
  • Strictly read-only or isolated environments where --read-only/--disable-destructive flags haven't been reviewed first
  • Users who just want a thin kubectl wrapper (this is a native reimplementation, not kubectl passthrough)

Required permissions

  • Requires a kubeconfig file (or in-cluster ServiceAccount) with API access to the target cluster(s)
  • Docker/OCI deployment requires a mounted kubeconfig volume and an exposed HTTP port
  • By default has full read/write access to cluster resources unless --read-only or --disable-destructive is set
  • The pods_exec tool can run arbitrary commands inside cluster containers

Risks and side effects

  • Default configuration allows create/update/delete on any Kubernetes/OpenShift resource, including Secrets, unless restricted via denied_resources or read-only mode
  • pods_exec and resources_create_or_update can be used to run arbitrary commands or alter cluster state
  • Streamable HTTP mode exposes a network endpoint (port 8080 in the Docker example) that should be secured with the supported OAuth/OIDC before exposing beyond localhost
  • Multi-cluster support means a single compromised MCP session could reach every cluster defined in the kubeconfig

Troubleshooting

  1. Verify the --kubeconfig path or in-cluster config resolves correctly if the server can't reach the cluster
  2. Use a higher --log-level value for verbose Kubernetes API debugging
  3. If a tool is missing, check that --toolsets includes the needed toolset (e.g., helm, tekton, kubevirt)
  4. For Docker/OCI deployment, confirm the kubeconfig volume mount path matches the KUBECONFIG env var inside the container
  5. Check the /stats endpoint or OpenTelemetry tracing (docs/OTEL.md) for observability issues

Use cases

Diagnose and automatically fix failing Deployments
Manage pods, namespaces, and generic Kubernetes/OpenShift resources
Install, list, and uninstall Helm releases
Start and troubleshoot Tekton Pipelines and Tasks
Create, clone, and troubleshoot KubeVirt virtual machines
Inspect Istio service mesh topology and metrics via Kiali
Analyze network flows and packet drops via NetObserv

Supported clients

Claude DesktopFull support
Claude CodeFull support
VS CodeFull support
CursorFull support
Goose CLIFull support