Back to MCP directory
publicPublicdnsLocal runtime

kubernetes-mcp-server-cmx

一个用于通过自然语言调试和管理Kubernetes配置的MCP服务器,支持YAML文件分析、集群连接和Pod管理等功能。

article

README

🚀 Kubernetes 管理控制平面 (MCP) 服务器

这是一个借助自然语言处理技术,专门用于调试和管理 Kubernetes 配置的 MCP 服务器。它能有效解决 Kubernetes 配置调试和管理的难题,为用户提供便捷、高效的操作体验。

🚀 快速开始

安装步骤

  1. 安装 Claude 桌面应用。
  2. 安装此 MCP 服务器,有以下两种方式:
    • 使用 uv 命令:uv 运行:uv pip install git+https://github.com/ehiaig/kubernetes-mcp-server.git
    • 克隆此仓库: git clone https://github.com/ehiaig/kubernetes-mcp-server.git
  3. 打开 Claude 的 json 配置文件:
    • 在 MacOS 上:~/Library/Application\ Support/Claude/claude_desktop_config.json
    • 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json%

配置文件内容添加

本地测试使用 Claude 桌面应用

在配置文件中添加以下内容:

{
    "kubernetes-mcp-server": {
        "command": "/path/to/your/.local/bin/uv", // 或者 "uv"
        "args": [
            "--directory",
            "/path/to/this/repo/kubernetes-mcp-server/src/k8s_manager",
            "run",
            "-m",
            "k8s_manager"
        ]
    }
}

此时,你的 claude_desktop_config.json 文件应类似于以下内容:

{
    "mcpServers": {
        "kubernetes-mcp-server": {
            "command": "/path/to/your/.local/bin/uv",
            "args": [
                "--directory",
                "/path/to/this/repo/kubernetes-mcp-server/src/k8s_manager",
                "run",
                "-m",
                "k8s_manager"
            ]
        }
    }
}

已发布的服务器

在配置文件中添加以下内容:

"mcpServers": {
  "kubernetes-mcp-server": {
    "command": "uvx",
    "args": [
      "k8s_manager"
    ]
  }
}

✨ 主要特性

  • [x] 调试和分析 Kubernetes 配置 YAML/YML 文件
  • [x] 调试包含 YAML/YML 文件的整个 Kubernetes 配置文件夹
  • [x] Pod 管理(列出、查看、日志、删除)
  • [ ] Deployment 管理(创建、列出、查看、日志、删除)
  • [ ] Service 管理(创建、列出、查看、日志、删除)
  • [ ] Namespace 管理(列出、查看、日志、删除)
  • [ ] 调试和分析日志、服务、部署、有状态集合、DaemonSet、Ingress、节点、集群
  • [ ] Pod 或服务的端口转发
  • [ ] Helm 图表的安装和管理

⚠️ 重要提示

请勿配置包含敏感数据的集群,这包括密钥、密码等。任何与 LLM(大语言模型)交换的敏感数据都会被泄露,除非 LLM 完全在你的本地机器上运行。如果你对安全传递秘密到 CLUSTERS 感兴趣,请在此存储库中提交一个问题,描述你的使用场景。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client