MCP.so
ログイン

MCP Kubernetes Server

@feiskyer

基本情報

カテゴリ

クラウドとインフラ

ライセンス

Apache-2.0

トランスポート

stdio

作者

feiskyer

MCP Kubernetes Server について

A Model Context Protocol (MCP) server that enables AI assistants to interact with Kubernetes clusters. It serves as a bridge between AI tools (like Claude, Cursor, and GitHub Copilot) and Kubernetes, translating natural language requests into Kubernetes operations and returning t

MCP Kubernetes Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "kubernetes": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--mount",
        "type=bind,src=/home/username/.kube/config,dst=/home/mcp/.kube/config",
        "ghcr.io/feiskyer/mcp-kubernetes-server"
      ]
    }
  }
}

MCP Kubernetes Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is mcp-kubernetes-server?

mcp-kubernetes-server is a Model Context Protocol (MCP) server that enables AI assistants to interact with Kubernetes clusters. It translates natural language requests from AI assistants into kubectl commands or direct Kubernetes API calls, executing them against the target cluster and returning structured responses.

How to use mcp-kubernetes-server?

Install via Docker or uvx. Configure in the mcpServers section of your AI client (Claude Desktop, Cursor, ChatGPT Copilot, GitHub Copilot). Provide a valid kubeconfig either via the KUBECONFIG environment variable (uvx) or by mounting the file into the container (Docker). Ensure kubectl, helm, and Python ≥3.11 (for uvx) are installed. Run with optional command-line flags to disable specific operations or change transport (stdio, sse, streamable-http).

Key features of mcp-kubernetes-server

  • Executes arbitrary kubectl and helm commands.
  • Provides read tools for resources, logs, events, APIs, and CRDs.
  • Offers write tools for create, apply, expose, scale, and rollout operations.
  • Supports disabling kubectl, helm, write, or delete operations.
  • Provides RBAC check tools (k8s_auth_can_i, k8s_auth_whoami).
  • Supports multiple transports: stdio, SSE, and streamable HTTP.

Use cases of mcp-kubernetes-server

  • Query cluster status and resource states via natural language.
  • Diagnose pod issues by inspecting logs, events, and resource descriptions.
  • Manage deployments (scale, rollout, set images, environment variables).
  • Perform administrative tasks like cordoning nodes or checking RBAC permissions.
  • Automate cluster operations through AI assistants in CI/CD pipelines.

よくある質問

1

What prerequisites are needed to run mcp-kubernetes-server?

A working Kubernetes cluster, a valid kubeconfig file, kubectl and helm installed in the system PATH, and Python ≥3.11 if using uvx (not required for Docker).

2

How do I configure the kubeconfig?

Set the `KUBECONFIG` environment variable to the path of your kubeconfig file, or when using Docker mount the kubeconfig file to `/home/mcp/.kube/config`.

3

Can I disable write or delete operations?

Yes, use the `--disable-write` flag to block all write operations or `--disable-delete` to block deletions. Similarly, `--disable-kubectl` and `--disable-helm` disable those command executers.

4

What transport mechanisms are supported?

mcp-kubernetes-server supports three transports: `stdio` (default for uvx), `sse`, and `streamable-http`. Use the `--transport` flag to choose, and specify `--host`/`--port` for the server transports.

5

Which AI assistants are compatible?

The server works with any AI client that supports the Model Context Protocol, including Claude Desktop, Cursor, ChatGPT Copilot, and GitHub Copilot.

コメント

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