kubernetes.com
kubernetes.com logo

Kubernetes

Manage Kubernetes, with additional support for OpenShift.

Created byApr 22, 2025

Kubernetes MCP Server

Features | Getting Started | Demos | Configuration | Tools | Development

Features <a id="features"></a>

A powerful and flexible Kubernetes Model Context Protocol (MCP) server implementation with support for Kubernetes and OpenShift.
  • ** Configuration**:
  • ** Generic Kubernetes Resources**: Perform operations on any Kubernetes or OpenShift resource.
  • ** Pods**: Perform Pod-specific operations.
  • ** Namespaces**: List Kubernetes Namespaces.
  • ** Events**: View Kubernetes events in all namespaces or in a specific namespace.
  • ** Projects**: List OpenShift Projects.
Unlike other Kubernetes MCP server implementations, this IS NOT just a wrapper around kubectl or helm command-line tools.
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 even need to have Node or Python installed on your system.

Getting Started <a id="getting-started"></a>

Requirements

  • Access to a Kubernetes cluster.

Claude Desktop

Using npx

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:

VS Code / VS Code Insiders

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:

Goose CLI

Goose CLI is the easiest (and cheapest) way to get rolling with artificial intelligence (AI) agents.

Using npm

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:

Demos <a id="demos"></a>

Diagnosing and automatically fixing an OpenShift Deployment

Demo showcasing how Kubernetes MCP server is leveraged by Claude Desktop to automatically diagnose and fix a deployment in OpenShift without any user assistance.

_Vibe Coding_ a simple game and deploying it to OpenShift

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.

Configuration <a id="configuration"></a>

The Kubernetes MCP server can be configured using command line (CLI) arguments.
You can run the CLI executable either by using npx or by downloading the latest release binary.

Configuration Options

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Tools <a id="tools"></a>

`configuration_view`

Get the current Kubernetes configuration content as a kubeconfig YAML
Parameters:
  • minified (boolean, optional, default: true)

`events_list`

List all the Kubernetes events in the current cluster from all namespaces
Parameters:
  • namespace (string, optional)

`namespaces_list`

List all the Kubernetes namespaces in the current cluster
Parameters: None

`pods_delete`

Delete a Kubernetes Pod in the current or provided namespace with the provided name
Parameters:
  • name (string, required)
  • namespace (string, required)

`pods_exec`

Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command
Parameters:
  • command (string[], required)
  • name (string, required)
  • namespace (string, required)

`pods_get`

Get a Kubernetes Pod in the current or provided namespace with the provided name
Parameters:
  • name (string, required)
  • namespace (string, required)

`pods_list`

List all the Kubernetes pods in the current cluster from all namespaces
Parameters: None

`pods_list_in_namespace`

List all the Kubernetes pods in the specified namespace in the current cluster
Parameters:
  • namespace (string, required)

`pods_log`

Get 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_run`

Run 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)

`projects_list`

List all the OpenShift projects in the current cluster

`resources_create_or_update`

Create 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:
  • v1 Pod
  • v1 Service
  • v1 Node
  • apps/v1 Deployment
  • networking.k8s.io/v1 Ingress

`resources_delete`

Delete a Kubernetes resource in the current cluster
Parameters:
  • apiVersion (string, required)
  • kind (string, required)
  • name (string, required)
  • namespace (string, optional)

`resources_get`

Get a Kubernetes resource in the current cluster
Parameters:
  • apiVersion (string, required)
  • kind (string, required)
  • name (string, required)
  • namespace (string, optional)

`resources_list`

List Kubernetes resources and objects in the current cluster
Parameters:
  • apiVersion (string, required)
  • kind (string, required)
  • namespace (string, optional)

Development <a id="development"></a>

Running with mcp-inspector

Compile the project and run the Kubernetes MCP server with mcp-inspector to inspect the MCP server.

Kubernetes MCP Server

Features | Getting Started | Demos | Configuration | Tools | Development

Features <a id="features"></a>

A powerful and flexible Kubernetes Model Context Protocol (MCP) server implementation with support for Kubernetes and OpenShift.
  • ** Configuration**:
  • ** Generic Kubernetes Resources**: Perform operations on any Kubernetes or OpenShift resource.
  • ** Pods**: Perform Pod-specific operations.
  • ** Namespaces**: List Kubernetes Namespaces.
  • ** Events**: View Kubernetes events in all namespaces or in a specific namespace.
  • ** Projects**: List OpenShift Projects.
Unlike other Kubernetes MCP server implementations, this IS NOT just a wrapper around kubectl or helm command-line tools.
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 even need to have Node or Python installed on your system.

Getting Started <a id="getting-started"></a>

Requirements

  • Access to a Kubernetes cluster.

Claude Desktop

Using npx

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:

VS Code / VS Code Insiders

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:

Goose CLI

Goose CLI is the easiest (and cheapest) way to get rolling with artificial intelligence (AI) agents.

Using npm

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:

Demos <a id="demos"></a>

Diagnosing and automatically fixing an OpenShift Deployment

Demo showcasing how Kubernetes MCP server is leveraged by Claude Desktop to automatically diagnose and fix a deployment in OpenShift without any user assistance.

_Vibe Coding_ a simple game and deploying it to OpenShift

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.

Configuration <a id="configuration"></a>

The Kubernetes MCP server can be configured using command line (CLI) arguments.
You can run the CLI executable either by using npx or by downloading the latest release binary.

Configuration Options

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Tools <a id="tools"></a>

`configuration_view`

Get the current Kubernetes configuration content as a kubeconfig YAML
Parameters:
  • minified (boolean, optional, default: true)

`events_list`

List all the Kubernetes events in the current cluster from all namespaces
Parameters:
  • namespace (string, optional)

`namespaces_list`

List all the Kubernetes namespaces in the current cluster
Parameters: None

`pods_delete`

Delete a Kubernetes Pod in the current or provided namespace with the provided name
Parameters:
  • name (string, required)
  • namespace (string, required)

`pods_exec`

Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command
Parameters:
  • command (string[], required)
  • name (string, required)
  • namespace (string, required)

`pods_get`

Get a Kubernetes Pod in the current or provided namespace with the provided name
Parameters:
  • name (string, required)
  • namespace (string, required)

`pods_list`

List all the Kubernetes pods in the current cluster from all namespaces
Parameters: None

`pods_list_in_namespace`

List all the Kubernetes pods in the specified namespace in the current cluster
Parameters:
  • namespace (string, required)

`pods_log`

Get 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_run`

Run 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)

`projects_list`

List all the OpenShift projects in the current cluster

`resources_create_or_update`

Create 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:
  • v1 Pod
  • v1 Service
  • v1 Node
  • apps/v1 Deployment
  • networking.k8s.io/v1 Ingress

`resources_delete`

Delete a Kubernetes resource in the current cluster
Parameters:
  • apiVersion (string, required)
  • kind (string, required)
  • name (string, required)
  • namespace (string, optional)

`resources_get`

Get a Kubernetes resource in the current cluster
Parameters:
  • apiVersion (string, required)
  • kind (string, required)
  • name (string, required)
  • namespace (string, optional)

`resources_list`

List Kubernetes resources and objects in the current cluster
Parameters:
  • apiVersion (string, required)
  • kind (string, required)
  • namespace (string, optional)

Development <a id="development"></a>

Running with mcp-inspector

Compile the project and run the Kubernetes MCP server with mcp-inspector to inspect the MCP server.