flux159/mcp-server-kubernetes

flux159/mcp-server-kubernetes

от flux159
MCP сервер для подключения к Kubernetes и управления кластером через kubectl и Helm. Выполняет операции с ресурсами, масштабирование, деплой, диагностику и port-forwarding. Полезен разработчикам и ...

MCP Server Kubernetes

CI Language Bun Kubernetes Docker Stars Issues PRs Welcome Last Commit Trust Score Ask DeepWiki

MCP Server that can connect to a Kubernetes cluster and manage it. Supports loading kubeconfig from multiple sources in priority order.

https://github.com/user-attachments/assets/f25f8f4e-4d04-479b-9ae0-5dac452dd2ed

Installation & Usage

Prerequisites

Before using this MCP server with any tool, make sure you have:

  1. kubectl installed and in your PATH
  2. A valid kubeconfig file with contexts configured
  3. Access to a Kubernetes cluster configured for kubectl (e.g. minikube, Rancher Desktop, GKE, etc.)
  4. Helm v3 installed and in your PATH (no Tiller required). Optional if you don't plan to use Helm.

You can verify your connection by running kubectl get pods in a terminal to ensure you can connect to your cluster without credential issues.

By default, the server loads kubeconfig from ~/.kube/config. For additional authentication options (environment variables, custom paths, etc.), see ADVANCED_README.md.

Claude Code

Add the MCP server to Claude Code using the built-in command:

claude mcp add kubernetes -- npx mcp-server-kubernetes
Инструменты были проиндексированы:
cleanup

Очистить все управляемые ресурсы

Параметры

Без параметров.

exec_in_pod

Выполняет команду в поде или контейнере Kubernetes и возвращает вывод. Команда должна быть массивом строк, где первый элемент - исполняемый файл, а остальные элементы - аргументы. Команда выполняется напрямую, без интерпретации оболочкой, для безопасности.

Параметры
  • commandstring[]обязательный

    Command to execute as an array of strings (e.g. ["ls", "-la", "/app"]). First element is the executable, remaining are arguments. Shell operators like pipes, redirects, or command chaining are not supported - use explicit array format for security.

  • containerstring

    Container name (required when pod has multiple containers)

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • namestringобязательный

    Name of the pod to execute the command in

  • namespacestring

    Kubernetes namespace

  • timeoutnumber

    Timeout for command - 60000 milliseconds if not specified

explain_resourceтолько чтение

Получить документацию по ресурсу или полю Kubernetes

Параметры
  • apiVersionstring

    API version to use (e.g. 'apps/v1')

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • outputenum

    Output format (plaintext or plaintext-openapiv2)

  • recursiveboolean

    Print the fields of fields recursively

  • resourcestringобязательный

    Resource name or field path (e.g. 'pods' or 'pods.spec.containers')

install_helm_chart

Устанавливает Helm chart с поддержкой как стандартной, так и шаблонной установки.

Параметры
  • chartstringобязательный

    Chart name (e.g., 'nginx') or path to chart directory

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • createNamespaceboolean

    Create namespace if it doesn't exist

  • namestringобязательный

    Name of the Helm release

  • namespacestringобязательный

    Kubernetes namespace

  • repostring

    Helm repository URL (optional if using local chart path)

  • useTemplateboolean

    Use helm template + kubectl apply instead of helm install (bypasses auth issues)

  • valuesobject

    Custom values to override chart defaults

  • valuesFilestring

    Path to values file (alternative to values object). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'values' to pass the values inline instead.

kubectl_apply

Применить манифест Kubernetes YAML из строки или файла

Параметры
  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • dryRunboolean

    If true, only validate the resource, don't actually execute the operation

  • filenamestring

    Path to a YAML file to apply (optional - use either manifest or filename). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'manifest' to pass the file's contents instead.

  • forceboolean

    If true, immediately remove resources from API and bypass graceful deletion

  • manifeststring

    YAML manifest to apply

  • namespacestring

    Kubernetes namespace

kubectl_contextтолько чтение

Управление контекстами Kubernetes - вывести список, получить или установить текущий контекст

