mcp-server-kubernetes
Verified Safeby Flux159
Overview
Manages Kubernetes clusters by executing kubectl and Helm commands, facilitating automation and interaction through the Model Context Protocol.
Installation
npx mcp-server-kubernetesEnvironment Variables
- SPAWN_MAX_BUFFER
- MASK_SECRETS
- ALLOW_ONLY_READONLY_TOOLS
- ALLOWED_TOOLS
- ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS
- ENABLE_UNSAFE_SSE_TRANSPORT
- ENABLE_UNSAFE_STREAMABLE_HTTP_TRANSPORT
- KUBECONFIG_YAML
- KUBECONFIG_JSON
- K8S_SERVER
- K8S_TOKEN
- K8S_SKIP_TLS_VERIFY
- KUBECONFIG_PATH
- K8S_CONTEXT
- K8S_NAMESPACE
- PORT
- HOST
- DNS_REBINDING_PROTECTION
- DNS_REBINDING_ALLOWED_HOST
Security Notes
The server executes external CLI commands (kubectl, helm, aws, gcloud, curl) via `execFileSync` and `spawn`. While arguments are generally passed as arrays to mitigate command injection, this pattern inherently carries risk. Explicit warnings are provided for 'UNSAFE' HTTP/SSE transports, recommending proxies for authentication/authorization. Secrets masking for 'kubectl get secrets' is enabled by default. Tool filtering via environment variables (`ALLOW_ONLY_READONLY_TOOLS`, `ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS`, `ALLOWED_TOOLS`) is a strong positive.
Similar Servers
kubernetes-mcp-server
Provides a Model Context Protocol (MCP) server for AI agents to interact with Kubernetes and OpenShift clusters, enabling AI-driven cluster management and diagnosis.
kmcp
Kubernetes controller and CLI for declarative deployment and management of Model Context Protocol (MCP) servers, simplifying local development to production.
mcp-k8s-go
An MCP server enabling AI assistants and users to interact with and manage Kubernetes clusters by listing, getting, applying, and executing commands on Kubernetes resources.
mcp-k8s
A Kubernetes MCP (Model Control Protocol) server that enables natural language interaction with Kubernetes clusters and Helm for resource and release management.