Token导航 LogoToken导航TokenDH.com
MCP K8swizard logo
运维云端未说明官方级别未说明来源级核验

MCP K8swizard

MCP Server

MCP-K8sWizard是一款面向DevOps团队的AI驱动Kubernetes管理工具,提供自然语言界面和多云集群管理功能。

工具数

32

提示词数

0

GitHub Stars

3

资源数

0
Kubernetes管理GoCursorCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

heniv96

提供方

heniv96

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP-K8sWizard

![License](https://opensource.org/licenses/Apache-2.0) ](https://golang.org/) ![Kubernetes](https://kubernetes.io/) ![MCP](https://modelcontextprotocol.io/) ![Makefile](Makefile) ![Stars](https://github.com/heniv96/MCP-K8sWizard/stargazers) ![Issues](https://github.com/heniv96/MCP-K8sWizard/issues) ![PRs Welcome](https://github.com/heniv96/MCP-K8sWizard/pulls) ![Last Commit](https://github.com/heniv96/MCP-K8sWizard/commits/main)

Kubernetes现代DevOps向导\ 通过AI驱动的自然语言界面和全面的DevOps自动化简化Kubernetes操作。

🚀 概述

MCP-K8sWizard是一个为专业DevOps团队设计的全面的模型上下文协议(MCP)解决方案。它为复杂的Kubernetes工作流提供了自然语言接口,使团队能够通过人工智能驱动的对话高效地管理集群、监控应用程序和执行操作任务。

✨ 主要特点

🎯 多云Kubernetes管理

  • 通用兼容性:对EKS、AKS、GKE、RKE2、K3和标准Kubernetes发行版的原生支持
  • 智能集群检测:自动识别和配置集群类型和能力
  • 高级资源管理:跨所有Kubernetes资源类型的全面CRUD操作
  • 实时监控:实时集群运行状况、资源利用率和性能指标

🤖 人工智能驱动的操作

  • 自然语言处理:用于复杂DevOps操作的对话界面
  • 智能故障排除:人工智能驱动的诊断和逐步解决方案指导
  • 智能提示:针对不同场景的上下文感知提示建议
  • 自动化洞察:主动识别潜在问题和优化机会

🔒 安全和访问控制

  • RBAC集成:与Kubernetes RBAC和身份提供者完全集成
  • 审计日志:对所有操作和访问进行全面的审计跟踪
  • 安全通信:所有通信的TLS加密
  • 最低特权:采用最小权限访问模式设计安全

🏗️ 建筑

MCP协议集成

下图显示了MCP-K8sWizard如何通过模型上下文协议与VSCode/Cursor AI集成:

┌─────────────┐    ┌──────────────┐    ┌─────────────────┐
│ Cursor AI   │───▶│ MCP Protocol │───▶│ MCP-K8sWizard   │
└─────────────┘    └──────────────┘    │    Server       │
                                       └─────────┬───────┘
                                                 │
                    ┌────────────────────────────┼────────────────────────────┐
                    │                            │                            │
            ┌───────▼───────┐            ┌───────▼───────┐            ┌───────▼───────┐
            │ Kubernetes    │            │ Context       │            │ Tool Handlers │
            │ API           │            │ Manager       │            │               │
            └───────┬───────┘            └───────┬───────┘            └───────┬───────┘
                    │                            │                            │  
                    ┌────────────────────────────┼────────────────────────────┐
                    │                            │                            │
            ┌───────▼───────┐            ┌───────▼───────┐            ┌───────▼───────┐
            │ K8s Tools     │            │ Kubectl Tools │            │ Prompt Tools  │
            │               │            │               │            │               │
            │ • Cluster Info│            │ • Resource    │            │ • Diagnostics │
            │ • Resources   │            │   CRUD        │            │ • Troubleshoot│
            │ • Logs/Events │            │ • Scaling     │            │ • Optimization│
            │ • Pod Exec    │            │ • Rollouts    │            │ • Security    │
            └───────────────┘            └───────────────┘            └───────────────┘

组件体系结构

MCP-K8sWizard的内部架构遵循分层方法:

┌─────────────────────────────────────────────────────────────────────────────┐
│                              MCP Layer                                      │
├─────────────────────────────────────────────────────────────────────────────┤
│  MCP Server  ──▶  Tool Registry  ──▶  Request Router                        │
└──────────────────────────────────┬──────────────────────────────────────────┘
                                   │
┌──────────────────────────────────▼──────────────────────────────────────────┐
│                           Core Services                                     │
├─────────────────────────────────────────────────────────────────────────────┤
│  Context Manager  ──▶  K8s Client Manager  ──▶  Resource Handler            │
│         │                       │                        │                  │
│         └───────────────────────┼────────────────────────┘──────────────────┘
│                                 │                                           │
│  Config Manager  ──▶  Event Monitor ──▶ Kubernetes API                      │
└─────────────────────────────────────────────────────────────────────────────┘
                                  │
┌─────────────────────────────────▼───────────────────────────────────────────┐
│                         Tool Handlers                                       │
├─────────────────────────────────────────────────────────────────────────────┤
│  K8s Tools        │  Kubectl Tools     │  Prompt Tools     │  Context Tools │
│  ─────────        │  ────────────      │  ───────────      │  ────────────  │
│  • Cluster Ops    │  • Resource Mgmt   │  • AI Guidance    │ • Multi-Cluster│
│  • Monitoring     │  • CRUD Ops        │  • Diagnostics    │ • Context Sw.  │
│  • Debugging      │  • Scaling         │  • Optimization   │ • Health Chk   │
└─────────────────────────────────────────────────────────────────────────────┘

🛠️ 可用工具

Kubernetes管理工具(共37个)

类别工具描述
Kubernetes操作(14)k8s_cluster_info, k8s_check_all_clusters, ping, k8s_list_resources, k8s_get_resource, k8s_get_logs, k8s_get_events, k8s_exec_in_pod, k8s_natural_language_query直接Kubernetes API操作、监控和调试
Kubectl操作(12)kubectl_get, kubectl_describe, kubectl_create, kubectl_apply, kubectl_delete, kubectl_context, kubectl_scale, kubectl_patch, kubectl_rollout, kubectl_generic, explain_resource, list_api_resources通过kubectl进行完整的CRUD操作、扩展、推出和资源管理
上下文管理(4)k8s_set_context, k8s_get_current_context, k8s_list_contexts, k8s_clear_context多集群上下文切换和管理
人工智能制导(7)k8s_diagnose, k8s_troubleshoot, k8s_optimize, k8s_security, k8s_performance, k8s_deployment, prompt_suggestions智能诊断、优化和故障排除提示

🚀 快速开始

先决条件

  • 转到1.25.1或更高版本
  • Kubernetes集群访问(kubeconfig配置)
  • 支持MCP的VSCode/Cursor AI
  • macOS或Linux操作系统

安装

有关详细的安装说明,请参阅我们的综合 安装手册.

快速设置:

  1. 克隆并安装
   git clone https://github.com/your-org/mcp-k8swizard.git
   cd mcp-k8swizard
   make install
  1. 配置光标AI

添加到您的 ~/.cursor/mcp.json:

   {
     "mcpServers": {
       "k8s-wizard": {
         "command": "/path/to/mcp-k8swizard",
         "args": ["--verbose"]
       }
     }
   }
  1. 重新启动游标AI 并开始使用自然语言命令!
📖 需要详细的说明吗? 查看我们的 安装手册 用于分步设置、故障排除和高级配置选项。

基本用法

# Check cluster health
"Show me the status of all my Kubernetes clusters"

# List resources
"List all pods in the production namespace"

# Debug issues
"Get logs from the failing pod in the web-app deployment"

# Scale applications
"Scale the frontend deployment to 5 replicas"

# Troubleshoot problems
"Help me diagnose why my pod is stuck in Pending state"

📋 自然语言示例

群集管理

"Show me all my Kubernetes clusters and their health status"
"Check the resource usage across all nodes in my EKS cluster"
"List all namespaces and their resource quotas"

资源操作

"Create a new namespace called 'staging'"
"List all deployments with more than 3 replicas"
"Show me the configuration of the nginx service"
"Delete all pods with the label 'app=test'"

调试与故障排除

"Get the logs from the last 100 lines of the api-server pod"
"Show me events related to the failing deployment"
"Execute a shell command in the debug container"
"Why is my pod not starting? Help me troubleshoot"

扩展和更新

"Scale the web-app deployment to 10 replicas"
"Roll out a new version of the frontend service"
"Pause the rollout of the database deployment"
"Show me the rollout history for the api service"

🔧 配置

环境变量

变量描述默认值
KUBECONFIGkubeconfig文件的路径~/.kube/config
K8S_CONTEXT默认Kubernetes上下文当前上下文
LOG_LEVEL日志记录级别(调试、信息、警告、错误)INFO
LOG_FILE日志文件路径stdout

命令行选项

./mcp-k8swizard --help

Options:
  -log-level string
        Set log level (DEBUG, INFO, WARN, ERROR)
  -verbose
        Enable verbose logging (equivalent to DEBUG level)
  -version
        Show version information
  -help
        Show help information

🤝 贡献

我们欢迎捐款!请查看我们的 贡献指南 了解详情。

开发设置

  1. 分叉存储库
  2. 创建要素分支
  3. 进行更改
  4. 提交拉取请求

开发命令

# Build the project
make build

# Install dependencies
make deps

# Format code
make fmt

# Run linter
make lint

# Run go vet
make vet

# Clean build artifacts
make clean

代码的风格

  • 遵循Go标准格式(gofmt)
  • 使用有意义的变量和函数名
  • 为公共功能添加评论

📄 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🙏 致谢

📚 文档

手册

快速链接

📞 支持

  • 文档: 维基
  • 问题:
  • 讨论:

______________________________________________________________________

由以下材料制成❤️ Kubernetes社区

目录标签

目录标签

Kubernetes管理GoCursor本地部署DevOps自动化AI运维多云支持集群监控

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

32

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明nonelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP