Home / MCP / Kubernetes MCP Server
Provides multi-cluster Kubernetes and OpenShift control via a native MCP server with extensive resource operations and Helm tooling.
Configuration
View docs{
"mcpServers": {
"kubernetes_mcp": {
"command": "npx",
"args": [
"-y",
"kubernetes-mcp-server@latest"
],
"env": {
"KD_KUBECONFIG": "$HOME/.kube/config",
"KD_LOG_LEVEL": "3"
}
}
}
}You manage Kubernetes and OpenShift resources through a native MCP (Model Context Protocol) server that talks directly to the Kubernetes API. This server provides CRUD operations for generic resources, Pods, Namespaces, Events, Helm, and OpenShift projects, plus specialized tooling to inspect and control clusters. It is designed for high performance, multi-cluster use, and straightforward configuration without requiring external CLI wrappers.
You run the Kubernetes MCP server as a local process and connect to it from an MCP client or integration. The server can operate in multi-cluster mode by using your kubeconfig, or in a single-cluster setup by configuring a specific context. You can access a wide range of Kubernetes and OpenShift capabilities, including listing resources, managing pods, viewing events, inspecting logs, running commands in pods, and handling Helm charts.
Prerequisites: you need a machine with a supported operating system (Linux, macOS, or Windows) and network access to your Kubernetes cluster. You also need either Node.js/npm or Python if you plan to use helper tools, but the MCP server itself is a native binary or a cross-platform runtime that can be run directly.
Step 1. Run the MCP server using the package runner you prefer. The fastest way to try Kubernetes MCP Server on a desktop environment is via an inline command using a package runner. For example, you can run the MCP server with npx to fetch and execute the latest version.
Step 2. If you want to explore help and available commands, start the server in help mode to learn about runtime options and toolsets.
The server supports a main TOML configuration file plus optional drop-in files. You can load the main config with --config and provide per-directory overrides with --config-dir. Changes can be reloaded at runtime via SIGHUP when you started with a config. If you modify kubeconfig or cluster-related settings, you will need to restart the server.
Example startup configuration (simplified): You can run the server using npx, which executes the latest package version. You may also run the server directly from a binary or with uvx if you have Python available.
For production deployments, configure a dedicated ServiceAccount with read-only access to the Kubernetes API for reporting and inspection tasks. Use separate kubeconfig contexts to isolate clusters and enforce least-privilege access.
The MCP server offers configurable toolsets to tailor available actions. The core sets include configuration viewing, common Kubernetes tools, and Helm chart management. Additional toolsets extend support for Kiali, KubeVirt, and more..enabled toolsets reduce context size and improve tool selection by the AI.
List all namespaces, inspect pods in a namespace, view events, fetch pod logs, execute commands inside a pod, run a Helm chart, and manage OpenShift projects. You can also query resources by apiVersion and kind and filter by namespace or labels.
If you need to update configuration without restarting, use SIGHUP after starting the server with a config. If you change kubeconfig or cluster access details, plan a restart. Monitor log levels to diagnose issues and adjust the --log-level as needed.
If you are contributing, you can build the server locally and test with a focused inspector tool to observe internal behavior. The project provides a dev flow that includes a build step and a local runtime.
A Helm Chart is available to simplify the deployment of the Kubernetes MCP server. Additional details can be found in the chart README.
Running with mcp-inspector helps you inspect the MCP server while you develop. Compile the project and start the server with the inspector to verify behavior.
View and manage the current local Kubernetes configuration (kubeconfig)
Most common tools for Kubernetes management (Pods, Generic Resources, Events, etc.)
Tools for managing Helm charts and releases
Manage Istio mesh configuration and metrics integration
KubeVirt virtual machine management tools