Kube Core MCP

by Jess321995
1
  • Linux

Integrations

  • Exposes API endpoints for health checks, service discovery, natural language command processing, and direct command execution through a REST interface

  • Converts natural language requests into valid kubectl commands for Kubernetes cluster management, supporting operations like viewing pods, services, and other resources across namespaces with built-in security validation

Kube 核心 MCP

将自然语言请求转换为有效的 kubectl 命令的 Kubernetes 命令处理服务。

特征

  • 自然语言到 kubectl 命令的转换
  • 命令验证和安全检查
  • 支持常见的 kubectl 操作
  • 用于 LLM 处理的 AWS Bedrock 集成

先决条件

  • Python 3.8+
  • 已配置 AWS 凭证
  • kubectl 安装和配置
  • Node.js 和 npm(用于前端)

设置

  1. 克隆存储库:
git clone <repository-url> cd kube-core-mcp
  1. 创建并激活虚拟环境:
python3 -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\activate
  1. 安装依赖项:
pip install -r requirements.txt
  1. 配置AWS凭证:
export AWS_ACCESS_KEY_ID=your_access_key export AWS_SECRET_ACCESS_KEY=your_secret_key export AWS_REGION=your_region
  1. 启动 FastAPI 服务器:
python src/server.py

API 文档

健康检查

curl http://localhost:3000/health

服务

curl http://localhost:3000/api/services

自然语言命令

curl -X POST http://localhost:3000/api/nl \ -H "Content-Type: application/json" \ -d '{"message": "show me the pods in default namespace"}'

直接命令

curl -X POST http://localhost:3000/api/command \ -H "Content-Type: application/json" \ -d '{"command": "kubectl get pods -n default"}'

安全

该服务以两种安全模式运行:

  1. 严格(默认):
    • 仅允许预定义的命令模式
    • 根据允许的模式验证所有命令
    • 防止危险操作
  2. 允许:
    • 允许更灵活的命令模式
    • 仍然保持基本的安全检查
    • 对于开发和测试有用

发展

运行测试

pytest tests/

代码风格

black src/ tests/ flake8 src/ tests/

贡献

  1. 分叉存储库
  2. 创建功能分支
  3. 进行更改
  4. 运行测试
  5. 提交拉取请求

执照

[添加许可信息]

-
security - not tested
F
license - not found
-
quality - not tested

Kubernetes 命令处理服务,将自然语言请求转换为有效的 kubectl 命令,提供命令验证和安全检查。

  1. 特征
    1. 先决条件
      1. 设置
        1. API 文档
          1. 健康检查
          2. 服务
          3. 自然语言命令
          4. 直接命令
        2. 安全
          1. 发展
            1. 运行测试
            2. 代码风格
            3. 贡献
          2. 执照

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              TypeScript implementation of Kubernetes cluster operations for pods, deployments, services.
              Last updated -
              9
              1,194
              560
              TypeScript
              MIT License
              • Linux
              • Apple
            • A
              security
              F
              license
              A
              quality
              A MCP server that can run Kubernetes commands with a given kubeconfig path and provide interpretation of the commands.
              Last updated -
              1
              2
              JavaScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              A read-only MCP server for Kubernetes that allows querying cluster information and diagnosing issues through natural language interfaces like Claude.
              Last updated -
              1
              Python
              MIT License
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              An MCP server that enables interaction with Kubernetes/Minikube clusters through natural language, allowing AI agents like Codename Goose to manage Kubernetes resources via the Model Context Protocol.
              Last updated -
              Python
              MIT License

            View all related MCP servers

            ID: zcpd66bfu2