kubemcp

icy-r/kubemcp

3.2

If you are the rightful owner of kubemcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Kube MCP is a Model Context Protocol server designed for managing Kubernetes clusters, enabling AI assistants to interact with Kubernetes resources.

Tools
9
Resources
0
Prompts
0

Kube MCP

npm version License: MIT

A Model Context Protocol (MCP) server for Kubernetes cluster management. Enables AI assistants to interact with Kubernetes resources.

Quick Start

npx @icy-r/kube-mcp

MCP Configuration

Add to your MCP client (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["-y", "@icy-r/kube-mcp"],
      "env": {
        "KUBEMCP_DEFAULT_NAMESPACE": "default"
      }
    }
  }
}

Custom kubeconfig:

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["-y", "@icy-r/kube-mcp"],
      "env": {
        "KUBEMCP_CONFIG_SOURCE": "custom",
        "KUBEMCP_KUBECONFIG_PATH": "/path/to/kubeconfig"
      }
    }
  }
}

Environment Variables

VariableDescriptionDefault
KUBEMCP_CONFIG_SOURCElocal or customlocal
KUBEMCP_KUBECONFIG_PATHCustom kubeconfig path-
KUBEMCP_DEFAULT_NAMESPACEDefault namespacedefault
KUBEMCP_RESPONSE_FORMATjson, toon, autoauto

Tools

ToolActions
k8s_deploymentslist, get, scale, restart, get_status, get_metrics
k8s_podslist, get, delete, get_logs, summarize_logs, get_status
k8s_serviceslist, get, get_endpoints
k8s_configmapslist, get, create, update, delete
k8s_secretslist, get, create, update, delete
k8s_namespaceslist, get, create, delete
k8s_metricsget_pod_metrics, get_node_metrics
k8s_eventslist, get_resource_events, get_recent_events
k8s_auditget_config, configure, get_session_log, clear_session_log

Safety Features

Destructive actions require explicit confirmation:

{ "action": "delete", "name": "my-pod", "confirm": true }

Preview changes with dry-run:

{ "action": "scale", "name": "my-deployment", "replicas": 5, "dryRun": true }

Development

git clone https://github.com/icy-r/kubemcp.git
cd kubemcp
pnpm install
pnpm build
pnpm test

License

MIT