MCP Server Kubernetes
Manage a Kubernetes cluster through kubectl and Helm from an MCP client
Manage Kubernetes and OpenShift clusters from an assistant through the cluster's API
By Containers Go Local · stdio DevOps and monitoringCloud platforms
88 popularity score ★ 2.2k ↓ 69k/wk
Opens the app, which asks before it adds the server.
claude mcp add kubernetes -- npx -y kubernetes-mcp-server@latest{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"-y",
"kubernetes-mcp-server@latest"
]
}
}
}{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"-y",
"kubernetes-mcp-server@latest"
]
}
}
}{
"servers": {
"kubernetes": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"kubernetes-mcp-server@latest"
]
}
}
}[mcp_servers.kubernetes]
command = "npx"
args = ["-y", "kubernetes-mcp-server@latest"]gemini mcp add --scope user kubernetes npx -- -y kubernetes-mcp-server@latestOpens the app, which asks before it adds the server.
claude mcp add kubernetes -- uvx kubernetes-mcp-server@latest{
"mcpServers": {
"kubernetes": {
"command": "uvx",
"args": [
"kubernetes-mcp-server@latest"
]
}
}
}{
"mcpServers": {
"kubernetes": {
"command": "uvx",
"args": [
"kubernetes-mcp-server@latest"
]
}
}
}{
"servers": {
"kubernetes": {
"type": "stdio",
"command": "uvx",
"args": [
"kubernetes-mcp-server@latest"
]
}
}
}[mcp_servers.kubernetes]
command = "uvx"
args = ["kubernetes-mcp-server@latest"]gemini mcp add --scope user kubernetes uvx -- kubernetes-mcp-server@latestKUBECONFIG |
Optional: Path to the kubeconfig, read by the Kubernetes client library when no kubeconfig is set in TOML. |
|---|---|
MCP_CONFIG_PATH |
Optional: Path to the main TOML file (read_only, toolsets, port and so on); ignored when --config is given. |
KUBE_CLIENT_QPS |
Optional: Request rate limit for the Kubernetes API client; 0 uses the client's own default. |
KUBE_CLIENT_BURST |
Optional: Burst limit for the Kubernetes API client; 0 uses the client's own default. |
| Set together: telemetry | |
OTEL_EXPORTER_OTLP_ENDPOINT |
Optional: OpenTelemetry collector endpoint; setting it turns on trace and metric export. |
OTEL_EXPORTER_OTLP_PROTOCOL |
Optional: OTLP protocol, grpc or http/protobuf. |
OTEL_TRACES_SAMPLER |
Optional: Trace sampling strategy, such as traceidratio. |
Kubernetes MCP Server connects an MCP client to one or more Kubernetes or OpenShift clusters. It is a Go program that calls the Kubernetes API server directly instead of wrapping kubectl or helm, so neither has to be installed. It finds clusters through your kubeconfig, which it watches for changes, or through in-cluster credentials when it runs in a pod.
Only the core and config toolsets load by default. Together they cover everyday cluster work: listing and reading pods and their logs, running commands in containers, starting pods, events, namespaces and OpenShift projects, node logs and usage figures, and get, list, apply, delete and scale on any resource by apiVersion and kind. Optional toolsets add Helm releases, kcp workspaces, Kiali and Istio mesh views and config edits, KubeVirt virtual machines, NetObserv network flows and Tekton pipelines. Recent releases add four observability toolsets: Loki log queries (observability/logs), Prometheus and Alertmanager queries (observability/metrics), OpenTelemetry Collector config schemas and validation (observability/otelcol) and Tempo trace search (observability/traces). The tool snapshots at the release tag show 77 tools with every toolset on. There are also 16 prompts, such as a cluster health check.
It speaks stdio unless a port is set in TOML, then serves Streamable HTTP at /mcp, where it can require OAuth/OIDC. Settings live in TOML: read_only, disable_destructive, toolsets, enabled_tools, disabled_tools and denied_resources trim what it exposes, and confirmation_rules can ask the user before risky calls in clients that support elicitation. Its config code caps one tool result at 16 MiB (max_result_bytes), one backend response at 4 MiB (max_backend_response_bytes) and runs 64 calls at once (max_in_flight). It ships as native binaries for Linux, macOS and Windows, an npm package, a PyPI package, a container image and a Helm chart.
| Runtime | Node.jsPythonA prebuilt binary |
|---|---|
| Runs on | macOS, Windows, Linux |
| Kubernetes or OpenShift cluster | Your own instanceA kubeconfig (~/.kube/config or $KUBECONFIG) or an in-cluster service account; it acts with that identity's RBAC rights |
| Also |
|
Pick one way to run it: Node.js for npx, uv for uvx, or the native release binary, which needs neither. vm_guest_info needs the QEMU guest agent running inside the VM. For production its Kubernetes setup guide suggests a dedicated ServiceAccount with read-only rights.
Only the core and config toolsets load by default; Helm, kcp, Kiali, KubeVirt, NetObserv and Tekton tools must be enabled in the TOML toolsets setting. Runtime settings are TOML or a few environment variables, not command-line flags, and unknown TOML keys stop the server from starting. OAuth sign-in only works in HTTP mode. The published container image serves HTTP on port 8080 rather than stdio.
Suits developers and platform engineers who want an assistant to inspect and operate clusters they already reach with kubectl credentials, including OpenShift and multi-cluster kubeconfigs, without installing kubectl or helm. Because it acts with whatever rights the kubeconfig grants and can delete, exec and apply, it fits best with a dedicated ServiceAccount and read_only or disable_destructive turned on, as its own Kubernetes setup guide suggests for production. It is a community project under the containers organisation, not a release of the Kubernetes project or a cloud vendor; teams that only need a managed cloud's own Kubernetes console may prefer that vendor's server.
44 only read, 11 change things, 5 can delete or overwrite. A ? marks an optional parameter.
configuration_contexts_listtargets_listconfiguration_viewminified?: booleanevents_listcontext?: stringcontinue?: stringfieldSelector?: stringlimit?: integernamespace?: stringnamespaces_listcontext?: stringcontinue?: stringfieldSelector?: stringlimit?: integerprojects_listcontext?: stringcontinue?: stringlimit?: integernodes_logcontext?: stringname: stringquery: stringtailLines?: integernodes_stats_summarycontext?: stringname: stringnodes_topcontext?: stringcontinue?: stringlabel_selector?: stringlimit?: integername?: stringpods_listcontext?: stringcontinue?: stringfieldSelector?: stringlabelSelector?: stringlimit?: integerpods_list_in_namespacecontext?: stringcontinue?: stringfieldSelector?: stringlabelSelector?: stringlimit?: integernamespace: stringpods_getcontext?: stringname: stringnamespace?: stringpods_delete deletescontext?: stringname: stringnamespace?: stringpods_topall_namespaces?: booleancontext?: stringcontinue?: stringlabel_selector?: stringlimit?: integername?: stringnamespace?: stringpods_exec deletescommand: arraycontainer?: stringcontext?: stringname: stringnamespace?: stringpods_logcontainer?: stringcontext?: stringname: stringnamespace?: stringprevious?: booleantail?: integerpods_run changescontext?: stringimage: stringname?: stringnamespace?: stringport?: numberresources_listapiVersion: stringcontext?: stringcontinue?: stringfieldSelector?: stringkind: stringlabelSelector?: stringlimit?: integernamespace?: stringresources_getapiVersion: stringcontext?: stringkind: stringname: stringnamespace?: stringresources_create_or_update deletescontext?: stringresource: stringresources_delete deletesapiVersion: stringcontext?: stringgracePeriodSeconds?: integerkind: stringname: stringnamespace?: stringresources_scale changesapiVersion: stringcontext?: stringkind: stringname: stringnamespace?: stringscale?: integerhelm_install changeschart: stringname?: stringnamespace?: stringvalues?: objecthelm_listall_namespaces?: booleanlimit?: integernamespace?: stringoffset?: integerhelm_uninstall deletesname: stringnamespace?: stringvm_clone changesname: stringnamespace: stringtargetName: stringvm_console_screenshotname: stringnamespace: stringvm_create changesautostart?: booleaninstancetype?: stringname: stringnamespace: stringnetworks?: arrayperformance?: stringpreference?: stringsize?: stringstorage?: stringworkload?: stringvm_guest_infoinfo_type?: enumname: stringnamespace: stringvm_lifecycle changesaction: enumname: stringnamespace: stringvm_create_from_template changesnamespace: stringparameters?: objecttemplate_name: stringvm_troubleshootname: stringnamespace: stringloki_list_instancesloki_label_namesend?: stringlokiName?: stringlokiNamespace?: stringstart?: stringtenant?: stringloki_label_valuesend?: stringlabel: stringlokiName?: stringlokiNamespace?: stringstart?: stringtenant?: stringloki_query_rangedirection?: stringduration?: stringend?: stringlimit?: integerlokiName?: stringlokiNamespace?: stringquery: stringstart?: stringtenant?: stringlist_metricsname_regex: stringexecute_instant_queryquery: stringtime?: stringexecute_range_queryduration?: stringend?: stringquery: stringstart?: stringstep: stringshow_timeseriesdescription?: stringduration?: stringend?: stringquery: stringstart?: stringstep: stringtitle?: stringget_label_namesend?: stringmetric?: stringstart?: stringget_label_valuesend?: stringlabel: stringmetric?: stringstart?: stringget_seriesend?: stringmatches: stringstart?: stringget_alertsactive?: booleanfilter?: stringinhibited?: booleanreceiver?: stringsilenced?: booleanunprocessed?: booleanget_silencesfilter?: stringotelcol_list_componentsversion?: stringotelcol_get_component_schemacomponent_name: stringcomponent_type: stringversion?: stringotelcol_validate_configcomponent_name: stringcomponent_type: stringconfig: stringformat?: stringversion?: stringtempo_list_instancestempo_get_trace_by_idend?: stringstart?: stringtempoName: stringtempoNamespace: stringtenant?: stringtraceid: stringtempo_search_tracesend?: stringlimit?: integerquery: stringspss?: integerstart?: stringtempoName: stringtempoNamespace: stringtenant?: stringtempo_search_tagsend?: stringlimit?: integermaxStaleValues?: integerquery?: stringscope?: stringstart?: stringtempoName: stringtempoNamespace: stringtenant?: stringtempo_search_tag_valuesend?: stringlimit?: integermaxStaleValues?: integerquery?: stringstart?: stringtag: stringtempoName: stringtempoNamespace: stringtenant?: stringtekton_pipeline_start changesname: stringnamespace?: stringparams?: objecttekton_pipelinerun_lifecycle changesaction: enumname: stringnamespace?: stringtekton_pipelinerun_logsname: stringnamespace?: stringstep?: stringtail?: integertask?: stringtekton_pipelinerun_diagnosename: stringnamespace: stringtekton_task_start changesname: stringnamespace?: stringparams?: objecttekton_taskrun_restart changesname: stringnamespace?: stringtekton_taskrun_logsname: stringnamespace?: stringstep?: stringtail?: integercluster-health-checkmesh-list-applicationslist-istio-configmesh-list-namespacesmesh-list-servicesmesh-list-workloadsmesh-health-checkmesh-topologytraffic-topologyservice-troubleshoottrace-analysisistio-config-reviewvm-troubleshootwindows-golden-imagehco-statuspipeline-troubleshoot