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
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.
Frequently asked questions
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.
Basic information
More Cloud & Infrastructure MCP servers
Lambda MCP Server Demo (Streamable HTTP)
mikegc-awsCreates a simple MCP tool server with "streaming" HTTP.
Sample Serverless MCP Servers
aws-samplesSample implementations of AI Agents and MCP Servers running on AWS Serverless compute
Supabase MCP Server
supabase-communityConnect Supabase to your AI assistants

Nippy
NippyNippy is drag-and-drop hosting (nippy.host) with an MCP server: connect it and your assistant can publish HTML, folders of photos, or file downloads to a live *.nippy.site URL — and keep editing the site in place at the
Terraform MCP Server
hashicorpThe Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
Comments