Kubernetes MCP Server

Connect your AI assistant to Kubernetes clusters for cluster management, pod inspection, deployment automation, and troubleshooting.

April 15, 2026
mcpdevopskubernetesk8scontainer-orchestration

Kubernetes MCP Server

Connect your AI assistant directly to Kubernetes clusters for real-time cluster management and troubleshooting.

What it Does

  • Cluster Inspection: List nodes, namespaces, and cluster resources
  • Pod Management: View pod status, logs, and descriptions
  • Deployment Operations: Create, update, and scale deployments
  • Service Management: Inspect and manage services, ingress, and networking
  • Troubleshooting: Get events, describe resources, and diagnose issues

Installation

# Using npx
npx -y @anthropic-ai/mcp-server-kubernetes

# Using Docker
docker run -i --rm -v ~/.kube:/root/.kube mcp/kubernetes

Configuration

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-server-kubernetes"],
      "env": {
        "KUBECONFIG": "${HOME}/.kube/config"
      }
    }
  }
}

Example Prompts

  • "Show me all pods in the default namespace"
  • "What deployments are failing in production?"
  • "Get logs from the api-server pod"
  • "Scale the web deployment to 5 replicas"
  • "List all services with external IPs"

Security Notes

  • Use read-only service accounts for production clusters
  • Limit RBAC permissions to only required resources
  • Never expose kubeconfig with admin credentials to AI assistants