K8s MCP Server
@alexei-led
About K8s MCP Server
K8s-mcp-server is a Model Context Protocol (MCP) server that enables AI assistants like Claude to securely execute Kubernetes commands. It provides a bridge between language models and essential Kubernetes CLI tools including kubectl, helm, istioctl, and argocd, allowing AI syste
Basic information
Category
Cloud & Infrastructure
License
MIT
Runtime
python
Transports
stdio
Publisher
alexei-led
Submitted by
Alexei Ledenev
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"k8s-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--network=host",
"-v",
"/Users/YOUR_USER_NAME/.kube:/home/appuser/.kube",
"ghcr.io/alexei-led/k8s-mcp-server:latest"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is K8s MCP Server?
K8s MCP Server is a Docker-based server implementing Anthropic’s Model Context Protocol (MCP) that enables Claude to run Kubernetes CLI tools – kubectl, istioctl, helm, and argocd – in a secure, containerized environment. It is designed for Claude Desktop users who want to manage, troubleshoot, and interact with their Kubernetes clusters through natural language.
How to use K8s MCP Server?
Configure the server in your Claude Desktop configuration file (claude_desktop_config.json) by running the ghcr.io/alexei-led/k8s-mcp-server:latest Docker image with your local .kube directory mounted read-only. Restart Claude Desktop, then ask Kubernetes questions in natural language – the server executes the corresponding CLI commands and returns results.
Key features of K8s MCP Server
- Runs multiple Kubernetes tools in one container (kubectl, helm, istioctl, argocd)
- Supports AWS EKS, Google GKE, and Azure AKS clusters
- Operates as a non-root user with strict command validation
- Provides three transport protocols: stdio, streamable-http, and SSE
- Allows command piping with jq, grep, and sed
- Configurable via simple environment variables (e.g.,
K8S_CONTEXT,K8S_NAMESPACE)
Use cases of K8s MCP Server
- Deploy and manage applications using Helm charts (e.g., WordPress) directly from Claude
- Diagnose and fix broken Kubernetes resources (e.g., scaled-down StatefulSets)
- Check cluster status, list pods/services, and view logs across namespaces
- Configure Istio service mesh and ArgoCD applications through natural language
- Set up ingress, canary deployments, and other advanced Kubernetes tasks
FAQ from K8s MCP Server
What CLI tools are included in K8s MCP Server?
The server includes kubectl, helm, istioctl, and argocd in a single Docker container.
How does K8s MCP Server connect to my Kubernetes cluster?
It mounts your local .kube directory as a read-only volume inside the container at /home/appuser/.kube. The server then uses your existing kubeconfig to authenticate.
What transport protocols does K8s MCP Server support?
It supports stdio (default for Claude Desktop), streamable-http (recommended for remote/web clients), and sse (deprecated). The transport is set via the K8S_MCP_TRANSPORT environment variable.
How do I target a specific cluster or namespace?
Set the K8S_CONTEXT and K8S_NAMESPACE environment variables when running the Docker container. For example, -e K8S_CONTEXT=production-cluster -e K8S_NAMESPACE=my-application.
Is K8s MCP Server secure?
Yes. The server runs as a non-root user and enforces strict command validation. It also offers a permissive security mode (set via K8S_MCP_SECURITY_MODE=permissive) for advanced use cases.
More Cloud & Infrastructure MCP servers
Supabase MCP Server
supabase-communityConnect Supabase to your AI assistants
Cloudflare MCP Server
cloudflaretfmcp: Terraform Model Context Protocol Tool
nwiizo🌍 Terraform Model Context Protocol (MCP) Tool - An experimental CLI tool that enables AI assistants to manage and operate Terraform environments. Supports reading Terraform configurations, analyzing plans, applying configurations, and managing state with Claude Desktop integrati
Kubernetes MCP Server
manusaModel Context Protocol (MCP) server for Kubernetes and OpenShift

Aws Kb Retrieval Server
modelcontextprotocolModel Context Protocol Servers
Comments