Back to MCP Directory
K8s
Model Context Protocol moderate risk

K8s

mcp-k8s provides a Model Control Protocol server for managing Kubernetes resources and Helm deployments via standard I/O, SSE, or streamable HTTP.

Connections & Capabilities

Connects To

GitHubDockerKubernetes

Capabilities

readwriteexecadmin

Quickstart

Config

{
  "mcpServers": {
    "mcp-k8s": {
      "url": "http://localhost:8080/sse",
      "args": []
    }
  }
}

Exposed MCP Tools (14)

safe
get_api_resources

Retrieves all supported API resource types in the Kubernetes cluster.

Read-only operation, no modification of resources.

safe
get_resource

Retrieves detailed information about a specific Kubernetes resource.

Read-only operation, no modification of resources.

safe
list_resources

Lists all instances of a specific Kubernetes resource type.

Read-only operation, no modification of resources.

moderate
create_resource

Creates a new Kubernetes resource.

Adds new resources to the cluster.

high
update_resource

Updates an existing Kubernetes resource.

Modifies existing resources, potentially disrupting services.

critical
delete_resource

Deletes a Kubernetes resource.

Removes resources from the cluster, potentially causing downtime.

safe
list_helm_releases

Lists all Helm releases in the Kubernetes cluster.

Read-only operation, no modification of resources.

safe
get_helm_release

Retrieves detailed information about a specific Helm release.

Read-only operation, no modification of resources.

moderate
install_helm_chart

Installs a Helm chart into the Kubernetes cluster.

Deploys new applications, potentially impacting cluster resources.

high
upgrade_helm_chart

Upgrades an existing Helm release.

Modifies existing deployments, potentially disrupting services.

critical
uninstall_helm_chart

Uninstalls a Helm release from the Kubernetes cluster.

Removes deployments, potentially causing downtime.

safe
list_helm_repositories

Lists all configured Helm repositories.

Read-only operation, no modification of resources.

moderate
add_helm_repository

Adds a new Helm repository.

Adds a new source for Helm charts.

moderate
remove_helm_repository

Removes a Helm repository.

Removes a source for Helm charts.

Safety Assessment

mcp-k8s is relatively safe in read-only mode. Enabling write operations increases the risk, requiring careful configuration and monitoring. Using stdio mode is safer than exposing the server via HTTP.

  • Fine-grained control over Kubernetes resource operations via flags.
  • Write operations (create, update, delete) can be independently enabled/disabled.
  • Uses RBAC to limit K8s client permissions.
  • Input validation helps prevent injection attacks.
  • If write operations are enabled, the server can modify Kubernetes resources.
  • Kubeconfig file must be securely managed to prevent unauthorized access.
  • Exposure via SSE or streamable HTTP increases the attack surface.
  • Lack of built-in sandboxing for operations.