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.

评论

云与基础设施 分类下的更多 MCP 服务器