Kubernetes MCP Server
@nearvitamin
Model Context Protocol (MCP) server for Kubernetes and OpenShift containers, context, kubernetes, mcp, model, model-context-pr, openshift, protocol
Overview
What is Kubernetes MCP Server?
A Kubernetes Model Context Protocol (MCP) server implementation with support for OpenShift. It enables AI agents to interact with Kubernetes clusters by performing CRUD operations on any resource, pod-specific actions (list, get, delete, logs, run), and viewing events.
How to use Kubernetes MCP Server?
Install via npx or download the latest binary from GitHub. Configure it as an MCP server in your client (e.g., Claude Desktop or Goose CLI) by adding the command npx -y kubernetes-mcp-server@latest to the client’s config. Optionally use --sse-port to run in Server-Sent Event (SSE) mode.
Key features of Kubernetes MCP Server
- Automatically detects changes in Kubernetes configuration.
- Perform CRUD operations on any Kubernetes resource.
- Pod-specific operations: list, get, delete, logs, run.
- View Kubernetes events in all or specific namespaces.
- Supports both stdin/stdout and SSE transport modes.
- Works with local
.kube/configor in-cluster configuration.
Use cases of Kubernetes MCP Server
- AI-assisted troubleshooting and automatic fixing of failed deployments.
- Querying and modifying Kubernetes resources via natural language.
- Viewing pod logs and events for diagnosis without manual kubectl commands.
- Running container images in pods for testing or debugging.
FAQ from Kubernetes MCP Server
What operations does Kubernetes MCP Server support?
It supports CRUD (Create/Update, Get, List, Delete) on any Kubernetes resource, plus pod-specific actions like logs and run, and event viewing.
What are the runtime requirements?
Requires Node.js (to run via npx) or the platform-specific binary. A valid Kubernetes kubeconfig or in-cluster configuration is needed.
How does the server connect to a Kubernetes cluster?
It uses the default Kubernetes configuration from the local .kube/config file or in-cluster service account, detecting changes automatically.
What transport modes are available?
The server supports the default stdin/stdout MCP transport, and can be started in SSE mode using the --sse-port CLI option.