Skip to content
Skills Library
DevOps & cloud · Tool integration

k8s-cli

/k8s-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 health.

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author description

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.

How it works

  1. When to Apply
  2. Priority Rules
  3. Quick Reference
  4. Server Commands
  5. Tool Discovery
  6. Direct Tool Invocation
  7. Context Management
  8. Server Info
  9. MCP Resources
  10. MCP Prompts
Original SKILL.md headings · 236 lines, 636 words
SKILL.md preview
---
name: k8s-cli
description: 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.
license: MIT-0
metadata:
  author: rohitg00
  version: "2.0.0"
  tools: 6
  category: tooling
---

# 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

| Priority | Rule | Impact | Tools |
|----------|------|--------|-------|
| 1 | Run doctor to check dependencies | CRITICAL | `kubectl-mcp-server doctor` |
| 2 | Use tools -d for descriptions | HIGH | `kubectl-mcp-server tools -d` |
| 3 | Use grep for tool discovery | MEDIUM | `kubectl-mcp-server grep` |
| 4 | Use call for direct invocation | MEDIUM | `kubectl-mcp-server call` |

## Quick Reference

| Task | Command | Example |
|------|---------|---------|
| List tools | `tools -d` | `kubectl-mcp-server tools -d` |
| Search tools | `grep` | `kubectl-mcp-server grep "*pod*"` |
| Call tool | `call` | `kubectl-mcp-server call kubectl_get '{"namespace": "default"}'` |
| Check health | `doctor` | `kubectl-mcp-server doctor` |

## Server Commands

### Start Server

```bash
# 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

```bash
# Verify dependencies
kubectl-mcp-server doctor

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

## Tool Discovery

### List Tools

```bash
# List all tools
kubectl-mcp-server tools

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

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

### Search Tools

```bash
# 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

```bash
# 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

```bash
# 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

```bash
# 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

```bash
# 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

```bash
# Show server information
kubectl-mcp-server info

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

## MCP Resources

```bash
# 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

```bash
# 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

```bash
# 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

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

## Shell Aliases

```bash
# 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

- [k8s-core](../k8s-core/SKILL.md) - Core resource tools
- [k8s-diagnostics](../k8s-diagnostics/SKILL.md) - Diagnostic tools

Versions

The database has no other skills named k8s-cli.

Database snapshot: 13.11.2026 · package version 6bd4be04498b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100mcp2cli
    Turn any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI. Use this skill when the user wants to interact with an MCP server, OpenAPI/REST API, or GraphQL API via command line, discover available tools/endpoints, call API operations, or generate a new skill from an API.…
  • 95environment-health-check
    Use when you need to verify that infrastructure tools (kubectl, terraform, aws CLI, glab, helm, tshark, etc.) are installed and configured before starting work. Also use for "check my environment", "verify tools", "am I set up correctly", "pre-flight check", or at the start of…
  • 95kubectl
    Execute and manage Kubernetes clusters via kubectl commands. Query resources, deploy applications, debug containers, manage configurations, and monitor cluster health. Use when working with Kubernetes clusters, containers, deployments, or pod diagnostics.
  • 100fieldflow-cli
    Use FieldFlow to inspect and reduce noisy JSON CLI output before it reaches model context. Trigger for read-only external CLI tasks likely to return large structured output, especially logs, list, describe, get, read, query, search, metrics, or status commands from tools like…
  • 100mcp-cli
    Interface for MCP (Model Context Protocol) servers via CLI. Use when you need to interact with external tools, APIs, or data sources through MCP servers, list available MCP servers/tools, or call MCP tools from command line.
  • 100mcp-server-terraform
    Use this skill when installing, configuring, and executing tools with the Terraform plan inspection, state discovery, and module Terraform MCP server.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.