Provides command-line utilities for discovering, calling, and health-checking the kubectl MCP server.

Install

mkdir -p .claude/skills/k8s-cli && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5514" && unzip -o skill.zip -d .claude/skills/k8s-cli && rm skill.zip

Installs to .claude/skills/k8s-cli

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

kubectl-mcp-server CLI commands for tool discovery, direct invocation, and diagnostics. Use when exploring available tools, calling tools from command line, or checking server health.
183 chars✓ has a “when” trigger
Beginner

Key capabilities

  • List and describe available MCP tools
  • Search tools using grep patterns
  • Invoke tools directly from the command line
  • Check server health and dependencies
  • Manage cluster contexts

How it works

It provides a CLI interface to interact with the kubectl-mcp-server, enabling discovery of available tools and direct execution of operations.

Inputs & outputs

You give it
Tool name and JSON arguments
You get back
Tool execution result

When to use k8s-cli

  • Run doctor to verify dependencies
  • List available MCP tools
  • Call specific K8s tools directly via CLI

About this skill

kubectl-mcp-server CLI

Command-line interface for kubectl-mcp-server operations.

When to Apply

Use this skill when:

  • User mentions: "CLI", "command line", "tool discovery", "server health"
  • Operations: listing tools, calling tools directly, checking dependencies
  • Keywords: "doctor", "tools list", "call", "grep", "info"

Priority Rules

PriorityRuleImpactTools
1Run doctor to check dependenciesCRITICALkubectl-mcp-server doctor
2Use tools -d for descriptionsHIGHkubectl-mcp-server tools -d
3Use grep for tool discoveryMEDIUMkubectl-mcp-server grep
4Use call for direct invocationMEDIUMkubectl-mcp-server call

Quick Reference

TaskCommandExample
List toolstools -dkubectl-mcp-server tools -d
Search toolsgrepkubectl-mcp-server grep "*pod*"
Call toolcallkubectl-mcp-server call get_pods '{"namespace": "default"}'
Check healthdoctorkubectl-mcp-server doctor

Server Commands

Start Server

# stdio transport (for Claude Desktop)
kubectl-mcp-server serve

# HTTP transport (for remote clients)
kubectl-mcp-server serve --transport streamable-http --port 8000

# With debug logging
MCP_DEBUG=true kubectl-mcp-server serve

Check Health

# Verify dependencies
kubectl-mcp-server doctor

# Shows:
# ✓ kubectl: found
# ✓ helm: found
# ✓ kubeconfig: valid
# ✓ cluster: connected

Tool Discovery

List Tools

# List all tools
kubectl-mcp-server tools

# List with descriptions
kubectl-mcp-server tools -d

# JSON output
kubectl-mcp-server tools --json

Search Tools

# Search by pattern
kubectl-mcp-server grep "*pod*"
kubectl-mcp-server grep "*helm*"
kubectl-mcp-server grep "*velero*"

# Results show matching tool names

Tool Schema

# Show tool parameters
kubectl-mcp-server tools get_pods
kubectl-mcp-server tools install_helm_chart

# Shows:
# - Description
# - Parameters (name, type, required)
# - Return type

Direct Tool Invocation

Call Tools

# Call with JSON arguments
kubectl-mcp-server call get_pods '{"namespace": "default"}'

# Call with stdin
echo '{"namespace": "kube-system"}' | kubectl-mcp-server call get_pods

# Call with no arguments
kubectl-mcp-server call get_namespaces '{}'

Examples

# Get pods
kubectl-mcp-server call get_pods '{"namespace": "default"}'

# Describe pod
kubectl-mcp-server call describe_pod '{"name": "nginx-xxx", "namespace": "default"}'

# Get logs
kubectl-mcp-server call get_pod_logs '{"name": "nginx-xxx", "namespace": "default"}'

# Scale deployment
kubectl-mcp-server call scale_deployment '{"name": "nginx", "namespace": "default", "replicas": 3}'