Параметры
  • detailedboolean

    Include detailed information about the context

  • namestring

    Name of the context to set as current (required for set operation)

  • operationenumобязательный

    Operation to perform: list contexts, get current context, or set current context

  • outputenum

    Output format

  • showCurrentboolean

    When listing contexts, highlight which one is currently active

kubectl_create

Создаёт ресурсы Kubernetes различными способами (из файла или с помощью подкоманд).

Параметры
  • annotationsstring[]

    Annotations to apply to the resource (e.g. ["key1=value1", "key2=value2"])

  • commandstring[]

    Command to run in the container

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • dryRunboolean

    If true, only validate the resource, don't actually execute the operation

  • filenamestring

    Path to a YAML file to create resources from. The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'manifest' to pass the file's contents instead.

  • fromFilestring[]

    Path to file for creating configmap/secret (e.g. ["key1=/path/to/file1", "key2=/path/to/file2"]). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use "fromFileContent" to pass file contents directly instead.

  • fromFileContentobject[]

    Inline file contents for creating a configmap/secret, provided by the client instead of a server-side path (e.g. [{"key": "app.conf", "content": "..."}]). Safe on all transports; use this instead of "fromFile" on remote (SSE/Streamable HTTP) servers.

  • fromLiteralstring[]

    Key-value pair for creating configmap (e.g. ["key1=value1", "key2=value2"])

  • imagestring

    Image to use for the containers in the deployment

  • labelsstring[]

    Labels to apply to the resource (e.g. ["key1=value1", "key2=value2"])

  • manifeststring

    YAML manifest to create resources from

  • namestring

    Name of the resource to create

  • namespacestring

    Kubernetes namespace

  • outputenum

    Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file

  • portnumber

    Port that the container exposes

  • replicasnumber

    Number of replicas to create for the deployment

  • resourceTypestring

    Type of resource to create (namespace, configmap, deployment, service, etc.)

  • schedulestring

    Cron schedule expression for the CronJob (e.g. "*/5 * * * *")

  • secretTypeenum

    Type of secret to create (generic, docker-registry, tls)

  • serviceTypeenum

    Type of service to create (clusterip, nodeport, loadbalancer, externalname)

  • suspendboolean

    Whether to suspend the CronJob

  • tcpPortstring[]

    Port pairs for tcp service (e.g. ["80:8080", "443:8443"])

  • validateboolean

    If true, validate resource schema against server schema

kubectl_delete

Удаляет ресурсы Kubernetes по типу ресурса, имени, меткам или из файла манифеста.

Параметры
  • allNamespacesboolean

    If true, delete resources across all namespaces

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • filenamestring

    Path to a YAML file to delete resources from (optional). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'manifest' to pass the file's contents instead.

  • forceboolean

    If true, immediately remove resources from API and bypass graceful deletion

  • gracePeriodSecondsnumber

    Period of time in seconds given to the resource to terminate gracefully

  • labelSelectorstring

    Delete resources matching this label selector (e.g. 'app=nginx')

  • manifeststring

    YAML manifest defining resources to delete (optional)

  • namestring

    Name of the resource to delete

  • namespacestring

    Kubernetes namespace

  • resourceTypestring

    Type of resource to delete (e.g., pods, deployments, services, etc.)

kubectl_describeтолько чтение

Описывает ресурсы Kubernetes по типу ресурса, имени и, опционально, пространству имён

Параметры
  • allNamespacesboolean

    If true, describe resources across all namespaces

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • namestringобязательный

    Name of the resource to describe

  • namespacestring

    Kubernetes namespace

  • resourceTypestringобязательный

    Type of resource to describe (e.g., pods, deployments, services, etc.)

kubectl_generic

Выполняет любую команду kubectl с переданными аргументами и флагами

Параметры
  • allNamespacesboolean

    If true, run the command across all namespaces

  • argsstring[]

    Additional command arguments

  • commandstringобязательный

    The kubectl command to execute (e.g. patch, rollout, top)

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • flagsobject

    Command flags as key-value pairs

  • namestring

    Resource name

  • namespacestring

    Kubernetes namespace

  • outputFormatenum

    Output format (e.g. json, yaml, wide)

  • resourceTypestring

    Resource type (e.g. pod, deployment)

  • subCommandstring

    Subcommand if applicable (e.g. 'history' for rollout)

