kubectl-mcp-server CLI

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 heal…

Rohit Ghumare

@rohitg00

Install

$ openclaw skills install @rohitg00/k8s-cli

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 kubectl_get '{"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 kubectl_get
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 kubectl_get '{"namespace": "default"}'

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

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

Examples

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

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

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

# Scale deployment
kubectl-mcp-server call kubectl_scale '{"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 '{}'

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

# Safety
export MCP_SAFETY_MODE=read-only   # read-only | disable-destructive | confirm | normal
export MCP_MASK_SECRETS=true       # Redact Secret values in tool output (default)

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

Top skills in this category

API Gateway

@byungkyu

Call third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, etc.

39488k

HubSpot

@hith3sh

HubSpot CRM API integration with managed OAuth. Manage contacts, companies, deals, pipelines, tickets, products, line items, marketing emails, and workflows....

327.2k

Master Marketing

@tevfikgulep

All-in-one marketing engine combining growth strategy, content remixing, and trend monitoring. Drive growth with data-driven strategies, repurposed content across all platforms, and real-time trend analysis.

148.1k

Feishu Bridge

@alexanys

Connect a Feishu (Lark) bot to Clawdbot via WebSocket long-connection. No public server, domain, or ngrok required. Use when setting up Feishu/Lark as a messaging channel, troubleshooting the Feishu bridge, or managing the bridge service (start/stop/logs). Covers bot creation on Feishu Open Platform, credential setup, bridge startup, macOS launchd auto-restart, and group chat behavior tuning.

812k

Zoho CRM

@byungkyu

Zoho CRM API integration with managed OAuth. Manage leads, contacts, accounts, deals, and other CRM records. Use this skill when users want to read, create, update, or delete CRM records, search contacts, manage sales pipelines, access organization settings, manage users, or retrieve module metadata in Zoho CRM. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key. Calls run through the `maton` CLI with OAuth login, or over raw HTTP with a Maton API key where the CLI cannot be installed. Every call is authenticated as the user's connection and reaches only what that connection's authorization allows, which the provider enforces on every request; the endpoints documented here are the ones this skill uses, and any other endpoint of this app needs the user to ask for it by name. Default to read and list calls, and confirm every write or new connection with the user. This file also documents the three constructs that turn a Zoho CRM connection into automation, in the order they are used: the connection (the first step), a hosted function that runs a Zoho CRM action through the Maton SDK, and a trigger that calls that function on a schedule or on an event. Those sections are the platform's own reference text, shared with the api-gateway skill, with Zoho CRM examples; they add no Zoho CRM capability - Zoho CRM is not an event source, a trigger cannot read Zoho CRM data, and the files under `references/<source>/triggers.md` are the platform's event catalogues for the sources Maton offers (time, Calendly, GitHub, Gmail, HubSpot, Linear, Notion, Slack, Stripe).

615k