# Install helm chart
kubectl-mcp-server call install_helm_chart '{
  "name": "my-release",
  "chart": "bitnami/nginx",
  "namespace": "default"
}'

Context Management

# Show current context
kubectl-mcp-server context

# Switch context
kubectl-mcp-server context production

# List available contexts
kubectl-mcp-server call list_contexts_tool '{}'

Server Info

# Show server information
kubectl-mcp-server info

# Shows:
# - Version
# - Tool count
# - Resource count
# - Prompt count

MCP Resources

# List available resources
kubectl-mcp-server resources

# Resources:
# - cluster://status
# - namespaces://list
# - pods://{namespace}
# - deployments://{namespace}
# - services://{namespace}
# - events://{namespace}
# - nodes://list
# - contexts://list

MCP Prompts

# List available prompts
kubectl-mcp-server prompts

# Prompts:
# - troubleshoot-pod
# - deploy-application
# - security-audit
# - cost-optimization
# - incident-response
# - helm-workflow
# - gitops-sync
# - multi-cluster-compare

Environment Variables

# Core
export MCP_DEBUG=true           # Enable debug logging
export MCP_LOG_FILE=/var/log/mcp.log  # Log to file
export NO_COLOR=1               # Disable colors

# Browser (optional)
export MCP_BROWSER_ENABLED=true
export MCP_BROWSER_PROVIDER=browserbase
export BROWSERBASE_API_KEY=bb_...

Claude Desktop Configuration

{
  "mcpServers": {
    "kubectl": {
      "command": "kubectl-mcp-server",
      "args": ["serve"]
    }
  }
}

Shell Aliases

# Add to ~/.bashrc or ~/.zshrc
alias kmcp='kubectl-mcp-server'
alias kmcp-tools='kubectl-mcp-server tools -d'
alias kmcp-call='kubectl-mcp-server call'
alias kmcp-grep='kubectl-mcp-server grep'

Related Skills

When not to use it

  • When using a GUI-based MCP client
  • When direct kubectl commands are sufficient

Prerequisites

kubectl-mcp-server

Limitations

  • Requires server to be running
  • Tool discovery depends on server metadata

How it compares

It provides a structured way to discover and call specific MCP tools rather than relying on standard kubectl commands.

Compared to similar skills

k8s-cli side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
k8s-cli (this skill)16moReviewBeginner
linkerd-patterns65moReviewAdvanced
storage-networking67moReviewAdvanced
k8s-helm86moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by rohitg00

View all by rohitg00

You might also like

linkerd-patterns

wshobson

Implement Linkerd service mesh patterns for lightweight, security-focused service mesh deployments. Use when setting up Linkerd, configuring traffic policies, or implementing zero-trust networking with minimal overhead.

672

storage-networking

pluginagentmarketplace

Master Kubernetes storage management and networking architecture. Learn persistent storage, network policies, service discovery, and ingress routing.

663

k8s-helm

rohitg00

Manage Helm charts, releases, and repositories. Use for Helm installations, upgrades, rollbacks, chart development, and release management.

857

kubernetes-architect

sickn33

Expert Kubernetes architect specializing in cloud-native infrastructure, advanced GitOps workflows (ArgoCD/Flux), and enterprise container orchestration. Masters EKS/AKS/GKE, service mesh (Istio/Linkerd), progressive delivery, multi-tenancy, and platform engineering. Handles security, observability, cost optimization, and developer experience. Use PROACTIVELY for K8s architecture, GitOps implementation, or cloud-native platform design.

636

gitops-workflow

sickn33

Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.

521

devops-iac-engineer

davila7

Implements infrastructure as code using Terraform, Kubernetes, and cloud platforms. Designs scalable architectures, CI/CD pipelines, and observability solutions. Provides security-first DevOps practices and site reliability engineering guidance.

223

Search skills

Search the agent skills registry