mcp-kubernetes
Verified Safeby giantswarm
Overview
A Model Context Protocol (MCP) server that provides Kubernetes cluster management capabilities, particularly for AI agents.
Installation
go run . serve --transport=streamable-http --debug --http-addr :8080Environment Variables
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- DEX_ISSUER_URL
- DEX_CLIENT_ID
- DEX_CLIENT_SECRET
- DEX_CONNECTOR_ID
- DEX_CA_FILE
- DEX_K8S_AUTHENTICATOR_CLIENT_ID
- REGISTRATION_TOKEN
- OAUTH_ENCRYPTION_KEY
- OAUTH_STORAGE_TYPE
- VALKEY_URL
- VALKEY_PASSWORD
- VALKEY_TLS_ENABLED
- VALKEY_KEY_PREFIX
- VALKEY_DB
- OAUTH_TRUSTED_AUDIENCES
- SSO_ALLOW_PRIVATE_IPS
- KUBERNETES_IN_CLUSTER
- KUBECONFIG
- CAPI_MODE_ENABLED
- INSTRUMENTATION_ENABLED
- METRICS_EXPORTER
- TRACING_EXPORTER
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_INSECURE
Security Notes
The server demonstrates a high level of security awareness with comprehensive documentation on best practices and explicit controls. Key strengths include: robust OAuth 2.1 implementation with PKCE, client registration security, and strong URL validation (HTTPS required, SSRF protection against private IPs/localhost by default). It offers 'Non-Destructive Mode' (enabled by default) and 'Dry-Run Mode' to prevent unintended changes, which is critical for AI agent interactions. Downstream OAuth mode enables per-user Kubernetes RBAC enforcement with a 'fail-closed' principle, preventing privilege escalation. ServiceAccount tokens are projected with short expiration and auto-rotated. Detailed RBAC profiles (minimal, readonly, standard, admin) are provided, with explicit warnings and required confirmations for dangerous 'admin' access. Structured audit logging with PII sanitization and OpenTelemetry instrumentation enhance observability and security monitoring. While it allows configuring less secure options (e.g., public client registration, private OAuth URLs) via explicit flags, these are clearly documented with strong warnings against production use.
Similar Servers
mcp-context-forge
Converts web content (HTML, PDF, DOCX, etc.) and local files from a URL into high-quality Markdown format. It supports multiple conversion engines, content optimization, batch processing, and image handling.
mcphub
An orchestration hub that aggregates, manages, and routes Model Context Protocol (MCP) servers and their tools, providing a centralized interface, user management, OAuth 2.0 authorization server capabilities, and AI-powered tool discovery and routing.
mcp-server-kubernetes
This MCP server enables AI agents to connect to and manage Kubernetes clusters by executing kubectl and Helm commands.
kubernetes-mcp-server
Facilitates AI agent interaction with Kubernetes and OpenShift clusters by exposing management and observability tools via the Model Context Protocol.