kubectl-mcp-server 1.9.0 → 1.10.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 +107 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants
|
|
|
9
9
|
[](https://pypi.org/project/kubectl-mcp-tool/)
|
|
10
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
13
|
|
|
14
14
|
## MCP Client Compatibility
|
|
15
15
|
|
|
@@ -315,6 +315,29 @@ python -m kubectl_mcp_tool.mcp_server --transport http --port 8000
|
|
|
315
315
|
| `MCP_DEBUG` | Set to `1` for verbose logging |
|
|
316
316
|
| `MCP_LOG_FILE` | Path to log file |
|
|
317
317
|
|
|
318
|
+
### Authentication (Enterprise)
|
|
319
|
+
|
|
320
|
+
| Variable | Description |
|
|
321
|
+
|----------|-------------|
|
|
322
|
+
| `MCP_AUTH_ENABLED` | Enable OAuth 2.1 authentication (default: `false`) |
|
|
323
|
+
| `MCP_AUTH_ISSUER` | OAuth 2.0 Authorization Server URL |
|
|
324
|
+
| `MCP_AUTH_JWKS_URI` | JWKS endpoint (optional, derived from issuer) |
|
|
325
|
+
| `MCP_AUTH_AUDIENCE` | Expected token audience (default: `kubectl-mcp-server`) |
|
|
326
|
+
| `MCP_AUTH_REQUIRED_SCOPES` | Required scopes (default: `mcp:tools`) |
|
|
327
|
+
|
|
328
|
+
## MCP Authorization (RFC 9728)
|
|
329
|
+
|
|
330
|
+
For enterprise deployments, kubectl-mcp-server supports OAuth 2.1 authentication.
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
export MCP_AUTH_ENABLED=true
|
|
334
|
+
export MCP_AUTH_ISSUER=https://your-idp.example.com
|
|
335
|
+
export MCP_AUTH_AUDIENCE=kubectl-mcp-server
|
|
336
|
+
kubectl-mcp-server --transport http --port 8000
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
Supported identity providers: **Okta**, **Auth0**, **Keycloak**, **Microsoft Entra ID**, **Google OAuth**, and any OIDC-compliant provider.
|
|
340
|
+
|
|
318
341
|
## Docker MCP Toolkit
|
|
319
342
|
|
|
320
343
|
Compatible with [Docker MCP Toolkit](https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit/):
|
|
@@ -331,6 +354,88 @@ docker mcp server enable kubectl-mcp-server
|
|
|
331
354
|
docker mcp client connect claude
|
|
332
355
|
```
|
|
333
356
|
|
|
357
|
+
## Kubernetes Deployment
|
|
358
|
+
|
|
359
|
+
Deploy kubectl-mcp-server directly in your Kubernetes cluster for centralized access.
|
|
360
|
+
|
|
361
|
+
### kMCP Deployment (Recommended)
|
|
362
|
+
|
|
363
|
+
[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).
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
# Install kmcp CLI
|
|
367
|
+
curl -fsSL https://raw.githubusercontent.com/kagent-dev/kmcp/refs/heads/main/scripts/get-kmcp.sh | bash
|
|
368
|
+
|
|
369
|
+
# Install kmcp controller in your cluster
|
|
370
|
+
helm install kmcp-crds oci://ghcr.io/kagent-dev/kmcp/helm/kmcp-crds \
|
|
371
|
+
--namespace kmcp-system --create-namespace
|
|
372
|
+
kmcp install
|
|
373
|
+
|
|
374
|
+
# Deploy kubectl-mcp-server using npx (easiest)
|
|
375
|
+
kmcp deploy package --deployment-name kubectl-mcp-server \
|
|
376
|
+
--manager npx --args kubectl-mcp-server
|
|
377
|
+
|
|
378
|
+
# Or deploy using our Docker image with the MCPServer manifest
|
|
379
|
+
kmcp deploy --file deploy/kmcp/kmcp.yaml --image rohitghumare64/kubectl-mcp-server:latest
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Standard Kubernetes Deployment
|
|
383
|
+
|
|
384
|
+
Deploy using kubectl/kustomize without kMCP:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
# Using kustomize (recommended)
|
|
388
|
+
kubectl apply -k deploy/kubernetes/
|
|
389
|
+
|
|
390
|
+
# Or apply individual manifests
|
|
391
|
+
kubectl apply -f deploy/kubernetes/namespace.yaml
|
|
392
|
+
kubectl apply -f deploy/kubernetes/rbac.yaml
|
|
393
|
+
kubectl apply -f deploy/kubernetes/deployment.yaml
|
|
394
|
+
kubectl apply -f deploy/kubernetes/service.yaml
|
|
395
|
+
|
|
396
|
+
# Access via port-forward
|
|
397
|
+
kubectl port-forward -n kubectl-mcp svc/kubectl-mcp-server 8000:8000
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### MCPServer Custom Resource
|
|
401
|
+
|
|
402
|
+
For kMCP deployments, apply this MCPServer resource:
|
|
403
|
+
|
|
404
|
+
```yaml
|
|
405
|
+
apiVersion: kagent.dev/v1alpha1
|
|
406
|
+
kind: MCPServer
|
|
407
|
+
metadata:
|
|
408
|
+
name: kubectl-mcp-server
|
|
409
|
+
spec:
|
|
410
|
+
deployment:
|
|
411
|
+
image: "rohitghumare64/kubectl-mcp-server:latest"
|
|
412
|
+
port: 8000
|
|
413
|
+
transportType: http
|
|
414
|
+
httpTransport:
|
|
415
|
+
targetPort: 8000
|
|
416
|
+
path: /mcp
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
See [deploy/](deploy/) for full manifests and configuration options.
|
|
420
|
+
|
|
421
|
+
### kagent Integration (AI Agents)
|
|
422
|
+
|
|
423
|
+
[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.
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
# Install kagent
|
|
427
|
+
brew install kagent
|
|
428
|
+
kagent install --profile demo
|
|
429
|
+
|
|
430
|
+
# Register kubectl-mcp-server as a ToolServer
|
|
431
|
+
kubectl apply -f deploy/kagent/toolserver-stdio.yaml
|
|
432
|
+
|
|
433
|
+
# Open kagent dashboard and chat with your K8s agent
|
|
434
|
+
kagent dashboard
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
See [kagent quickstart](https://kagent.dev/docs/kagent/getting-started/quickstart) for full documentation.
|
|
438
|
+
|
|
334
439
|
## Architecture
|
|
335
440
|
|
|
336
441
|
```
|
|
@@ -422,7 +527,7 @@ tests/
|
|
|
422
527
|
└── test_server.py # Server initialization tests
|
|
423
528
|
```
|
|
424
529
|
|
|
425
|
-
**
|
|
530
|
+
**138 tests covering**: tool registration, resource exposure, prompt generation, server initialization, non-destructive mode, secret masking, error handling, and transport methods.
|
|
426
531
|
|
|
427
532
|
### Code Quality
|
|
428
533
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kubectl-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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",
|