kubectl_getтолько чтение

Получает или выводит список ресурсов Kubernetes по типу ресурса, имени и, опционально, namespace.

Параметры
  • allNamespacesboolean

    If true, list resources across all namespaces

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • fieldSelectorstring

    Filter resources by field selector (e.g. 'metadata.name=my-pod')

  • labelSelectorstring

    Filter resources by label selector (e.g. 'app=nginx')

  • namestring

    Name of the resource (optional - if not provided, lists all resources of the specified type)

  • namespacestring

    Kubernetes namespace

  • outputenum

    Output format

  • resourceTypestringобязательный

    Type of resource to get (e.g., pods, deployments, services, configmaps, events, etc.)

  • sortBystring

    Sort events by a field (default: lastTimestamp). Only applicable for events.

kubectl_logsтолько чтение

Получает логи из ресурсов Kubernetes, таких как pods, deployments, или jobs.

Параметры
  • containerstring

    Container name (required when pod has multiple containers)

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • followboolean

    Follow logs output (not recommended, may cause timeouts)

  • labelSelectorstring

    Filter resources by label selector

  • namestringобязательный

    Name of the resource

  • namespacestringобязательный

    Kubernetes namespace

  • previousboolean

    Include logs from previously terminated containers

  • resourceTypeenumобязательный

    Type of resource to get logs from

  • sincestring

    Show logs since relative time (e.g. '5s', '2m', '3h')

  • sinceTimestring

    Show logs since absolute time (RFC3339)

  • tailnumber

    Number of lines to show from end of logs

  • timestampsboolean

    Include timestamps in logs

kubectl_patch

Обновляет поля ресурса с помощью strategic merge patch, JSON merge patch или JSON patch.

Параметры
  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • dryRunboolean

    If true, only validate the resource, don't actually execute the operation

  • namestringобязательный

    Name of the resource to patch

  • namespacestring

    Kubernetes namespace

  • patchDataobject

    Patch data as a JSON object

  • patchFilestring

    Path to a file containing the patch data (alternative to patchData). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'patchData' to pass the patch contents instead.

  • patchTypeenum

    Type of patch to apply

  • resourceTypestringобязательный

    Type of resource to patch (e.g., pods, deployments, services)

kubectl_reconnect

Переподключается к API-серверу Kubernetes, пересоздавая все API-клиенты. Используйте это после обновлений кластера (например, обновлений control plane в EKS, которые меняют ENI/IP), чтобы принудительно выполнить свежее разрешение DNS и установить новые TCP-соединения.

Параметры

Без параметров.

kubectl_rollout

Управляет развертыванием ресурса (например, deployment, daemonset, statefulset)

Параметры
  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • namestringобязательный

    Name of the resource

  • namespacestringобязательный

    Kubernetes namespace

  • resourceTypeenumобязательный

    Type of resource to manage rollout for

  • revisionnumber

    Revision to rollback to (for undo subcommand)

  • subCommandenumобязательный

    Rollout subcommand to execute

  • timeoutstring

    The length of time to wait before giving up (e.g., '30s', '1m', '2m30s')

  • toRevisionnumber

    Revision to roll back to (for history subcommand)

  • watchboolean

    Watch the rollout status in real-time until completion

kubectl_scale

Масштабировать Kubernetes Deployment

Параметры
  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • namestringобязательный

    Name of the deployment to scale

  • namespacestring

    Kubernetes namespace

  • replicasnumberобязательный

    Number of replicas to scale to

  • resourceTypestring

    Resource type to scale (deployment, replicaset, statefulset)

list_api_resourcesтолько чтение

Выведи список API-ресурсов, доступных в кластере

Параметры
  • apiGroupstring

    API group to filter by

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • namespacedboolean

    If true, only show namespaced resources

  • outputenum

    Output format (wide, name, or no-headers)

  • verbsstring[]

    List of verbs to filter by

node_management

Управляет узлами Kubernetes операциями cordon, drain и uncordon.

