| 1 | # Kubernetes MCP Server |
| 2 | Β |
| 3 | [](https://github.com/containers/kubernetes-mcp-server/blob/main/LICENSE) |
| 4 | [](https://www.npmjs.com/package/kubernetes-mcp-server) |
| 5 | [](https://pypi.org/project/kubernetes-mcp-server/) |
| 6 | [](https://github.com/containers/kubernetes-mcp-server/releases/latest) |
| 7 | [](https://github.com/containers/kubernetes-mcp-server/actions/workflows/build.yaml) |
| 8 | Β |
| 9 | [β¨ Features](#features) | [π Getting Started](#getting-started) | [π₯ Demos](#demos) | [βοΈ Configuration](#configuration) | [π οΈ Tools](#tools-and-functionalities) | [π¬ Community](#community) | [π§βπ» Development](#development) |
| 10 | Β |
| 11 | https://github.com/user-attachments/assets/be2b67b3-fc1c-4d11-ae46-93deba8ed98e |
| 12 | Β |
| 13 | ## β¨ Features <a id="features"></a> |
| 14 | Β |
| 15 | A powerful and flexible Kubernetes [Model Context Protocol (MCP)](https://blog.marcnuri.com/model-context-protocol-mcp-introduction) server implementation with support for **Kubernetes** and **OpenShift**. |
| 16 | Β |
| 17 | - **β
Configuration**: |
| 18 | - Automatically detect changes in the Kubernetes configuration and update the MCP server. |
| 19 | - **View** and manage the current [Kubernetes `.kube/config`](https://blog.marcnuri.com/where-is-my-default-kubeconfig-file) or in-cluster configuration. |
| 20 | - **β
Generic Kubernetes Resources**: Perform operations on **any** Kubernetes or OpenShift resource. |
| 21 | - Any CRUD operation (Create or Update, Get, List, Delete). |
| 22 | - **β
Pods**: Perform Pod-specific operations. |
| 23 | - **List** pods in all namespaces or in a specific namespace. |
| 24 | - **Get** a pod by name from the specified namespace. |
| 25 | - **Delete** a pod by name from the specified namespace. |
| 26 | - **Show logs** for a pod by name from the specified namespace. |
| 27 | - **Top** gets resource usage metrics for all pods or a specific pod in the specified namespace. |
| 28 | - **Exec** into a pod and run a command. |
| 29 | - **Run** a container image in a pod and optionally expose it. |
| 30 | - **β
Namespaces**: List Kubernetes Namespaces. |
| 31 | - **β
Events**: View Kubernetes events in all namespaces or in a specific namespace. |
| 32 | - **β
Projects**: List OpenShift Projects. |
| 33 | - **βΈοΈ Helm**: |
| 34 | - **Install** a Helm chart in the current or provided namespace. |
| 35 | - **List** Helm releases in all namespaces or in a specific namespace. |
| 36 | - **Uninstall** a Helm release in the current or provided namespace. |
| 37 | - **π§ Tekton**: Tekton-specific operations that complement generic Kubernetes resource management. |
| 38 | - **Pipeline**: Start a Tekton Pipeline by creating a PipelineRun. |
| 39 | - **PipelineRun**: Restart, cancel, troubleshoot, and retrieve PipelineRun logs. |
| 40 | - **Task**: Start a Tekton Task by creating a TaskRun. |
| 41 | - **TaskRun**: Restart a TaskRun with the same spec, and retrieve TaskRun logs via pod resolution. |
| 42 | - **π Observability**: Optional OpenTelemetry distributed tracing and metrics with custom sampling rates. Includes `/stats` endpoint for real-time statistics. See [OTEL.md](docs/OTEL.md). |
| 43 | Β |
| 44 | Unlike other Kubernetes MCP server implementations, this **IS NOT** just a wrapper around `kubectl` or `helm` command-line tools. |
| 45 | It is a **Go-based native implementation** that interacts directly with the Kubernetes API server. |
| 46 | Β |
| 47 | There is **NO NEED** for external dependencies or tools to be installed on the system. |
| 48 | If you're using the native binaries you don't need to have Node or Python installed on your system. |
| 49 | Β |
| 50 | - **β
Lightweight**: The server is distributed as a single native binary for Linux, macOS, and Windows. |
| 51 | - **β
High-Performance / Low-Latency**: Directly interacts with the Kubernetes API server without the overhead of calling and waiting for external commands. |
| 52 | - **β
Multi-Cluster**: Can i |