AM

abhijeetka/mcp-k8s-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 2 forks 质量 47 趋势 18

This is an MCP kubernetes Server.

概览

This is an MCP (Model Context Protocol) server for Kubernetes that provides control over Kubernetes clusters through interactions with LLMs. This client allows you to perform common Kubernetes operations through MCP tools. It wraps kubectl commands to provide a simple interface for managing Kubernetes resources. The Model Context Protocol (MCP) enables seamless interaction between language models and Kubernetes operations. Model Context Protocol (MCP) is a framework that enables Language Models to interact with external tools and services in a structured way. It provides: - A standardized way to expose functionality to language models - Context management for operations - Tool discovery and documentation - Type-safe interactions between models and tools - Create a new deployment for me with name nginx-app and image nginx:latest in the production namespace with 3 replicas. - Update the deployment nginx-app to version 1.19 in the production namespace.

README

以下为原文 README 节选,完整内容请查看原文。

MCP Kubernetes Server

This is an MCP (Model Context Protocol) server for Kubernetes that provides control over Kubernetes clusters through interactions with LLMs.

Overview

This client allows you to perform common Kubernetes operations through MCP tools. It wraps kubectl commands to provide a simple interface for managing Kubernetes resources. The Model Context Protocol (MCP) enables seamless interaction between language models and Kubernetes operations.

What is MCP?

Model Context Protocol (MCP) is a framework that enables Language Models to interact with external tools and services in a structured way. It provides:

  • A standardized way to expose functionality to language models
  • Context management for operations
  • Tool discovery and documentation
  • Type-safe interactions between models and tools

Usage Examples

  • Create a new deployment for me with name nginx-app and image nginx:latest in the production namespace with 3 replicas.
  • Update the deployment nginx-app to version 1.19 in the production namespace.
  • Scale the deployment nginx-app to 5 replicas in the production namespace.
  • Get me the pods in the production namespace.
  • Get me all namespaces in the cluster.
  • Get me all nodes in the cluster.
  • Get me all services in the cluster.
  • Get me all deployments in the cluster.
  • Get me all jobs in the cluster.
  • Get me all cronjobs in the cluster.
  • Get me all statefulsets in the cluster.
  • Get me all daemonsets in the cluster.
  • What is the current context.
  • list all contexts.
  • switch to context .
  • Get me the logs of pod in the production namespace.
  • Get me the events in the production namespace.
  • annotate pod with key1=value1 in the production namespace.
  • remove annotation key1 from pod in the production namespace.
  • add label key1=value1 to pod in the production namespace.
  • remove label key1 from pod in the production namespace.
  • expose deployment nginx-app in the production namespace on port 80.
  • port-forward pod,deployment,service with name in the production namespace to local port 8080.
  • delete pod, deployment, service, job, cronjob, statefulset, daemonset with name in the production namespace.

Upcoming Features

  • Create cluster role.
  • delete cluster role.
  • create cluster role binding.
  • delete cluster role binding.
  • create namespace.
  • delete namespace.
  • create service account.
  • delete service account.
  • create role.
  • delete role.
  • create role binding.a
  • delete role binding.

LLM Integration

This MCP client is designed to work seamlessly with Large Language Models (LLMs). The functions are decorated with @mcp.tool(), making them accessible to LLMs through the Model Context Protocol framework.

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @abhijeetka/mcp-k8s-server --client claude
新手?先看 mcpskill.org 教程 →