Basic information
About MCP Server Kubernetes
MCP Server for kubernetes management commands
MCP Server Kubernetes is a MCP server in the Cloud & Infrastructure category listed in the AddMCP.net directory, published by Flux159. It exposes 23 tools, including cleanup, kubectl_get, kubectl_describe, kubectl_apply and more. Supported transport: stdio. Runtime: node. License: MIT. The repository has 1,455 GitHub stars. Source code is hosted on github.com. Related topics: infrastructure, kubernetes, mcp, server.
Setup
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
]
}
}
}
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
]
}
}
}
{
"servers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
]
}
}
}
MCP Server Kubernetes — by Flux159 config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
]
}
}
}
MCP Server Kubernetes — by Flux159 tools
-
cleanup
— Cleanup all managed resources
(no parameters) -
kubectl_get
— Get or list Kubernetes resources by resource type, name, and optionally namespace
resourceType:string*, name:string, namespace:string, output:string, allNamespaces:boolean, labelSelector:string, fieldSelector:string, sortBy:string, context:string -
kubectl_describe
— Describe Kubernetes resources by resource type, name, and optionally namespace
resourceType:string*, name:string*, namespace:string, context:string, allNamespaces:boolean -
kubectl_apply
— Apply a Kubernetes YAML manifest from a string or file
manifest:string, filename:string, namespace:string, dryRun:boolean, force:boolean, context:string -
kubectl_delete
— Delete Kubernetes resources by resource type, name, labels, or from a manifest file
resourceType:string, name:string, namespace:string, labelSelector:string, manifest:string, filename:string, allNamespaces:boolean, force:boolean, gracePeriodSeconds:number, context:string -
kubectl_create
— Create Kubernetes resources using various methods (from file or using subcommands)
dryRun:boolean, output:string, validate:boolean, manifest:string, filename:string, resourceType:string, name:string, namespace:string, fromLiteral:array, fromFile:array, fromFileContent:array, secretType:string, … -
kubectl_logs
— Get logs from Kubernetes resources like pods, deployments, or jobs
resourceType:string*, name:string*, namespace:string*, container:string, tail:number, since:string, sinceTime:string, timestamps:boolean, previous:boolean, follow:boolean, labelSelector:string, context:string, … -
kubectl_scale
— Scale a Kubernetes deployment
name:string*, namespace:string, replicas:number*, resourceType:string, context:string -
kubectl_patch
— Update field(s) of a resource using strategic merge patch, JSON merge patch, or JSON patch
resourceType:string*, name:string*, namespace:string, patchType:string, patchData:object, patchFile:string, dryRun:boolean, context:string -
kubectl_rollout
— Manage the rollout of a resource (e.g., deployment, daemonset, statefulset)
subCommand:string*, resourceType:string*, name:string*, namespace:string*, revision:number, toRevision:number, timeout:string, watch:boolean, context:string -
kubectl_context
— Manage Kubernetes contexts - list, get, or set the current context
operation:string*, name:string, showCurrent:boolean, detailed:boolean, output:string -
kubectl_reconnect
— Reconnect to the Kubernetes API server by recreating all API clients. Use this after cluster upgrades (e.g., EKS control plane upgrades that rotate ENIs/IPs) to force fresh DNS resolution and new TCP connections.
(no parameters) -
explain_resource
— Get documentation for a Kubernetes resource or field
resource:string*, apiVersion:string, recursive:boolean, context:string, output:string -
install_helm_chart
— Install a Helm chart with support for both standard and template-based installation
name:string*, chart:string*, namespace:string*, context:string, repo:string, values:object, valuesFile:string, useTemplate:boolean, createNamespace:boolean -
upgrade_helm_chart
— Upgrade an existing Helm chart release
name:string*, chart:string*, namespace:string*, context:string, repo:string, values:object, valuesFile:string -
uninstall_helm_chart
— Uninstall a Helm chart release
name:string*, namespace:string*, context:string -
node_management
— Manage Kubernetes nodes with cordon, drain, and uncordon operations
operation:string*, nodeName:string, force:boolean, gracePeriod:number, deleteLocalData:boolean, ignoreDaemonsets:boolean, timeout:string, dryRun:boolean, confirmDrain:boolean -
port_forward
— Forward a local port to a port on a Kubernetes resource
resourceType:string*, resourceName:string*, localPort:number*, targetPort:number*, namespace:string -
stop_port_forward
— Stop a port-forward process
id:string* -
exec_in_pod
— Execute a command in a Kubernetes pod or container and return the output. Command must be an array of strings where the first element is the executable and remaining elements are arguments. This executes directly without shell interpretation for security.
name:string*, namespace:string, command:array*, container:string, timeout:number, context:string -
list_api_resources
— List the API resources available in the cluster
apiGroup:string, namespaced:boolean, context:string, verbs:array, output:string -
kubectl_generic
— Execute any kubectl command with the provided arguments and flags
command:string*, subCommand:string, resourceType:string, name:string, namespace:string, allNamespaces:boolean, outputFormat:string, flags:object, args:array, context:string -
ping
— Verify that the counterpart is still responsive and the connection is alive.
(no parameters)
Overview
What is MCP Server Kubernetes?
MCP Server Kubernetes is a Model Context Protocol server that connects to a Kubernetes cluster and enables AI assistants to manage it. It loads kubeconfig from multiple sources in priority order and integrates with clients such as Claude Code, Claude Desktop, VS Code, Cursor, and Gemini CLI. It is intended for developers who need AI-assisted Kubernetes operations.
How to use MCP Server Kubernetes?
Install it via npx (e.g., npx mcp-server-kubernetes) and configure the server in your MCP client’s settings (e.g., claude mcp add kubernetes -- npx mcp-server-kubernetes). The server automatically uses your current kubectl context. Prerequisites: kubectl in PATH, a valid kubeconfig, and cluster access; Helm v3 is optional.
Key features of MCP Server Kubernetes
- Connects to any Kubernetes cluster accessible via kubectl.
- Unified kubectl API: get, describe, create, apply, delete, logs, context, explain, scale, patch, rollout, and generic commands.
- Advanced operations: port forward, Helm install/upgrade/uninstall, pod cleanup, node management.
- Non-destructive mode that blocks destructive operations.
- Secrets masking for security.
- Optional OpenTelemetry observability with distributed tracing.
Use cases of MCP Server Kubernetes
- Manage Kubernetes resources through natural-language chat prompts in AI assistants.
- Automatically diagnose pod issues using the built-in /k8s-diagnose troubleshooting flow.
- Safely monitor and inspect clusters in read‑only or create/update‑only mode.
- Perform Helm chart operations (install, upgrade, uninstall) via AI-guided commands.
Frequently asked questions
1 What are the prerequisites for running MCP Server Kubernetes?
You need kubectl installed and in your PATH, a valid kubeconfig file with configured contexts, and access to a Kubernetes cluster (e.g., minikube, Rancher Desktop, GKE). Helm v3 is optional.
2 How do I enable non-destructive mode?
Set the environment variable ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true when starting the server. This disables all destructive operations (delete, drain, etc.) while keeping read and create/update tools available.
3 Does MCP Server Kubernetes support observability?
Yes, it includes optional OpenTelemetry integration (disabled by default). Enable it with ENABLE_TELEMETRY=true and configure OTEL_EXPORTER_OTLP_ENDPOINT. Traces can be sent to Jaeger, Grafana Tempo, Datadog, New Relic, and other OTLP-compatible backends.
4 Where does the server load its configuration from?
By default, it loads kubeconfig from ~/.kube/config. Additional authentication options (environment variables, custom paths) are described in the advanced documentation.
5 What transport and authentication does the server use?
It uses stdio transport configured through your MCP client. Authentication relies on your existing kubectl context and kubeconfig; no separate credentials are managed by the server itself.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In