{"type":"mcp_server","name":"kubectl-mcp-server","description":"The Kubectl MCP Tool is a Model Context Protocol server for Kubernetes, enabling AI assistants to interact with clusters using natural language for core operations and resource management.","category":"Developer Tools","language":"Python","stars":917,"forks":18,"owner":"rohitg00","github_url":"https://github.com/rohitg00/kubectl-mcp-server","homepage":null,"setup":"## Setup\n\nFor detailed installation instructions, please see the [Installation Guide](./docs/INSTALLATION.md).\n\nYou can install kubectl-mcp-tool directly from PyPI:\n\n```bash\npip install kubectl-mcp-tool\n```\n\nFor a specific version:\n\n```bash\npip install kubectl-mcp-tool==1.1.0\n```\n\nThe package is available on PyPI: [https://pypi.org/project/kubectl-mcp-tool/1.1.0/](https://pypi.org/project/kubectl-mcp-tool/1.1.0/)\n\n### Prerequisites\n\n- Python 3.9+\n- kubectl CLI installed and configured\n- Access to a Kubernetes cluster\n- pip (Python package manager)\n\n### Global Installation\n\n```bash\n# Install latest version from PyPI\npip install kubectl-mcp-tool\n\n# Or install development version from GitHub\npip install git+https://github.com/rohitg00/kubectl-mcp-server.git\n```\n\n### Local Development Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/rohitg00/kubectl-mcp-server.git\ncd kubectl-mcp-server\n\n# Install in development mode\npip install -e .\n```\n\n### Verifying Installation\n\nAfter installation, verify the tool is working correctly:\n\n```bash\n# Check CLI mode\nkubectl-mcp --help\n```\n\nNote: This tool is designed to work as an MCP server that AI assistants connect to, not as a direct kubectl replacement. The primary command available is `kubectl-mcp serve` which starts the MCP server.\n\n### Claude Desktop\n\nAdd the following to your Claude Desktop configuration at `~/.config/claude/mcp.json` (Windows: `%APPDATA%\\Claude\\mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"kubernetes\": {\n      \"command\": \"python\",\n      \"args\": [\"-m\", \"kubectl_mcp_tool.minimal_wrapper\"],\n      \"env\": {\n        \"KUBECONFIG\": \"/path/to/your/.kube/config\"\n      }\n    }\n  }\n}\n```\n\n### Cursor AI\n\nAdd the following to your Cursor AI settings under MCP by adding a new global MCP server:\n\n```json\n{\n  \"mcpServers\": {\n    \"kubernetes\": {\n      \"command\": \"python\",\n      \"args\": [\"-m\", \"kubectl_mcp_tool.minimal_wrapper\"],\n      \"env\": {\n        \"KUBECONFIG\": \"/path/to/your/.kube/config\",\n        \"PATH\": \"/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin\"\n      }\n    }\n  }\n}\n```\n\nSave this configuration to `~/.cursor/mcp.json` for global settings.\n\n> **Note**: Replace `/path/to/your/.kube/config` with the actual path to your kubeconfig file. On most systems, this is `~/.kube/config`.\n\n### Windsurf\n\nAdd the following to your Windsurf configuration at `~/.config/windsurf/mcp.json` (Windows: `%APPDATA%\\WindSurf\\mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"kubernetes\": {\n      \"command\": \"python\",\n      \"args\": [\"-m\", \"kubectl_mcp_tool.minimal_wrapper\"],\n      \"env\": {\n        \"KUBECONFIG\": \"/path/to/your/.kube/config\"\n      }\n    }\n  }\n}\n```\n\n### Automatic Configuration\n\nFor automatic configuration of all supported AI assistants, run the provided installation script:\n\n```bash\nbash install.sh\n```\n\nThis script will:\n1. Install the required dependencies\n2. Create configuration files for Claude, Cursor, and WindSurf\n3. Set up the correct paths and environment variables\n4. Test your Kubernetes connection\n\n## Prerequisites\n\n1. kubectl installed and in your PATH\n2. A valid kubeconfig file\n3. Access to a Kubernetes cluster\n4. Helm v3 (optional, for Helm operations)","tools":"## Available Tools\n\n1.  Core Kubernetes Operations (Connect to a Kubernetes cluster, List and manage pods, services, deployments, and nodes, etc.)\n2.  Natural Language Processing (Process natural language queries for kubectl operations, Context-aware commands with memory of previous operations, etc.)\n3.  Monitoring (Cluster health monitoring, Resource utilization tracking, Pod status and health checks, etc.)\n4.  Security (RBAC validation and verification, Security context auditing, Secure connections to Kubernetes API, etc.)\n5.  Diagnostics (Cluster diagnostics and troubleshooting, Configuration validation, Error analysis and recovery suggestions, etc.)\n6.  Advanced Features (Multiple transport protocols support (stdio, SSE), Integration with multiple AI assistants, Extensible tool framework, etc.)","faq":null,"created_at":"2025-03-23T17:49:07+00:00","updated_at":"2025-03-28T23:36:13+00:00","source_url":"https://model-context-protocol.com/servers/kubernetes-ai-assistant-natural-language-control","related_articles":[]}