Kube MCP
Enables management of Kubernetes cluster resources including deployments, pods, services, configmaps, secrets, namespaces, metrics, and events. Supports operations like scaling, restarting, log retrieval, and resource monitoring with safety features for destructive actions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kube MCPlist all pods in the default namespace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kube MCP
A Model Context Protocol (MCP) server for Kubernetes cluster management. Enables AI assistants to interact with Kubernetes resources.
Quick Start
npx @icy-r/kube-mcpRelated MCP server: Kubernetes MCP Server
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
Variable | Description | Default |
|
|
|
| Custom kubeconfig path | - |
| Default namespace |
|
|
|
|
Tools
Tool | Actions |
| list, get, scale, restart, get_status, get_metrics |
| list, get, delete, get_logs, summarize_logs, get_status |
| list, get, get_endpoints |
| list, get, create, update, delete |
| list, get, create, update, delete |
| list, get, create, delete |
| get_pod_metrics, get_node_metrics |
| list, get_resource_events, get_recent_events |
| get_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 testLicense
MIT
Available Tools
9 toolsk8s_auditB
Manage audit logging and safety controls. Actions:
get_status: Check dry-run mode and session stats
set_dry_run: Enable/disable dry-run mode globally
get_session_log: View changes made in this session
get_stats: Get statistics about operations in this session
clear_session: Clear session audit log
configure: Update audit settings (requireConfirmation, logToConsole)
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| enabled | No | Enable/disable dry-run mode (for set_dry_run action) | |
| requireConfirmation | No | Require confirmation for destructive actions (for configure) | |
| logToConsole | No | Log audit entries to console (for configure) |
k8s_configmapsA
Manage Kubernetes ConfigMaps. Actions:
list: List all ConfigMaps in a namespace
get: Get a specific ConfigMap
create: Create a new ConfigMap
update: Update an existing ConfigMap (requires confirm=true or dryRun=true)
delete: Delete a ConfigMap (requires confirm=true or dryRun=true)
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| name | No | ConfigMap name (required for most actions except list) | |
| namespace | No | Namespace (optional) | |
| data | No | ConfigMap data as key-value pairs (required for create/update) | |
| confirm | No | Confirm destructive action (required for update/delete unless dryRun=true) | |
| dryRun | No | Preview changes without executing (default: false) |
k8s_deploymentsA
Manage Kubernetes deployments. Actions:
list: List all deployments in a namespace
get: Get deployment details
scale: Scale deployment replicas (requires confirm=true or dryRun=true)
restart: Perform rolling restart (requires confirm=true or dryRun=true)
get_status: Get rollout status
get_metrics: Get aggregated metrics for a deployment
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| name | No | Deployment name (required for most actions except list) | |
| namespace | No | Namespace (optional) | |
| replicas | No | Number of replicas (required for scale action) | |
| confirm | No | Confirm destructive action (required for scale/restart unless dryRun=true) | |
| dryRun | No | Preview changes without executing (default: false) |
k8s_eventsB
Get Kubernetes cluster events. Actions:
list: Get cluster events with optional filtering
get_resource: Get events for a specific resource
get_recent: Get recent events sorted by timestamp
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| namespace | No | Namespace (optional) | |
| kind | No | Resource kind (e.g., Pod, Deployment) - required for get_resource | |
| name | No | Resource name - required for get_resource | |
| fieldSelector | No | Field selector for filtering (optional) | |
| limit | No | Maximum number of events to return (default: 50) |
k8s_metricsB
Get Kubernetes resource metrics (CPU/Memory). Actions:
get_pod_metrics: Get resource metrics for pods
get_node_metrics: Get resource metrics for nodes
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| namespace | No | Namespace (optional, for pod metrics) | |
| podName | No | Specific pod name (optional) | |
| nodeName | No | Specific node name (optional) |
k8s_namespacesA
Manage Kubernetes namespaces. Actions:
list: List all namespaces in the cluster
get: Get details of a specific namespace
create: Create a new namespace
delete: Delete a namespace (requires confirm=true or dryRun=true)
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| name | No | Namespace name (required for get, create, delete) | |
| confirm | No | Confirm destructive action (required for delete unless dryRun=true) | |
| dryRun | No | Preview changes without executing (default: false) |
k8s_podsA
Manage Kubernetes pods. Actions:
list: List pods in a namespace with optional label selector
get: Get pod details
delete: Delete a pod (requires confirm=true or dryRun=true)
get_logs: Get logs with filtering (severity, grep, time-based)
get_status: Get detailed pod status
summarize_logs: Get log summary statistics (90%+ token reduction)
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| name | No | Pod name (required for most actions except list) | |
| namespace | No | Namespace (optional) | |
| labelSelector | No | Label selector for list action (e.g., "app=nginx") | |
| container | No | Container name for logs (optional) | |
| tail | No | Number of log lines to tail | |
| previous | No | Get logs from previous container instance | |
| sinceSeconds | No | Only return logs newer than this many seconds | |
| sinceTime | No | Only return logs after this ISO 8601 timestamp | |
| grep | No | Filter logs with regex pattern | |
| severityFilter | No | Only show logs at or above this severity level | |
| maxBytes | No | Maximum response size in bytes | |
| confirm | No | Confirm destructive action (required for delete unless dryRun=true) | |
| dryRun | No | Preview changes without executing (default: false) |
k8s_secretsA
Manage Kubernetes Secrets. Actions:
list: List all Secrets in a namespace
get: Get a specific Secret (metadata only, no data)
create: Create a new Secret
update: Update an existing Secret (requires confirm=true or dryRun=true)
delete: Delete a Secret (requires confirm=true or dryRun=true)
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| name | No | Secret name (required for most actions except list) | |
| namespace | No | Namespace (optional) | |
| data | No | Secret data as key-value pairs (required for create/update) | |
| type | No | Secret type (default: Opaque) | Opaque |
| confirm | No | Confirm destructive action (required for update/delete unless dryRun=true) | |
| dryRun | No | Preview changes without executing (default: false) |
k8s_servicesC
Manage Kubernetes services. Actions:
list: List all services in a namespace
get: Get service details
get_endpoints: Get endpoints for a service
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| name | No | Service name (required for get and get_endpoints) | |
| namespace | No | Namespace (optional) |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v1.0.0- First observed
k8s_audit - First observed
k8s_configmaps - First observed
k8s_deployments - First observed
k8s_events - First observed
k8s_metrics - First observed
k8s_namespaces - First observed
k8s_pods - First observed
k8s_secrets - First observed
k8s_services
TDQS
Scored across 9 tools
Each tool targets a distinct Kubernetes resource type (e.g., configmaps, deployments, pods) with clear boundaries. The actions within each tool are well-defined for that resource, preventing overlap or confusion between tools. An agent can easily distinguish between managing pods versus deployments versus services.
All tool names follow a consistent 'k8s_' prefix with the resource name (e.g., k8s_configmaps, k8s_deployments). Actions within tools use consistent verbs like list, get, create, update, delete. This predictable pattern enhances readability and usability across the entire set.
With 9 tools covering core Kubernetes resources (configmaps, deployments, events, metrics, namespaces, pods, secrets, services, plus audit), this is well-scoped for a Kubernetes management server. Each tool serves a distinct purpose, and the count aligns with typical MCP server ranges (3-15 tools).
The tool set provides comprehensive CRUD/lifecycle coverage for key Kubernetes resources, including audit features. Minor gaps exist, such as no update/delete for services or events, but core operations are covered. Agents can handle most Kubernetes management tasks without dead ends.
Maintenance
Related MCP Connectors
Fail-closed policy guardrails for AI agents running kubectl, terraform, helm, and argocd.
Manage Rackspace Spot Kubernetes Cloudspaces, node pools, and VMs from your AI assistant.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables advanced management of Kubernetes clusters through natural language interactions. Supports querying, managing, and monitoring pods, deployments, nodes, and logs across multiple contexts and namespaces.10MIT
- AlicenseBqualityDmaintenanceEnables managing Kubernetes clusters through natural language by providing tools to list resources, view logs, port-forward services, scale deployments, and execute kubectl operations via AI assistants.81MIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Kubernetes clusters through 32 specialized tools for managing resources, deployments, and services. Provides both CLI and web interfaces for real-time Kubernetes operations powered by Google Gemini.5-
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Kubernetes clusters through 50 specialized tools for comprehensive cluster management. Supports both local kubectl and remote SSH-based execution for managing pods, deployments, services, and other Kubernetes resources.49MIT