by manusa
A powerful and flexible Kubernetes Model Context Protocol (MCP) server implementation with support for Kubernetes and OpenShift.
Kubernetes MCP Server is a native Go-based implementation of the Model Context Protocol (MCP) for Kubernetes and OpenShift. Unlike other implementations, it directly interacts with the Kubernetes API server, eliminating the need for external dependencies like kubectl or helm command-line tools.
Kubernetes MCP Server can be used in various environments:
claude_desktop_config.json using npx.goose config.yaml using npm.The server can also be configured using command-line arguments, allowing for customization of HTTP/SSE ports, logging levels, kubeconfig paths, and read-only/destructive operation modes.
.kube/config or in-cluster configurations.top for resource usage, exec into a container, and running container images.Q: Does Kubernetes MCP Server require kubectl or helm to be installed?
A: No, Kubernetes MCP Server is a native Go-based implementation that directly interacts with the Kubernetes API server, so it does not require kubectl or helm or any other external dependencies.
Q: Is Kubernetes MCP Server cross-platform?
A: Yes, it is available as a single native binary for Linux, macOS, and Windows, as well as an npm package, a Python package, and a container/Docker image.
Q: Can I run Kubernetes MCP Server in a read-only mode?
A: Yes, you can use the --read-only command-line argument to run the server in read-only mode, which prevents any write operations on the Kubernetes cluster. You can also use --disable-destructive to disable only destructive operations.
✨ Features | 🚀 Getting Started | 🎥 Demos | ⚙️ Configuration | 🛠️ Tools | 🧑💻 Development
https://github.com/user-attachments/assets/be2b67b3-fc1c-4d11-ae46-93deba8ed98e
A powerful and flexible Kubernetes Model Context Protocol (MCP) server implementation with support for Kubernetes and OpenShift.
.kube/config or in-cluster configuration.Unlike other Kubernetes MCP server implementations, this IS NOT just a wrapper around kubectl or helm command-line tools.
It is a Go-based native implementation that interacts directly with the Kubernetes API server.
There is NO NEED for external dependencies or tools to be installed on the system. If you're using the native binaries you don't need to have Node or Python installed on your system.
If you have npm installed, this is the fastest way to get started with kubernetes-mcp-server on Claude Desktop.
Open your claude_desktop_config.json and add the mcp server to the list of mcpServers:
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"-y",
"kubernetes-mcp-server@latest"
]
}
}
}
Install the Kubernetes MCP server extension in VS Code Insiders by pressing the following link:
Alternatively, you can install the extension manually by running the following command:
# For VS Code
code --add-mcp '{"name":"kubernetes","command":"npx","args":["kubernetes-mcp-server@latest"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"kubernetes","command":"npx","args":["kubernetes-mcp-server@latest"]}'
Goose CLI is the easiest (and cheapest) way to get rolling with artificial intelligence (AI) agents.
If you have npm installed, this is the fastest way to get started with kubernetes-mcp-server.
Open your goose config.yaml and add the mcp server to the list of mcpServers:
extensions:
kubernetes:
command: npx
args:
- -y
- kubernetes-mcp-server@latest
Demo showcasing how Kubernetes MCP server is leveraged by Claude Desktop to automatically diagnose and fix a deployment in OpenShift without any user assistance.
https://github.com/user-attachments/assets/a576176d-a142-4c19-b9aa-a83dc4b8d941
In this demo, I walk you through the process of Vibe Coding a simple game using VS Code and how to leverage Podman MCP server and Kubernetes MCP server to deploy it to OpenShift.
In this demo, I'll show you how to set up Kubernetes MCP server in VS code just by clicking a link.
The Kubernetes MCP server can be configured using command line (CLI) arguments.
You can run the CLI executable either by using npx, uvx, or by downloading the latest release binary.
# Run the Kubernetes MCP server using npx (in case you have npm and node installed)
npx kubernetes-mcp-server@latest --help
# Run the Kubernetes MCP server using uvx (in case you have uv and python installed)
uvx kubernetes-mcp-server@latest --help
# Run the Kubernetes MCP server using the latest release binary
./kubernetes-mcp-server --help
| Option | Description |
|---|---|
--http-port |
Starts the MCP server in Streamable HTTP mode and listens on the specified port (path /mcp). Deprecated: Please use --port. |
--sse-port |
Starts the MCP server in Server-Sent Event (SSE) mode and listens on the specified port (path /sse). Deprecated: Please use --port. |
--log-level |
Sets the logging level (values from 0-9). Similar to kubectl logging levels. |
--kubeconfig |
Path to the Kubernetes configuration file. If not provided, it will try to resolve the configuration (in-cluster, default location, etc.). |
--list-output |
Output format for resource list operations (one of: yaml, table) (default "table") |
--read-only |
If set, the MCP server will run in read-only mode, meaning it will not allow any write operations (create, update, delete) on the Kubernetes cluster. This is useful for debugging or inspecting the cluster without making changes. |
--disable-destructive |
If set, the MCP server will disable all destructive operations (delete, update, etc.) on the Kubernetes cluster. This is useful for debugging or inspecting the cluster without accidentally making changes. This option has no effect when --read-only is used. |
configuration_viewGet the current Kubernetes configuration content as a kubeconfig YAML
Parameters:
minified (boolean, optional, default: true)
true, keeps only the current-context and relevant configuration piecesfalse, returns all contexts, clusters, auth-infos, and usersevents_listList all the Kubernetes events in the current cluster from all namespaces
Parameters:
namespace (string, optional)
helm_installInstall a Helm chart in the current or provided namespace with the provided name and chart
Parameters:
chart (string, required)
./my-chart.tgz or https://example.com/my-chart.tgzvalues (object, optional)
{"key": "value"}name (string, optional)
namespace (string, optional)
helm_listList all the Helm releases in the current or provided namespace (or in all namespaces if specified)
Parameters:
namespace (string, optional)
all_namespaces (boolean, optional)
true, will list Helm releases from all namespacesfalse, will list Helm releases from the specified namespacehelm_uninstallUninstall a Helm release in the current or provided namespace with the provided name
Parameters:
name (string, required)
namespace (string, optional)
namespaces_listList all the Kubernetes namespaces in the current cluster
Parameters: None
pods_deleteDelete a Kubernetes Pod in the current or provided namespace with the provided name
Parameters:
name (string, required)
namespace (string, required)
pods_execExecute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command
Parameters:
command (string[], required)
["ls", "-l", "/tmp"]name (string, required)
namespace (string, required)
container (string, optional)
pods_getGet a Kubernetes Pod in the current or provided namespace with the provided name
Parameters:
name (string, required)
namespace (string, required)
pods_listList all the Kubernetes pods in the current cluster from all namespaces
Parameters:
labelSelector (string, optional)
pods_list_in_namespaceList all the Kubernetes pods in the specified namespace in the current cluster
Parameters:
namespace (string, required)
labelSelector (string, optional)
pods_logGet the logs of a Kubernetes Pod in the current or provided namespace with the provided name
Parameters:
name (string, required)
namespace (string, required)
container (string, optional)
pods_runRun a Kubernetes Pod in the current or provided namespace with the provided container image and optional name
Parameters:
image (string, required)
namespace (string, required)
name (string, optional)
port (number, optional)
pods_topLists the resource consumption (CPU and memory) as recorded by the Kubernetes Metrics Server for the specified Kubernetes Pods in the all namespaces, the provided namespace, or the current namespace
Parameters:
all_namespaces (boolean, optional, default: true)
true, lists resource consumption for Pods in all namespacesfalse, lists resource consumption for Pods in the configured or provided namespacenamespace (string, optional)
name (string, optional)
label_selector (string, optional)
projects_listList all the OpenShift projects in the current cluster
resources_create_or_updateCreate or update a Kubernetes resource in the current cluster by providing a YAML or JSON representation of the resource
Parameters:
resource (string, required)
Common apiVersion and kind include:
resources_deleteDelete a Kubernetes resource in the current cluster
Parameters:
apiVersion (string, required)
v1, apps/v1, networking.k8s.io/v1)kind (string, required)
Pod, Service, Deployment, Ingress)name (string, required)
namespace (string, optional)
resources_getGet a Kubernetes resource in the current cluster
Parameters:
apiVersion (string, required)
v1, apps/v1, networking.k8s.io/v1)kind (string, required)
Pod, Service, Deployment, Ingress)name (string, required)
namespace (string, optional)
resources_listList Kubernetes resources and objects in the current cluster
Parameters:
apiVersion (string, required)
v1, apps/v1, networking.k8s.io/v1)kind (string, required)
Pod, Service, Deployment, Ingress)namespace (string, optional)
labelSelector (string, optional)
Compile the project and run the Kubernetes MCP server with mcp-inspector to inspect the MCP server.
# Compile the project
make build
# Run the Kubernetes MCP server with mcp-inspector
npx @modelcontextprotocol/inspector@latest $(pwd)/kubernetes-mcp-server
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by zed-industries
Provides real-time collaborative editing powered by Rust, enabling developers to edit code instantly across machines with a responsive, GPU-accelerated UI.
by cline
Provides autonomous coding assistance directly in the IDE, enabling file creation, editing, terminal command execution, browser interactions, and tool extension with user approval at each step.
by continuedev
Provides continuous AI assistance across IDEs, terminals, and CI pipelines, offering agents, chat, inline editing, and autocomplete to accelerate software development.
by github
Enables AI agents, assistants, and chatbots to interact with GitHub via natural‑language commands, providing read‑write access to repositories, issues, pull requests, workflows, security data and team activity.
by block
Automates engineering tasks by installing, executing, editing, and testing code using any large language model, providing end‑to‑end project building, debugging, workflow orchestration, and external API interaction.
by RooCodeInc
An autonomous coding agent that lives inside VS Code, capable of generating, refactoring, debugging code, managing files, running terminal commands, controlling a browser, and adapting its behavior through custom modes and instructions.
by lastmile-ai
A lightweight, composable framework for building AI agents using Model Context Protocol and simple workflow patterns.
by firebase
Provides a command‑line interface to manage, test, and deploy Firebase projects, covering hosting, databases, authentication, cloud functions, extensions, and CI/CD workflows.
by gptme
Empowers large language models to act as personal AI assistants directly inside the terminal, providing capabilities such as code execution, file manipulation, web browsing, vision, and interactive tool usage.