kubectl-mcp-server 1.9.0 → 1.11.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.
Files changed (2) hide show
  1. package/README.md +166 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,10 +6,10 @@ A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants
6
6
  [![Python](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/)
7
7
  [![Kubernetes](https://img.shields.io/badge/kubernetes-%23326ce5.svg?style=flat&logo=kubernetes&logoColor=white)](https://kubernetes.io/)
8
8
  [![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io)
9
- [![PyPI](https://img.shields.io/pypi/v/kubectl-mcp-tool?color=blue&label=PyPI)](https://pypi.org/project/kubectl-mcp-tool/)
9
+ [![PyPI](https://img.shields.io/pypi/v/kubectl-mcp-server?color=blue&label=PyPI)](https://pypi.org/project/kubectl-mcp-server/)
10
10
  [![npm](https://img.shields.io/npm/v/kubectl-mcp-server?color=green&label=npm)](https://www.npmjs.com/package/kubectl-mcp-server)
11
11
  [![Docker](https://img.shields.io/docker/pulls/rohitghumare64/kubectl-mcp-server.svg)](https://hub.docker.com/r/rohitghumare64/kubectl-mcp-server)
12
- [![Tests](https://img.shields.io/badge/tests-135%20passed-success)](https://github.com/rohitg00/kubectl-mcp-server)
12
+ [![Tests](https://img.shields.io/badge/tests-187%20passed-success)](https://github.com/rohitg00/kubectl-mcp-server)
13
13
 
14
14
  ## MCP Client Compatibility
15
15
 
@@ -132,6 +132,9 @@ npm install -g kubectl-mcp-server
132
132
  ### pip (Python)
133
133
 
134
134
  ```bash
135
+ pip install kubectl-mcp-server
136
+
137
+ # Legacy alias (still works for backward compatibility)
135
138
  pip install kubectl-mcp-tool
136
139
  ```
137
140
 
@@ -315,6 +318,83 @@ python -m kubectl_mcp_tool.mcp_server --transport http --port 8000
315
318
  | `MCP_DEBUG` | Set to `1` for verbose logging |
316
319
  | `MCP_LOG_FILE` | Path to log file |
317
320
 
321
+ ### Authentication (Enterprise)
322
+
323
+ | Variable | Description |
324
+ |----------|-------------|
325
+ | `MCP_AUTH_ENABLED` | Enable OAuth 2.1 authentication (default: `false`) |
326
+ | `MCP_AUTH_ISSUER` | OAuth 2.0 Authorization Server URL |
327
+ | `MCP_AUTH_JWKS_URI` | JWKS endpoint (optional, derived from issuer) |
328
+ | `MCP_AUTH_AUDIENCE` | Expected token audience (default: `kubectl-mcp-server`) |
329
+ | `MCP_AUTH_REQUIRED_SCOPES` | Required scopes (default: `mcp:tools`) |
330
+
331
+ ### Browser Automation (Optional)
332
+
333
+ | Variable | Description |
334
+ |----------|-------------|
335
+ | `MCP_BROWSER_ENABLED` | Enable browser automation tools (default: `false`) |
336
+
337
+ ## Browser Tools (Optional Module)
338
+
339
+ Enable browser automation for web-based K8s operations using [agent-browser](https://github.com/vercel-labs/agent-browser).
340
+
341
+ ### Setup
342
+
343
+ ```bash
344
+ # Install agent-browser
345
+ npm install -g agent-browser
346
+ agent-browser install # Download Chromium
347
+
348
+ # Enable browser tools
349
+ export MCP_BROWSER_ENABLED=true
350
+ kubectl-mcp-server
351
+ ```
352
+
353
+ ### 19 Browser Tools
354
+
355
+ | Tool | Description |
356
+ |------|-------------|
357
+ | `browser_open` | Open URL in browser |
358
+ | `browser_snapshot` | Get page accessibility tree |
359
+ | `browser_click` | Click element by ref |
360
+ | `browser_fill` | Fill form field |
361
+ | `browser_screenshot` | Take screenshot |
362
+ | `browser_get_text` | Get element text |
363
+ | `browser_get_url` | Get current URL |
364
+ | `browser_wait` | Wait for element/text/timeout |
365
+ | `browser_close` | Close browser |
366
+ | `browser_test_ingress` | Test K8s service via Ingress |
367
+ | `browser_screenshot_service` | Screenshot K8s service UI |
368
+ | `browser_screenshot_grafana` | Screenshot Grafana dashboard |
369
+ | `browser_screenshot_argocd` | Screenshot ArgoCD app |
370
+ | `browser_health_check` | Health check web app |
371
+ | `browser_form_submit` | Fill and submit form |
372
+ | `browser_session_save` | Save browser session |
373
+ | `browser_session_load` | Load browser session |
374
+ | `browser_open_cloud_console` | Open EKS/GKE/AKS console |
375
+ | `browser_pdf_export` | Export page as PDF |
376
+
377
+ ### Use Cases
378
+
379
+ - **Test deployed apps** via Ingress URLs
380
+ - **Screenshot Grafana/ArgoCD** dashboards
381
+ - **Automate cloud console** operations (EKS, GKE, AKS)
382
+ - **Health check** web applications
383
+ - **Export monitoring dashboards** as PDF
384
+
385
+ ## MCP Authorization (RFC 9728)
386
+
387
+ For enterprise deployments, kubectl-mcp-server supports OAuth 2.1 authentication.
388
+
389
+ ```bash
390
+ export MCP_AUTH_ENABLED=true
391
+ export MCP_AUTH_ISSUER=https://your-idp.example.com
392
+ export MCP_AUTH_AUDIENCE=kubectl-mcp-server
393
+ kubectl-mcp-server --transport http --port 8000
394
+ ```
395
+
396
+ Supported identity providers: **Okta**, **Auth0**, **Keycloak**, **Microsoft Entra ID**, **Google OAuth**, and any OIDC-compliant provider.
397
+
318
398
  ## Docker MCP Toolkit
319
399
 
320
400
  Compatible with [Docker MCP Toolkit](https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit/):
@@ -331,6 +411,88 @@ docker mcp server enable kubectl-mcp-server
331
411
  docker mcp client connect claude
332
412
  ```
333
413
 
414
+ ## Kubernetes Deployment
415
+
416
+ Deploy kubectl-mcp-server directly in your Kubernetes cluster for centralized access.
417
+
418
+ ### kMCP Deployment (Recommended)
419
+
420
+ [kMCP](https://github.com/kagent-dev/kmcp) is a development platform and control plane for MCP servers. See [kMCP quickstart](https://kagent.dev/docs/kmcp/quickstart).
421
+
422
+ ```bash
423
+ # Install kmcp CLI
424
+ curl -fsSL https://raw.githubusercontent.com/kagent-dev/kmcp/refs/heads/main/scripts/get-kmcp.sh | bash
425
+
426
+ # Install kmcp controller in your cluster
427
+ helm install kmcp-crds oci://ghcr.io/kagent-dev/kmcp/helm/kmcp-crds \
428
+ --namespace kmcp-system --create-namespace
429
+ kmcp install
430
+
431
+ # Deploy kubectl-mcp-server using npx (easiest)
432
+ kmcp deploy package --deployment-name kubectl-mcp-server \
433
+ --manager npx --args kubectl-mcp-server
434
+
435
+ # Or deploy using our Docker image with the MCPServer manifest
436
+ kmcp deploy --file deploy/kmcp/kmcp.yaml --image rohitghumare64/kubectl-mcp-server:latest
437
+ ```
438
+
439
+ ### Standard Kubernetes Deployment
440
+
441
+ Deploy using kubectl/kustomize without kMCP:
442
+
443
+ ```bash
444
+ # Using kustomize (recommended)
445
+ kubectl apply -k deploy/kubernetes/
446
+
447
+ # Or apply individual manifests
448
+ kubectl apply -f deploy/kubernetes/namespace.yaml
449
+ kubectl apply -f deploy/kubernetes/rbac.yaml
450
+ kubectl apply -f deploy/kubernetes/deployment.yaml
451
+ kubectl apply -f deploy/kubernetes/service.yaml
452
+
453
+ # Access via port-forward
454
+ kubectl port-forward -n kubectl-mcp svc/kubectl-mcp-server 8000:8000
455
+ ```
456
+
457
+ ### MCPServer Custom Resource
458
+
459
+ For kMCP deployments, apply this MCPServer resource:
460
+
461
+ ```yaml
462
+ apiVersion: kagent.dev/v1alpha1
463
+ kind: MCPServer
464
+ metadata:
465
+ name: kubectl-mcp-server
466
+ spec:
467
+ deployment:
468
+ image: "rohitghumare64/kubectl-mcp-server:latest"
469
+ port: 8000
470
+ transportType: http
471
+ httpTransport:
472
+ targetPort: 8000
473
+ path: /mcp
474
+ ```
475
+
476
+ See [deploy/](deploy/) for full manifests and configuration options.
477
+
478
+ ### kagent Integration (AI Agents)
479
+
480
+ [kagent](https://github.com/kagent-dev/kagent) is a Kubernetes-native AI agent framework (CNCF project). Register kubectl-mcp-server as a ToolServer to give your agents 121 K8s management tools.
481
+
482
+ ```bash
483
+ # Install kagent
484
+ brew install kagent
485
+ kagent install --profile demo
486
+
487
+ # Register kubectl-mcp-server as a ToolServer
488
+ kubectl apply -f deploy/kagent/toolserver-stdio.yaml
489
+
490
+ # Open kagent dashboard and chat with your K8s agent
491
+ kagent dashboard
492
+ ```
493
+
494
+ See [kagent quickstart](https://kagent.dev/docs/kagent/getting-started/quickstart) for full documentation.
495
+
334
496
  ## Architecture
335
497
 
336
498
  ```
@@ -422,7 +584,7 @@ tests/
422
584
  └── test_server.py # Server initialization tests
423
585
  ```
424
586
 
425
- **135 tests covering**: tool registration, resource exposure, prompt generation, server initialization, non-destructive mode, secret masking, error handling, and transport methods.
587
+ **138 tests covering**: tool registration, resource exposure, prompt generation, server initialization, non-destructive mode, secret masking, error handling, and transport methods.
426
588
 
427
589
  ### Code Quality
428
590
 
@@ -450,7 +612,7 @@ MIT License - see [LICENSE](LICENSE) for details.
450
612
 
451
613
  ## Links
452
614
 
453
- - [PyPI Package](https://pypi.org/project/kubectl-mcp-tool/)
615
+ - [PyPI Package](https://pypi.org/project/kubectl-mcp-server/)
454
616
  - [npm Package](https://www.npmjs.com/package/kubectl-mcp-server)
455
617
  - [Docker Hub](https://hub.docker.com/r/rohitghumare64/kubectl-mcp-server)
456
618
  - [GitHub Issues](https://github.com/rohitg00/kubectl-mcp-server/issues)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubectl-mcp-server",
3
- "version": "1.9.0",
3
+ "version": "1.11.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",