MCP.so
Sign In
Servers

mcp-kubernetes-server

@feiskyer

A Model Context Protocol (MCP) server that enables AI assistants to interact with Kubernetes clusters. It serves as a bridge between AI tools (like Claude, Cursor, and GitHub Copilot) and Kubernetes, translating natural language requests into Kubernetes operations and returning t

Overview

What is mcp-kubernetes-server?

mcp-kubernetes-server is a Model Context Protocol (MCP) server that enables AI assistants to interact with Kubernetes clusters. It translates natural language requests from AI assistants into kubectl commands or direct Kubernetes API calls, executing them against the target cluster and returning structured responses.

How to use mcp-kubernetes-server?

Install via Docker or uvx. Configure in the mcpServers section of your AI client (Claude Desktop, Cursor, ChatGPT Copilot, GitHub Copilot). Provide a valid kubeconfig either via the KUBECONFIG environment variable (uvx) or by mounting the file into the container (Docker). Ensure kubectl, helm, and Python ≥3.11 (for uvx) are installed. Run with optional command-line flags to disable specific operations or change transport (stdio, sse, streamable-http).

Key features of mcp-kubernetes-server

  • Executes arbitrary kubectl and helm commands.
  • Provides read tools for resources, logs, events, APIs, and CRDs.
  • Offers write tools for create, apply, expose, scale, and rollout operations.
  • Supports disabling kubectl, helm, write, or delete operations.
  • Provides RBAC check tools (k8s_auth_can_i, k8s_auth_whoami).
  • Supports multiple transports: stdio, SSE, and streamable HTTP.

Use cases of mcp-kubernetes-server

  • Query cluster status and resource states via natural language.
  • Diagnose pod issues by inspecting logs, events, and resource descriptions.
  • Manage deployments (scale, rollout, set images, environment variables).
  • Perform administrative tasks like cordoning nodes or checking RBAC permissions.
  • Automate cluster operations through AI assistants in CI/CD pipelines.

FAQ from mcp-kubernetes-server

What prerequisites are needed to run mcp-kubernetes-server?

A working Kubernetes cluster, a valid kubeconfig file, kubectl and helm installed in the system PATH, and Python ≥3.11 if using uvx (not required for Docker).

How do I configure the kubeconfig?

Set the KUBECONFIG environment variable to the path of your kubeconfig file, or when using Docker mount the kubeconfig file to /home/mcp/.kube/config.

Can I disable write or delete operations?

Yes, use the --disable-write flag to block all write operations or --disable-delete to block deletions. Similarly, --disable-kubectl and --disable-helm disable those command executers.

What transport mechanisms are supported?

mcp-kubernetes-server supports three transports: stdio (default for uvx), sse, and streamable-http. Use the --transport flag to choose, and specify --host/--port for the server transports.

Which AI assistants are compatible?

The server works with any AI client that supports the Model Context Protocol, including Claude Desktop, Cursor, ChatGPT Copilot, and GitHub Copilot.

Tags

More from Cloud & Infrastructure