kubectl-mcp-server

v2.0.0
kubectl-mcp-server Checked 11 hours ago Published 1 month ago

Stateless Model Context Protocol (MCP 2026-07-28) server for Kubernetes with 280+ tools, resources, and prompts

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

kubectl_get Get Resources

List or get any Kubernetes resource, including custom resources (kubectl get).

ParameterTypeDescription
resource_type *stringKind, plural or short name, e.g. pods, deploy, svc, nodes, events, certificates.cert-manager.io
all_namespacesbooleanList across all namespaces
contextstringKubernetes context (optional)
field_selectore.g. status.phase=Running or involvedObject.name=web-123
label_selectore.g. app=web,tier!=db
nameA single resource name (omit to list)
namespaceNamespace (omit for the context default; ignored for cluster-scoped kinds)
outputstringtable (default), wide, name, yaml or json. Secret values are always redacted
sort_byJSONPath to sort by, e.g. .lastTimestamp for events

kubectl_logs Container Logs

Get container logs (kubectl logs).

ParameterTypeDescription
pod_name *stringPod name, or TYPE/NAME such as deployment/web to pick a pod of a workload
containerContainer name for multi-container pods
contextstringKubernetes context (optional)
namespacestringNamespace of the pod
previousbooleanLogs of the previous, crashed container instance
sinceOnly newer logs, e.g. 10m or 2h
tailintegerLines from the end (default 200; -1 for all)

kubectl_top Resource Usage

CPU and memory usage of pods or nodes from metrics-server (kubectl top).

ParameterTypeDescription
all_namespacesbooleanPods across all namespaces
containersbooleanPer-container usage for pods
contextstringKubernetes context (optional)
nameA single pod or node
namespaceNamespace for pods
resourcestringpods or nodes
sort_bycpu or memory

kubectl_scale Scale Workload

Scale a deployment, statefulset, replicaset or any scalable resource (kubectl scale).

ParameterTypeDescription
name *stringResource name
replicas *integerDesired replica count (0 stops the workload and needs confirmation in confirm mode)
resource_type *stringdeployment, statefulset, replicaset, or another kind with a scale subresource
contextstringKubernetes context (optional)
namespacestringNamespace

detect_ecosystem Detect Ecosystem

Detect installed operators (Flux, Argo CD, cert-manager, Kyverno, Istio, ...) and local CLIs, and report which toolsets or dedicated MCP servers cover them.

ParameterTypeDescription
contextstringKubernetes context (optional)

install_helm_chart Install Helm Chart

Install a Helm chart.

ParameterTypeDescription
chart *stringChart reference
name *stringRelease name
namespace *stringTarget namespace
contextstringKubernetes context to use (optional, uses current context if not specified)
repoRepository in format 'repo_name=repo_url'
valuesValues to override

upgrade_helm_chart Upgrade Helm Chart

Upgrade a Helm release.

ParameterTypeDescription
chart *stringChart reference
name *stringRelease name
namespace *stringTarget namespace
contextstringKubernetes context to use (optional, uses current context if not specified)
repoRepository in format 'repo_name=repo_url'
valuesValues to override

uninstall_helm_chart Uninstall Helm Chart

Uninstall a Helm release.

ParameterTypeDescription
name *stringRelease name to uninstall
namespace *stringTarget namespace
contextstringKubernetes context to use (optional, uses current context if not specified)

helm_list List Helm Releases

List Helm releases with optional filtering.

ParameterTypeDescription
all_namespacesbooleanList releases across all namespaces
contextstringKubernetes context to use (optional, uses current context if not specified)
deployedbooleanShow deployed releases only
failedbooleanShow failed releases only
filterFilter releases by name using regex
namespaceTarget namespace (default: current namespace)
pendingbooleanShow pending releases only
supersededbooleanShow superseded releases only
uninstalledbooleanShow uninstalled releases (if kept with --keep-history)

helm_status Helm Release Status

Get the status of a Helm release.

ParameterTypeDescription
release_name *stringName of the release
contextstringKubernetes context to use (optional, uses current context if not specified)
namespacestringKubernetes namespace
revisionShow status for a specific revision (default: latest)
show_descbooleanShow description of the release
show_resourcesbooleanShow resources created by the release

helm_history Helm Release History

Get the revision history of a Helm release.