Параметры
  • confirmDrainboolean

    Explicit confirmation to drain the node (required for drain operation)

  • deleteLocalDataboolean

    Delete local data even if emptyDir volumes are used (for drain operation)

  • dryRunboolean

    Show what would be done without actually doing it (for drain operation)

  • forceboolean

    Force the operation even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet (for drain operation)

  • gracePeriodnumber

    Period of time in seconds given to each pod to terminate gracefully (for drain operation). If set to -1, uses the kubectl default grace period.

  • ignoreDaemonsetsboolean

    Ignore DaemonSet-managed pods (for drain operation)

  • nodeNamestring

    Name of the node to operate on (required for cordon, drain, uncordon)

  • operationenumобязательный

    Node operation to perform

  • timeoutstring

    The length of time to wait before giving up (for drain operation, e.g., '5m', '1h')

pingтолько чтение

Проверьте, что удаленная сторона по-прежнему отвечает и соединение активно.

Параметры

Без параметров.

port_forward

Перенаправляет локальный порт на порт ресурса Kubernetes.

Параметры
  • localPortnumberобязательный
  • namespacestring
  • resourceNamestringобязательный
  • resourceTypestringобязательный
  • targetPortnumberобязательный
stop_port_forward

Останавливает процесс переадресации портов.

Параметры
  • idstringобязательный
uninstall_helm_chart

Удалить релиз Helm-чарта

Параметры
  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • namestringобязательный

    Name of the Helm release to uninstall

  • namespacestringобязательный

    Kubernetes namespace

upgrade_helm_chart

Обновить существующий релиз Helm chart

Параметры
  • chartstringобязательный

    Chart name or path to chart directory

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • namestringобязательный

    Name of the Helm release to upgrade

  • namespacestringобязательный

    Kubernetes namespace

  • repostring

    Helm repository URL (optional if using local chart path)

  • valuesobject

    Custom values to override chart defaults

  • valuesFilestring

    Path to values file (alternative to values object). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'values' to pass the values inline instead.

Похожие MCP-сервера

alexei-led/k8s-mcp-server

alexei-led/k8s-mcp-server

K8s MCP Server - Docker-сервер с MCP для Claude. Запускает kubectl, helm, istioctl, argocd в изолированном контейнере. Помогает управлять Kubernetes-кластерами, разворачивать приложения и диагности...

Python213
manusa/Kubernetes MCP Server

manusa/Kubernetes MCP Server

MCP сервер для Kubernetes и OpenShift на Go: AI-агенты управляют кластерами — CRUD, Pods, Helm, Tekton. Не требует kubectl, работает с несколькими кластерами, лёгкий и быстрый.

Go2075
silenceper/mcp-k8s

silenceper/mcp-k8s

MCP сервер для Kubernetes: управляйте кластерами через LLM-запросы - выполняйте CRUD-операции с ресурсами, управляйте Helm-релизами и репозиториями. Полезен DevOps и разработчикам для автоматизации...

Go151
mrostamii/rancher-mcp-server

mrostamii/rancher-mcp-server

MCP-сервер для управления Rancher, Harvester HCI и Fleet GitOps через единый API. Работает с мультикластерным Kubernetes, виртуальными машинами, Helm-релизами и GitOps-репозиториями. По умолчанию т...

Go12
ckreiling/mcp-server-docker

ckreiling/mcp-server-docker

MCP-сервер для управления Docker через естественный язык: запускает и отлаживает контейнеры, управляет томами и сетями. Идеален для администраторов удалённых серверов и разработчиков, автоматизирую...

Python743
DigitalOcean MCP

DigitalOcean MCP

MCP сервер для управления облачными ресурсами DigitalOcean через API: дроплеты, базы данных и Kubernetes. Инструмент для автоматизации инфраструктуры разработчиками и DevOps.

Go133
© Каталог MCP, 2026. Все права защищены.
Проект не аффилирован с Anthropic и любыми упомянутыми продуктами.
Все названия и торговые марки принадлежат их владельцам.
Контакты для связи: hi@mcp-katalog.ru

Лука Никитин