K8s MCP Server
@alexei-led
关于 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
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"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"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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.
云与基础设施 分类下的更多 MCP 服务器
AWS Model Context Protocol (MCP) Server
alexei-ledA lightweight service that enables AI assistants to execute AWS CLI commands (in safe containerized environment) through the Model Context Protocol (MCP). Bridges Claude, Cursor, and other MCP-aware AI tools with AWS CLI for enhanced cloud infrastructure management.
Query | MCP server for Supabase
alexander-zuevQuery MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning, access to logs and much more.
aws-finops-mcp-server
ravikiranvmAn MCP (Model Context Protocol) server that brings powerful AWS FinOps capabilities directly into your AI assistant. Analyze cloud costs, audit for waste, and get budget insights using natural language, all while keeping your credentials secure on your local machine.
MCP Server Kubernetes
Flux159MCP Server for kubernetes management commands
AWS MCP
RafalWilinskiTalk with your AWS using Claude. Model Context Protocol (MCP) server for AWS. Better Amazon Q alternative.
评论