agentsclimarketplace

K8s cli

Skill ComeOnOliver/skillshub/skills/rohitg00/kubectl-mcp-server/k8s-cli

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill k8s-cli

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

4.7 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.