kubectl-mcp-server 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,10 +5,27 @@ A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://www.python.org/)
|
|
7
7
|
[](https://kubernetes.io/)
|
|
8
|
-
[](https://
|
|
9
|
-
[](https://modelcontextprotocol.io)
|
|
9
|
+
[](https://pypi.org/project/kubectl-mcp-tool/)
|
|
10
|
+
[](https://www.npmjs.com/package/kubectl-mcp-server)
|
|
11
11
|
[](https://hub.docker.com/r/rohitghumare64/kubectl-mcp-server)
|
|
12
|
+
[](https://github.com/rohitg00/kubectl-mcp-server)
|
|
13
|
+
|
|
14
|
+
## MCP Client Compatibility
|
|
15
|
+
|
|
16
|
+
Works with all MCP-compatible AI assistants:
|
|
17
|
+
|
|
18
|
+
| Client | Status | Client | Status |
|
|
19
|
+
|--------|--------|--------|--------|
|
|
20
|
+
| Claude Desktop | ✅ Native | Claude Code | ✅ Native |
|
|
21
|
+
| Cursor | ✅ Native | Windsurf | ✅ Native |
|
|
22
|
+
| GitHub Copilot | ✅ Native | OpenAI Codex | ✅ Native |
|
|
23
|
+
| Gemini CLI | ✅ Native | Goose | ✅ Native |
|
|
24
|
+
| Roo Code | ✅ Native | Kilo Code | ✅ Native |
|
|
25
|
+
| Amp | ✅ Native | Trae | ✅ Native |
|
|
26
|
+
| OpenCode | ✅ Native | Kiro CLI | ✅ Native |
|
|
27
|
+
| Antigravity | ✅ Native | Clawdbot | ✅ Native |
|
|
28
|
+
| Droid (Factory) | ✅ Native | Any MCP Client | ✅ Compatible |
|
|
12
29
|
|
|
13
30
|
## Live Demos
|
|
14
31
|
|
|
@@ -23,7 +40,7 @@ A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants
|
|
|
23
40
|
|
|
24
41
|
## Features
|
|
25
42
|
|
|
26
|
-
###
|
|
43
|
+
### 121 MCP Tools for Complete Kubernetes Management
|
|
27
44
|
|
|
28
45
|
| Category | Tools |
|
|
29
46
|
|----------|-------|
|
|
@@ -36,7 +53,11 @@ A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants
|
|
|
36
53
|
| **Cluster** | `get_nodes`, `get_namespaces`, `get_cluster_info`, `get_cluster_version`, `health_check`, `get_node_metrics`, `get_pod_metrics` |
|
|
37
54
|
| **RBAC & Security** | `get_rbac_roles`, `get_cluster_roles`, `get_service_accounts`, `audit_rbac_permissions`, `check_secrets_security`, `get_pod_security_info`, `get_admission_webhooks` |
|
|
38
55
|
| **CRDs** | `get_crds`, `get_priority_classes` |
|
|
39
|
-
| **Helm** | `
|
|
56
|
+
| **Helm Releases** | `helm_list`, `helm_status`, `helm_history`, `helm_get_values`, `helm_get_manifest`, `helm_get_notes`, `helm_get_hooks`, `helm_get_all` |
|
|
57
|
+
| **Helm Charts** | `helm_show_chart`, `helm_show_values`, `helm_show_readme`, `helm_show_crds`, `helm_show_all`, `helm_search_repo`, `helm_search_hub` |
|
|
58
|
+
| **Helm Repos** | `helm_repo_list`, `helm_repo_add`, `helm_repo_remove`, `helm_repo_update` |
|
|
59
|
+
| **Helm Operations** | `install_helm_chart`, `upgrade_helm_chart`, `uninstall_helm_chart`, `helm_rollback`, `helm_test`, `helm_template`, `helm_template_apply` |
|
|
60
|
+
| **Helm Development** | `helm_create`, `helm_lint`, `helm_package`, `helm_pull`, `helm_dependency_list`, `helm_dependency_update`, `helm_dependency_build`, `helm_version`, `helm_env` |
|
|
40
61
|
| **Context** | `get_current_context`, `switch_context`, `list_contexts`, `list_kubeconfig_contexts` |
|
|
41
62
|
| **Diagnostics** | `diagnose_pod_crash`, `detect_pending_pods`, `get_evicted_pods`, `compare_namespaces` |
|
|
42
63
|
| **Operations** | `kubectl_apply`, `kubectl_create`, `kubectl_describe`, `kubectl_patch`, `delete_resource`, `kubectl_cp`, `backup_resource`, `label_resource`, `annotate_resource`, `taint_node`, `wait_for_condition` |
|
|
@@ -189,6 +210,66 @@ Add to `~/.config/windsurf/mcp.json`:
|
|
|
189
210
|
}
|
|
190
211
|
```
|
|
191
212
|
|
|
213
|
+
### GitHub Copilot (VS Code)
|
|
214
|
+
|
|
215
|
+
Add to VS Code `settings.json`:
|
|
216
|
+
|
|
217
|
+
```json
|
|
218
|
+
{
|
|
219
|
+
"mcp": {
|
|
220
|
+
"servers": {
|
|
221
|
+
"kubernetes": {
|
|
222
|
+
"command": "npx",
|
|
223
|
+
"args": ["-y", "kubectl-mcp-server"]
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Goose
|
|
231
|
+
|
|
232
|
+
Add to `~/.config/goose/config.yaml`:
|
|
233
|
+
|
|
234
|
+
```yaml
|
|
235
|
+
extensions:
|
|
236
|
+
kubernetes:
|
|
237
|
+
command: npx
|
|
238
|
+
args:
|
|
239
|
+
- -y
|
|
240
|
+
- kubectl-mcp-server
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Gemini CLI
|
|
244
|
+
|
|
245
|
+
Add to `~/.gemini/settings.json`:
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"mcpServers": {
|
|
250
|
+
"kubernetes": {
|
|
251
|
+
"command": "npx",
|
|
252
|
+
"args": ["-y", "kubectl-mcp-server"]
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Roo Code / Kilo Code
|
|
259
|
+
|
|
260
|
+
Add to `~/.config/roo-code/mcp.json` or `~/.config/kilo-code/mcp.json`:
|
|
261
|
+
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"mcpServers": {
|
|
265
|
+
"kubernetes": {
|
|
266
|
+
"command": "npx",
|
|
267
|
+
"args": ["-y", "kubectl-mcp-server"]
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
192
273
|
### Using Python Directly
|
|
193
274
|
|
|
194
275
|
If you prefer Python over npx:
|
|
@@ -261,6 +342,28 @@ docker mcp client connect claude
|
|
|
261
342
|
|
|
262
343
|
The MCP server implements the [Model Context Protocol](https://github.com/modelcontextprotocol/spec), translating natural language requests into kubectl operations.
|
|
263
344
|
|
|
345
|
+
### Modular Structure
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
kubectl_mcp_tool/
|
|
349
|
+
├── mcp_server.py # Main server (FastMCP, transports)
|
|
350
|
+
├── tools/ # 121 MCP tools organized by category
|
|
351
|
+
│ ├── pods.py # Pod management & diagnostics
|
|
352
|
+
│ ├── deployments.py # Deployments, StatefulSets, DaemonSets
|
|
353
|
+
│ ├── core.py # Namespaces, ConfigMaps, Secrets
|
|
354
|
+
│ ├── cluster.py # Context/cluster management
|
|
355
|
+
│ ├── networking.py # Services, Ingress, NetworkPolicies
|
|
356
|
+
│ ├── storage.py # PVCs, StorageClasses, PVs
|
|
357
|
+
│ ├── security.py # RBAC, ServiceAccounts, PodSecurity
|
|
358
|
+
│ ├── helm.py # Complete Helm v3 operations
|
|
359
|
+
│ ├── operations.py # kubectl apply/patch/describe/etc
|
|
360
|
+
│ ├── diagnostics.py # Metrics, namespace comparison
|
|
361
|
+
│ └── cost.py # Resource optimization & cost analysis
|
|
362
|
+
├── resources/ # 8 MCP Resources for data exposure
|
|
363
|
+
├── prompts/ # 8 MCP Prompts for workflows
|
|
364
|
+
└── cli/ # CLI interface
|
|
365
|
+
```
|
|
366
|
+
|
|
264
367
|
## Multi-Cluster Support
|
|
265
368
|
|
|
266
369
|
```bash
|
|
@@ -313,12 +416,14 @@ pytest tests/ -v -m unit
|
|
|
313
416
|
tests/
|
|
314
417
|
├── __init__.py # Test package
|
|
315
418
|
├── conftest.py # Shared fixtures and mocks
|
|
316
|
-
├── test_tools.py # Unit tests for
|
|
317
|
-
├── test_resources.py # Tests for MCP Resources
|
|
318
|
-
├── test_prompts.py # Tests for MCP Prompts
|
|
419
|
+
├── test_tools.py # Unit tests for 121 MCP tools
|
|
420
|
+
├── test_resources.py # Tests for 8 MCP Resources
|
|
421
|
+
├── test_prompts.py # Tests for 8 MCP Prompts
|
|
319
422
|
└── test_server.py # Server initialization tests
|
|
320
423
|
```
|
|
321
424
|
|
|
425
|
+
**135 tests covering**: tool registration, resource exposure, prompt generation, server initialization, non-destructive mode, secret masking, error handling, and transport methods.
|
|
426
|
+
|
|
322
427
|
### Code Quality
|
|
323
428
|
|
|
324
429
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kubectl-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants like Claude, Cursor, and others to interact with Kubernetes clusters through natural language",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kubernetes",
|