FM

feiskyer/mcp-kubernetes-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

20 stars 9 forks 品質 70 トレンド 0Apache-2.0

AIアシスタントがKubernetesクラスターとやり取りすることを可能にするモデルコンテキストプロトコル(MCP)サーバー.

概要

Mcp-kubernetes-serverは、モデルコンテキストプロトコル(MCP)を実装するサーバーで、AIアシスタント(Claude、Cursor、GitHub Copilotなど)がKubernetesクラスターとやり取りできるようにします。 これらのアシスタントからKubernetes操作に自然な言語要求を翻訳し、結果を返すブリッジとして機能します。 - Kubernetesリソースのクエリ - kubectlコマンドを実行 - 自然言語の相互作用を介してKubernetesクラスターの管理 - Kubernetesリソースの状態を診断し、解釈する mcp-kubernetes-server は、AI アシスタント(モデルコンテキストプロトコルをサポートする)と Kubernetes クラスター間の仲介者として機能します。 これらのアシスタントから自然言語リクエストを受信し、kubectlコマンドやKubernetes API呼び出しを直接翻訳し、ターゲットクラスターに対して実行します。 サーバは結果を処理し、構造化されたレスポンスを返し、Kubernetes環境とAIアシスタントによるシームレスなやり取りを実現します.

概要(AI 翻訳)

[[mcp-kubernetes-server] は、Kubbernetes クラスターとやり取りするために、AI アシスタント(Claude、Cursor、GitHub Copilotなど)を有効にするためのモデルコンテキストプロトコル(MCP)を実装するサーバーです。 これらのアシスタントからKubernetes操作に自然な言語要求を翻訳し、結果を返すブリッジとして機能します。

これにより、AI アシスタントが次のようになります。

  • Kubernetesリソースのクエリ
  • kubectlコマンドを実行する
  • 自然言語の相互作用を介してKubernetesクラスターを管理する
  • Kubernetesリソースの状態を認識し、解釈する

使い方

[mcp-kubernetes-serverは、AIアシスタント(モデルコンテキストプロトコルをサポートする)とKubernetesクラスター間の仲介者として機能します。 これらのアシスタントから自然言語のリクエストを受信し、 [kubectl] コマンドに変換したり、Kubernetes API 呼び出しを指示したり、ターゲットクラスターに対して実行したりします。 サーバは結果を処理し、構造化されたレスポンスを返し、Kubernetes環境とAIアシスタントによるシームレスなやり取りを実現します。

インストール方法

前提条件

mcp-kubernetes-server をインストールする前に、次のことを確実にします。

※Kubernetesクラスターの作業.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

mcp-kubernetes-server

The mcp-kubernetes-server is a server implementing the Model Context Protocol (MCP) to enable AI assistants (such as Claude, Cursor, and GitHub Copilot) to interact with Kubernetes clusters. It acts as a bridge, translating natural language requests from these assistants into Kubernetes operations and returning the results.

It allows AI assistants to:

  • Query Kubernetes resources
  • Execute kubectl commands
  • Manage Kubernetes clusters through natural language interactions
  • Diagnose and interpret the states of Kubernetes resources

How It Works

The mcp-kubernetes-server acts as an intermediary between AI assistants (that support the Model Context Protocol) and your Kubernetes cluster. It receives natural language requests from these assistants, translates them into kubectl commands or direct Kubernetes API calls, and executes them against the target cluster. The server then processes the results and returns a structured response, enabling seamless interaction with your Kubernetes environment via the AI assistant.

How To Install

Prerequisites

Before installing mcp-kubernetes-server, ensure you have the following:

  • A working Kubernetes cluster.
  • A kubeconfig file correctly configured to access your Kubernetes cluster (the server requires this file for interaction).
  • The kubectl command-line tool installed and in your system’s PATH (used by the server to execute many Kubernetes commands).
  • The helm command-line tool installed and in your system’s PATH (used by the server for Helm chart operations).
  • Python >= 3.11, if you plan to install and run the server directly using uvx (without Docker).

Docker

Get your kubeconfig file for your Kubernetes cluster and setup in the mcpServers (replace src path with your kubeconfig path):

{
  "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"
      ]
    }
  }
}

UVX

To run the server using uvx (a tool included with uv, the Python packager), first ensure uv is installed:

Install uv if it’s not installed yet and add it to your PATH, e.g. using curl:

# For Linux and MacOS
GitHub で README 全文を見る

インストール

docker run -i --rm --mount type=bind src=/home/username/.kube/config dst=/home/mcp/.kube/config ghcr.io/feiskyer/mcp-kubernetes-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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" ] } } }