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.

コメント

「クラウドとインフラ」の他のコンテンツ