Back to Home
giantswarm icon

mcp-kubernetes

Verified Safe

by giantswarm

Overview

A Model Context Protocol (MCP) server that provides Kubernetes cluster management capabilities, particularly for AI agents.

Installation

Run Command
go run . serve --transport=streamable-http --debug --http-addr :8080

Environment 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

Stats

Interest Score0
Security Score8
Cost ClassLow
Stars0
Forks0
Last Update2026-01-18

Tags

KubernetesCluster ManagementModel Context ProtocolOAuthMulti-Cluster