MCP.so
登录

K8s MCP Server

@alexei-led

基本信息

分类

云与基础设施

许可证

MIT

传输方式

stdio

作者

alexei-led

提交者

Alexei Ledenev

关于 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

K8s MCP Server 配置

使用下面的配置,将此服务器添加到你的 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"
      ]
    }
  }
}

K8s MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 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

常见问题

1

What CLI tools are included in K8s MCP Server?

The server includes `kubectl`, `helm`, `istioctl`, and `argocd` in a single Docker container.

2

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.

3

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.

4

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`.

5

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 服务器