SuperAPIAI Directory

kubernetes-mcp-server

github.com · AI developer platforms

Kubernetes and OpenShift management: CRUD operations on any resource plus specialized cluster tools.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

Kubernetes MCP Server is a Model Context Protocol (MCP) server implementation for Kubernetes and OpenShift, used to enable AI tools to operate cluster resources through a standardized protocol.

Purpose: This server provides AI assistants (such as Claude Desktop, VS Code, Cursor, Goose, and other clients) with the ability to access Kubernetes and OpenShift clusters. Unlike common implementations that only wrap the kubectl or helm command line, it is implemented natively in Go and interacts directly with the Kubernetes API server, requiring no external dependencies or tools, and does not require Node or Python to be installed on the system.

Main capabilities:

  1. Configuration management: Automatically detects Kubernetes configuration changes and updates the MCP server, and can view and manage the current .kube/config or in-cluster configuration.
  2. General resource operations: Perform CRUD operations on any Kubernetes or OpenShift resource, including create or update, get, list, and delete.
  3. Pod operations: List Pods in all namespaces or a specified namespace; get a Pod by name from a specified namespace; delete a Pod by name; view Pod logs; get resource usage metrics for all Pods or a specified Pod; enter a Pod to execute commands; run a container image in a Pod and optionally expose it.
  4. Namespaces: List Kubernetes namespaces, which can be filtered via field selector.
  5. Events: View Kubernetes events in all namespaces or a specified namespace, with support for field selector filtering.
  6. OpenShift projects: List OpenShift projects in the current cluster.
  7. Helm: Install a Helm chart in the current or a specified namespace; list Helm releases in all namespaces or a specified namespace; uninstall a release.
  8. Tekton: A Pipeline can be started by creating a PipelineRun; a PipelineRun can be restarted, canceled, troubleshooted, and have its logs retrieved; a Task can be started by creating a TaskRun; a TaskRun canRestart using the same spec, and obtain logs through Pod parsing.
  9. Node-related tools: obtain node logs (kubelet, kube-proxy, or other system logs); obtain detailed node resource usage statistics through kubelet's Summary API, covering CPU, memory, filesystem, and network, and on cgroup v2 and kernel 4.20+ systems it also includes PSI pressure metrics.
  10. Observability: optional OpenTelemetry distributed tracing and metrics, support for custom sampling rates, and provides a /stats endpoint for real-time statistics.

Usage: The server supports configuration through command-line arguments, TOML configuration files, and environment variables. The CLI executable can be run through npx or uvx, or the latest release binary can be downloaded. For client integration, the documentation provides configuration methods for Claude Desktop, VS Code / VS Code Insiders, Cursor, Goose, and others, for example adding an mcpServers list in claude_desktop_config.json, installing the Kubernetes MCP server extension in VS Code, editing mcp.json in Cursor, or adding mcpServers in goose config.yaml. Toolset configuration options can enable or disable specific tools, resources, and prompts to control available functionality, reduce context size, and improve the accuracy of LLM tool selection.

Applicable scenarios: Suitable for scenarios that require performing resource management, Pod debugging, log viewing, event troubleshooting, Helm deployment, and Tekton pipeline operations on Kubernetes or OpenShift clusters through AI clients; also suitable for multi-cluster environments, allowing interaction with multiple clusters at the same time (as defined by kubeconfig), and when multi-cluster support is enabled the related tools include an additional context parameter to specify the cluster.

Limitations and notes: The materials do not provide specific charging, pricing, or commercial licensing information. Runtime settings use TOML or existing environment variable names rather than CLI flags, and there is documentation of flag-to-TOML mappings. Support is provided for restricting access to sensitive resource types through denied resources, and support is provided for OAuth/OIDC authentication for HTTP mode (Keycloak, Microsoft Entra ID). The server supports MCP logging capabilities, Kubernetes API errors are automatically classified and logged to the client at the appropriate severity level, and sensitive data (tokens, keys, passwords, cloud credentials) is automatically redacted before being sent to the client.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools