@futuretea/rancher-mcp-server 0.4.5 → 0.5.1
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 +271 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -24,6 +24,10 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for Ra
|
|
|
24
24
|
- Analyze node health and resource usage
|
|
25
25
|
- Inspect pods with parent workload, metrics, and logs
|
|
26
26
|
- Show dependency/dependent trees for any resource (inspired by kube-lineage)
|
|
27
|
+
- **Get all resources** (inspired by [ketall](https://github.com/corneliusweig/ketall)): List all Kubernetes resources including ConfigMaps, Secrets, RBAC, CRDs
|
|
28
|
+
- **Compare resource versions** (kubernetes_diff): Show git-style diffs between two resource versions
|
|
29
|
+
- **Watch resource changes** (kubernetes_watch): Monitor resources and return git-style diffs at regular intervals
|
|
30
|
+
- **Resource capacity overview** (inspired by [kube-capacity](https://github.com/robscott/kube-capacity)): Show cluster resource capacity, requests, limits, and utilization
|
|
27
31
|
- **Rancher Resources via Norman API**: List clusters and projects
|
|
28
32
|
- **Security Controls**:
|
|
29
33
|
- `read_only`: Disables create, patch, and delete operations
|
|
@@ -282,6 +286,133 @@ Tools are organized into toolsets. Use `--toolsets` to enable specific sets or `
|
|
|
282
286
|
|
|
283
287
|
### kubernetes
|
|
284
288
|
|
|
289
|
+
<details>
|
|
290
|
+
<summary>kubernetes_capacity</summary>
|
|
291
|
+
|
|
292
|
+
Show Kubernetes cluster resource capacity, requests, limits, and utilization. Similar to [kube-capacity](https://github.com/robscott/kube-capacity) CLI tool.
|
|
293
|
+
|
|
294
|
+
| Parameter | Type | Required | Description |
|
|
295
|
+
|-----------|------|----------|-------------|
|
|
296
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
297
|
+
| `pods` | boolean | No | Include individual pod resources in the output (default: false) |
|
|
298
|
+
| `containers` | boolean | No | Include individual container resources in the output (implies pods=true) (default: false) |
|
|
299
|
+
| `util` | boolean | No | Include actual resource utilization from metrics-server (requires metrics-server) (default: false) |
|
|
300
|
+
| `available` | boolean | No | Show raw available capacity instead of percentages (default: false) |
|
|
301
|
+
| `podCount` | boolean | No | Include pod counts for each node and the whole cluster (default: false) |
|
|
302
|
+
| `showLabels` | boolean | No | Include node labels in the output (default: false) |
|
|
303
|
+
| `hideRequests` | boolean | No | Hide request columns from output (default: false) |
|
|
304
|
+
| `hideLimits` | boolean | No | Hide limit columns from output (default: false) |
|
|
305
|
+
| `namespace` | string | No | Filter by namespace (empty for all namespaces) |
|
|
306
|
+
| `labelSelector` | string | No | Filter pods by label selector (e.g., "app=nginx,env=prod") |
|
|
307
|
+
| `nodeLabelSelector` | string | No | Filter nodes by label selector (e.g., "node-role.kubernetes.io/worker=true") |
|
|
308
|
+
| `namespaceLabelSelector` | string | No | Filter namespaces by label selector (e.g., "env=production") |
|
|
309
|
+
| `nodeTaints` | string | No | Filter nodes by taints. Use 'key=value:effect' to include, 'key=value:effect-' to exclude. Multiple taints can be separated by comma |
|
|
310
|
+
| `noTaint` | boolean | No | Exclude nodes with any taints (default: false) |
|
|
311
|
+
| `sortBy` | string | No | Sort by: cpu.util, mem.util, cpu.request, mem.request, cpu.limit, mem.limit, cpu.util.percentage, mem.util.percentage, name |
|
|
312
|
+
| `format` | string | No | Output format: table, json, yaml (default: table) |
|
|
313
|
+
|
|
314
|
+
**Examples:**
|
|
315
|
+
|
|
316
|
+
```json
|
|
317
|
+
// Basic node overview
|
|
318
|
+
{
|
|
319
|
+
"cluster": "c-abc123"
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Include pods detail
|
|
323
|
+
{
|
|
324
|
+
"cluster": "c-abc123",
|
|
325
|
+
"pods": true
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// Include utilization metrics (requires metrics-server)
|
|
329
|
+
{
|
|
330
|
+
"cluster": "c-abc123",
|
|
331
|
+
"util": true
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Full detail with utilization
|
|
335
|
+
{
|
|
336
|
+
"cluster": "c-abc123",
|
|
337
|
+
"pods": true,
|
|
338
|
+
"util": true
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Filter by namespace
|
|
342
|
+
{
|
|
343
|
+
"cluster": "c-abc123",
|
|
344
|
+
"namespace": "production"
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// Sort by CPU utilization
|
|
348
|
+
{
|
|
349
|
+
"cluster": "c-abc123",
|
|
350
|
+
"sortBy": "cpu.util"
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// Filter by node labels (show only worker nodes)
|
|
354
|
+
{
|
|
355
|
+
"cluster": "c-abc123",
|
|
356
|
+
"nodeLabelSelector": "node-role.kubernetes.io/worker=true"
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// Include container-level details
|
|
360
|
+
{
|
|
361
|
+
"cluster": "c-abc123",
|
|
362
|
+
"containers": true
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Show pod counts per node
|
|
366
|
+
{
|
|
367
|
+
"cluster": "c-abc123",
|
|
368
|
+
"podCount": true
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// Show node labels in output
|
|
372
|
+
{
|
|
373
|
+
"cluster": "c-abc123",
|
|
374
|
+
"showLabels": true
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// Hide request columns (show only limits)
|
|
378
|
+
{
|
|
379
|
+
"cluster": "c-abc123",
|
|
380
|
+
"hideRequests": true
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// Filter by namespace labels
|
|
384
|
+
{
|
|
385
|
+
"cluster": "c-abc123",
|
|
386
|
+
"namespaceLabelSelector": "env=production"
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// Filter by node taints (include nodes with specific taint)
|
|
390
|
+
{
|
|
391
|
+
"cluster": "c-abc123",
|
|
392
|
+
"nodeTaints": "dedicated=special:NoSchedule"
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// Exclude nodes with specific taint
|
|
396
|
+
{
|
|
397
|
+
"cluster": "c-abc123",
|
|
398
|
+
"nodeTaints": "dedicated=special:NoSchedule-"
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// Exclude all tainted nodes
|
|
402
|
+
{
|
|
403
|
+
"cluster": "c-abc123",
|
|
404
|
+
"noTaint": true
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// Sort by CPU utilization percentage
|
|
408
|
+
{
|
|
409
|
+
"cluster": "c-abc123",
|
|
410
|
+
"sortBy": "cpu.util.percentage"
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
</details>
|
|
415
|
+
|
|
285
416
|
<details>
|
|
286
417
|
<summary>kubernetes_dep</summary>
|
|
287
418
|
|
|
@@ -413,6 +544,146 @@ Describe a Kubernetes resource with its related events. Similar to `kubectl desc
|
|
|
413
544
|
|
|
414
545
|
</details>
|
|
415
546
|
|
|
547
|
+
<details>
|
|
548
|
+
<summary>kubernetes_diff</summary>
|
|
549
|
+
|
|
550
|
+
Compare two Kubernetes resource versions and show the differences as a git-style diff. Useful for comparing current vs desired state, or before/after changes.
|
|
551
|
+
|
|
552
|
+
| Parameter | Type | Required | Description |
|
|
553
|
+
|-----------|------|----------|-------------|
|
|
554
|
+
| `resource1` | string | Yes | First resource version as JSON string (the 'before' or 'old' version). Use kubernetes_get to retrieve the resource. |
|
|
555
|
+
| `resource2` | string | Yes | Second resource version as JSON string (the 'after' or 'new' version). Use kubernetes_get to retrieve the resource. |
|
|
556
|
+
| `ignoreStatus` | boolean | No | Ignore changes under the status field when computing diffs (default: false) |
|
|
557
|
+
| `ignoreMeta` | boolean | No | Ignore non-essential metadata differences like managedFields, resourceVersion, etc. (default: false) |
|
|
558
|
+
|
|
559
|
+
**Examples:**
|
|
560
|
+
|
|
561
|
+
```json
|
|
562
|
+
// Compare two versions of the same deployment
|
|
563
|
+
// First, get the current resource
|
|
564
|
+
{
|
|
565
|
+
"cluster": "c-abc123",
|
|
566
|
+
"kind": "deployment",
|
|
567
|
+
"namespace": "default",
|
|
568
|
+
"name": "nginx"
|
|
569
|
+
}
|
|
570
|
+
// Then compare with previous version (from rollout history)
|
|
571
|
+
{
|
|
572
|
+
"resource1": "<previous-revision-json>",
|
|
573
|
+
"resource2": "<current-revision-json>",
|
|
574
|
+
"ignoreMeta": true
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
</details>
|
|
579
|
+
|
|
580
|
+
<details>
|
|
581
|
+
<summary>kubernetes_get_all</summary>
|
|
582
|
+
|
|
583
|
+
Get really all Kubernetes resources in the cluster (inspired by [ketall](https://github.com/corneliusweig/ketall)). Unlike `kubectl get all`, this shows all resource types including ConfigMaps, Secrets, RBAC resources, CRDs, and other resources that are normally hidden.
|
|
584
|
+
|
|
585
|
+
| Parameter | Type | Required | Description |
|
|
586
|
+
|-----------|------|----------|-------------|
|
|
587
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
588
|
+
| `namespace` | string | No | Filter by namespace (optional, empty for all namespaces) |
|
|
589
|
+
| `name` | string | No | Filter by resource name (partial match, client-side) |
|
|
590
|
+
| `labelSelector` | string | No | Label selector for filtering (e.g., "app=nginx,env=prod") |
|
|
591
|
+
| `excludeEvents` | boolean | No | Exclude events from output (default: true, as events are often noisy) |
|
|
592
|
+
| `scope` | string | No | Filter by scope: 'namespaced' for namespaced resources only, 'cluster' for cluster-scoped resources only, or empty for all |
|
|
593
|
+
| `since` | string | No | Only show resources created since this duration (e.g., '1h30m', '2d', '1w') |
|
|
594
|
+
| `limit` | integer | No | Limit number of resources per API call (0 for no limit, default: 0) |
|
|
595
|
+
| `format` | string | No | Output format: json, table, yaml (default: table) |
|
|
596
|
+
|
|
597
|
+
**Examples:**
|
|
598
|
+
|
|
599
|
+
```json
|
|
600
|
+
// Get all resources in the cluster
|
|
601
|
+
{
|
|
602
|
+
"cluster": "c-abc123"
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// Get all resources in a specific namespace
|
|
606
|
+
{
|
|
607
|
+
"cluster": "c-abc123",
|
|
608
|
+
"namespace": "production"
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// Get only cluster-scoped resources
|
|
612
|
+
{
|
|
613
|
+
"cluster": "c-abc123",
|
|
614
|
+
"scope": "cluster"
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
// Get resources created in the last 24 hours
|
|
618
|
+
{
|
|
619
|
+
"cluster": "c-abc123",
|
|
620
|
+
"since": "24h"
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// Get all resources with specific labels
|
|
624
|
+
{
|
|
625
|
+
"cluster": "c-abc123",
|
|
626
|
+
"labelSelector": "app=nginx,env=prod"
|
|
627
|
+
}
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
</details>
|
|
631
|
+
|
|
632
|
+
<details>
|
|
633
|
+
<summary>kubernetes_watch</summary>
|
|
634
|
+
|
|
635
|
+
Watch Kubernetes resources and return git-style diffs of changes at regular intervals, similar to the Linux `watch` command.
|
|
636
|
+
|
|
637
|
+
| Parameter | Type | Required | Description |
|
|
638
|
+
|-----------|------|----------|-------------|
|
|
639
|
+
| `cluster` | string | Yes | Cluster ID |
|
|
640
|
+
| `kind` | string | Yes | Resource kind (e.g., pod, deployment, service, or dotted `resource.group` form) |
|
|
641
|
+
| `namespace` | string | No | Namespace (empty = all namespaces or cluster-scoped resources) |
|
|
642
|
+
| `labelSelector` | string | No | Label selector (e.g., "app=nginx,env=prod") |
|
|
643
|
+
| `fieldSelector` | string | No | Field selector for filtering resources |
|
|
644
|
+
| `ignoreStatus` | boolean | No | Ignore changes under the `status` field when computing diffs (similar to `--no-status`) |
|
|
645
|
+
| `ignoreMeta` | boolean | No | Ignore non-essential metadata differences (similar to `--no-meta`) |
|
|
646
|
+
| `intervalSeconds` | integer | No | Interval in seconds between evaluations (default: 10, min: 1, max: 600) |
|
|
647
|
+
| `iterations` | integer | No | Number of times to re-evaluate and diff before returning (default: 6, min: 1, max: 100) |
|
|
648
|
+
|
|
649
|
+
**Notes:**
|
|
650
|
+
- Each iteration compares the current resource state with the previous iteration and only emits diffs when there are changes.
|
|
651
|
+
- The tool returns the concatenated diffs for all iterations in a single response.
|
|
652
|
+
|
|
653
|
+
**Examples:**
|
|
654
|
+
|
|
655
|
+
```json
|
|
656
|
+
// Watch pods in a namespace for changes
|
|
657
|
+
{
|
|
658
|
+
"cluster": "c-abc123",
|
|
659
|
+
"kind": "pod",
|
|
660
|
+
"namespace": "production",
|
|
661
|
+
"intervalSeconds": 5,
|
|
662
|
+
"iterations": 3
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
// Watch deployments and ignore status changes
|
|
666
|
+
{
|
|
667
|
+
"cluster": "c-abc123",
|
|
668
|
+
"kind": "deployment",
|
|
669
|
+
"namespace": "default",
|
|
670
|
+
"ignoreStatus": true,
|
|
671
|
+
"intervalSeconds": 10,
|
|
672
|
+
"iterations": 6
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
// Watch resources by label selector
|
|
676
|
+
{
|
|
677
|
+
"cluster": "c-abc123",
|
|
678
|
+
"kind": "pod",
|
|
679
|
+
"labelSelector": "app=nginx",
|
|
680
|
+
"intervalSeconds": 5,
|
|
681
|
+
"iterations": 12
|
|
682
|
+
}
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
</details>
|
|
686
|
+
|
|
416
687
|
<details>
|
|
417
688
|
<summary>kubernetes_events</summary>
|
|
418
689
|
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futuretea/rancher-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for Rancher multi-cluster management",
|
|
5
5
|
"main": "./bin/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"rancher-mcp-server": "bin/index.js"
|
|
8
8
|
},
|
|
9
9
|
"optionalDependencies": {
|
|
10
|
-
"@futuretea/rancher-mcp-server-darwin-amd64": "0.
|
|
11
|
-
"@futuretea/rancher-mcp-server-darwin-arm64": "0.
|
|
12
|
-
"@futuretea/rancher-mcp-server-linux-amd64": "0.
|
|
13
|
-
"@futuretea/rancher-mcp-server-linux-arm64": "0.
|
|
14
|
-
"@futuretea/rancher-mcp-server-windows-amd64": "0.
|
|
15
|
-
"@futuretea/rancher-mcp-server-windows-arm64": "0.
|
|
10
|
+
"@futuretea/rancher-mcp-server-darwin-amd64": "0.5.1",
|
|
11
|
+
"@futuretea/rancher-mcp-server-darwin-arm64": "0.5.1",
|
|
12
|
+
"@futuretea/rancher-mcp-server-linux-amd64": "0.5.1",
|
|
13
|
+
"@futuretea/rancher-mcp-server-linux-arm64": "0.5.1",
|
|
14
|
+
"@futuretea/rancher-mcp-server-windows-amd64": "0.5.1",
|
|
15
|
+
"@futuretea/rancher-mcp-server-windows-arm64": "0.5.1"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|