ParameterTypeDescription
release_name *stringName of the release
contextstringKubernetes context to use (optional, uses current context if not specified)
max_revisionsintegerMaximum number of revisions to return
namespacestringKubernetes namespace

helm_get Get Helm Release Details

Get details of a Helm release: values, manifest, notes, hooks, or all.

ParameterTypeDescription
release_name *stringName of the release
all_valuesbooleanFor values, include chart defaults, not just user-supplied values
contextstringKubernetes context to use (optional, uses current context if not specified)
namespacestringKubernetes namespace
revisionSpecific revision (default: latest)
whatstringvalues (default), manifest, notes, hooks, or all

helm_rollback Helm Rollback

Rollback a Helm release to a previous revision.

ParameterTypeDescription
release_name *stringName of the release
revision *integerRevision number to rollback to (use helm_history to see revisions)
cleanup_on_failbooleanDelete newly created resources on failure
contextstringKubernetes context to use (optional, uses current context if not specified)
forcebooleanForce resource updates through delete/recreate
namespacestringKubernetes namespace
recreate_podsbooleanForce pod restarts
timeoutstringTimeout for waiting
waitbooleanWait until all resources are ready

kubectl_apply Kubectl Apply

Apply a YAML manifest to the cluster.

ParameterTypeDescription
manifest *stringYAML manifest content to apply
contextstringKubernetes context to use (optional, uses current context if not specified)
namespaceTarget namespace

kubectl_describe Kubectl Describe

Describe a Kubernetes resource in detail.

ParameterTypeDescription
name *stringName of the resource
resource_type *stringType of resource (e.g., pod, deployment, service)
contextstringKubernetes context to use (optional, uses current context if not specified)
namespaceTarget namespace

kubectl_generic Kubectl Generic

Execute any kubectl command. Use with caution.

ParameterTypeDescription
command *stringkubectl command to execute (without kubectl prefix)
contextstringKubernetes context to use (optional, uses current context if not specified)

kubectl_patch Kubectl Patch

Patch a Kubernetes resource.

ParameterTypeDescription
name *stringName of the resource
patch *stringJSON patch content
resource_type *stringType of resource to patch
contextstringKubernetes context to use (optional, uses current context if not specified)
namespaceTarget namespace
patch_typestringType of patch (strategic, merge, json)

kubectl_rollout Kubectl Rollout

Manage rollouts (restart, status, history, undo, pause, resume).

ParameterTypeDescription
action *stringRollout action (status, history, restart, undo, pause, resume)
name *stringName of the resource
resource_type *stringType of resource (deployment, statefulset, daemonset)
contextstringKubernetes context to use (optional, uses current context if not specified)
namespaceTarget namespace

delete_resource Delete Resource

Delete a Kubernetes resource.

ParameterTypeDescription
name *stringName of the resource
resource_type *stringType of resource to delete
contextstringKubernetes context to use (optional, uses current context if not specified)
namespaceTarget namespace

exec_in_pod Exec in Pod

Execute a command inside a pod.

ParameterTypeDescription
command *stringCommand to execute
pod_name *stringName of the pod
containerContainer name (for multi-container pods)
contextstringKubernetes context to use (uses current context if not specified)
namespaceNamespace of the pod

diagnose_pod_crash Diagnose Pod Crash

Automated diagnosis of pod crash loops and failures.

ParameterTypeDescription
pod_name *stringName of the pod
contextstringKubernetes context to use (uses current context if not specified)
namespacestringNamespace of the pod

detect_pending_pods Detect Pending Pods

Find pending pods and explain why they are not scheduled.

ParameterTypeDescription
contextstringKubernetes context to use (uses current context if not specified)
namespaceNamespace to search (all namespaces if not specified)

list_contexts List Contexts

List all available kubectl contexts with detailed info. Returns all contexts from kubeconfig with cluster, user, namespace info.

health_check Health Check

Perform a cluster health check.

ParameterTypeDescription
contextstringKubernetes context to use (uses current context if not specified)

kubectl_explain Kubectl Explain

Explain a Kubernetes resource.

ParameterTypeDescription
resource *stringResource type to explain (e.g., pods, deployments.spec)
contextstringKubernetes context to use (uses current context if not specified)

get_api_resources Get API Resources

Get available API resources.

ParameterTypeDescription
contextstringKubernetes context to use (uses current context if not specified)