Kubernetes and OpenShift MCP Server

A powerful and flexible Kubernetes MCP server implementation with support for Kubernetes and OpenShift, providing native Go operations without external dependencies.

Get this MCP server

A powerful and flexible Kubernetes MCP server implementation with support for Kubernetes and OpenShift, providing native Go operations without external dependencies.

Installation

NPX

npx -y kubernetes-mcp-server@latest

UVX

uvx kubernetes-mcp-server@latest

VS Code CLI

code --add-mcp '{"name":"kubernetes","command":"npx","args":["kubernetes-mcp-server@latest"]}'

VS Code Insiders CLI

code-insiders --add-mcp '{"name":"kubernetes","command":"npx","args":["kubernetes-mcp-server@latest"]}'

Binary Download

./kubernetes-mcp-server --help

Configuration

Claude Desktop

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": [
        "-y",
        "kubernetes-mcp-server@latest"
      ]
    }
  }
}

Cursor

{
  "mcpServers": {
    "kubernetes-mcp-server": {
      "command": "npx",
      "args": ["-y", "kubernetes-mcp-server@latest"]
    }
  }
}

Goose CLI

extensions:
  kubernetes:
    command: npx
    args:
      - -y
      - kubernetes-mcp-server@latest

Available Tools

Tool Description
configuration_contexts_list Get a list of all available context names and associated server URLs from the kubeconfig file
configuration_view Get the current Kubernetes configuration content as kubeconfig YAML
events_list Get a list of all Kubernetes events
pod_list Get a list of pods across all namespaces or in a specific namespace
pod_get Get a pod by name from the specified namespace
pod_delete Delete a pod by name from the specified namespace
pod_logs Show logs for a pod by name from the specified namespace
pod_top Get resource usage metrics for all pods or a specific pod in the specified namespace
pod_exec Execute a command inside a pod
pod_run Run a container image in a pod and optionally expose it
namespace_list Get a list of Kubernetes namespaces
project_list Get a list of OpenShift projects
helm_install Install a Helm chart in the current or specified namespace
helm_list Get a list of Helm releases across all namespaces or in a specific namespace
helm_uninstall Delete a Helm release in the current or specified namespace

Capabilities

  • Automatic detection of changes in Kubernetes configuration and MCP server updates
  • View and manage current Kubernetes configuration .kube/config or in-cluster configuration
  • Perform CRUD operations on any Kubernetes or OpenShift resources
  • Specialized pod operations including logs, exec, top, run, and management
  • List Kubernetes namespaces and OpenShift projects
  • View Kubernetes events across all namespaces or in a specific namespace
  • Manage Helm charts (install, list, delete)
  • Native Go implementation without external dependencies
  • Lightweight distribution as a single binary for Linux, macOS, and Windows
  • High-performance/low-latency direct API server interaction

Usage Examples

Diagnose and automatically fix OpenShift deployments
Get a list of all pods in the default namespace
Show logs for a specific pod
Deploy a Helm chart to the cluster
View Kubernetes events for troubleshooting

Notes

Unlike other Kubernetes MCP server implementations, this is NOT just a wrapper around kubectl or helm command-line tools. It requires access to a Kubernetes cluster and supports tool sets (config, core, helm, kiali) that can be enabled/disabled via the --toolsets flag. Configuration options include --port, --log-level, --kubeconfig, --list-output, --read-only, --disable-destructive, --toolsets, and --disable-multi-cluster.

Comments (0)

Sign In Sign in to leave a comment.