mcp-server-kubernetes 3.0.4 → 3.1.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.
@@ -23,11 +23,11 @@ export declare const CustomContainerConfig: z.ZodObject<{
23
23
  limits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
24
24
  requests: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
25
25
  }, "strip", z.ZodTypeAny, {
26
- limits?: Record<string, string> | undefined;
27
26
  requests?: Record<string, string> | undefined;
28
- }, {
29
27
  limits?: Record<string, string> | undefined;
28
+ }, {
30
29
  requests?: Record<string, string> | undefined;
30
+ limits?: Record<string, string> | undefined;
31
31
  }>>;
32
32
  env: z.ZodOptional<z.ZodArray<z.ZodObject<{
33
33
  name: z.ZodString;
@@ -58,8 +58,8 @@ export declare const CustomContainerConfig: z.ZodObject<{
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  image: string;
60
60
  resources?: {
61
- limits?: Record<string, string> | undefined;
62
61
  requests?: Record<string, string> | undefined;
62
+ limits?: Record<string, string> | undefined;
63
63
  } | undefined;
64
64
  command?: string[] | undefined;
65
65
  args?: string[] | undefined;
@@ -81,8 +81,8 @@ export declare const CustomContainerConfig: z.ZodObject<{
81
81
  }, {
82
82
  image: string;
83
83
  resources?: {
84
- limits?: Record<string, string> | undefined;
85
84
  requests?: Record<string, string> | undefined;
85
+ limits?: Record<string, string> | undefined;
86
86
  } | undefined;
87
87
  command?: string[] | undefined;
88
88
  args?: string[] | undefined;
package/dist/index.d.ts CHANGED
@@ -149,45 +149,6 @@ declare const destructiveTools: ({
149
149
  };
150
150
  })[];
151
151
  declare const allTools: ({
152
- name: string;
153
- description: string;
154
- inputSchema: {
155
- type: string;
156
- properties: {
157
- name: {
158
- type: string;
159
- description: string;
160
- };
161
- chart: {
162
- type: string;
163
- description: string;
164
- };
165
- namespace: {
166
- type: "string";
167
- description: string;
168
- default: string;
169
- };
170
- context: {
171
- type: "string";
172
- description: string;
173
- default: string;
174
- };
175
- repo: {
176
- type: string;
177
- description: string;
178
- };
179
- values: {
180
- type: string;
181
- description: string;
182
- };
183
- valuesFile: {
184
- type: string;
185
- description: string;
186
- };
187
- };
188
- required: string[];
189
- };
190
- } | {
191
152
  name: string;
192
153
  description: string;
193
154
  annotations: {
@@ -342,44 +303,6 @@ declare const allTools: ({
342
303
  };
343
304
  };
344
305
  };
345
- } | {
346
- name: string;
347
- description: string;
348
- inputSchema: {
349
- type: string;
350
- properties: {
351
- name: {
352
- type: string;
353
- description: string;
354
- };
355
- namespace: {
356
- type: "string";
357
- description: string;
358
- default: string;
359
- };
360
- command: {
361
- type: string;
362
- items: {
363
- type: string;
364
- };
365
- description: string;
366
- };
367
- container: {
368
- type: string;
369
- description: string;
370
- };
371
- timeout: {
372
- type: string;
373
- description: string;
374
- };
375
- context: {
376
- type: "string";
377
- description: string;
378
- default: string;
379
- };
380
- };
381
- required: string[];
382
- };
383
306
  } | {
384
307
  readonly name: "cleanup";
385
308
  readonly description: "Cleanup all managed resources";
@@ -393,6 +316,9 @@ declare const allTools: ({
393
316
  } | {
394
317
  name: string;
395
318
  description: string;
319
+ annotations: {
320
+ title: string;
321
+ };
396
322
  inputSchema: {
397
323
  type: string;
398
324
  properties: {
@@ -417,43 +343,14 @@ declare const allTools: ({
417
343
  } | {
418
344
  name: string;
419
345
  description: string;
420
- inputSchema: {
421
- type: string;
422
- properties: {
423
- id: {
424
- type: string;
425
- };
426
- };
427
- required: string[];
346
+ annotations: {
347
+ title: string;
428
348
  };
429
- } | {
430
- name: string;
431
- description: string;
432
349
  inputSchema: {
433
350
  type: string;
434
351
  properties: {
435
- name: {
436
- type: string;
437
- description: string;
438
- };
439
- namespace: {
440
- type: "string";
441
- description: string;
442
- default: string;
443
- };
444
- replicas: {
445
- type: string;
446
- description: string;
447
- };
448
- resourceType: {
352
+ id: {
449
353
  type: string;
450
- description: string;
451
- default: string;
452
- };
453
- context: {
454
- type: "string";
455
- description: string;
456
- default: string;
457
354
  };
458
355
  };
459
356
  required: string[];
@@ -587,6 +484,9 @@ declare const allTools: ({
587
484
  } | {
588
485
  readonly name: "kubectl_apply";
589
486
  readonly description: "Apply a Kubernetes YAML manifest from a string or file";
487
+ readonly annotations: {
488
+ readonly destructiveHint: true;
489
+ };
590
490
  readonly inputSchema: {
591
491
  readonly type: "object";
592
492
  readonly properties: {
@@ -868,104 +768,6 @@ declare const allTools: ({
868
768
  };
869
769
  readonly required: readonly ["resourceType", "name", "namespace"];
870
770
  };
871
- } | {
872
- name: string;
873
- description: string;
874
- inputSchema: {
875
- type: string;
876
- properties: {
877
- resourceType: {
878
- type: string;
879
- description: string;
880
- };
881
- name: {
882
- type: string;
883
- description: string;
884
- };
885
- namespace: {
886
- type: "string";
887
- description: string;
888
- default: string;
889
- };
890
- patchType: {
891
- type: string;
892
- description: string;
893
- enum: string[];
894
- default: string;
895
- };
896
- patchData: {
897
- type: string;
898
- description: string;
899
- };
900
- patchFile: {
901
- type: string;
902
- description: string;
903
- };
904
- dryRun: {
905
- type: "boolean";
906
- description: string;
907
- default: boolean;
908
- };
909
- context: {
910
- type: "string";
911
- description: string;
912
- default: string;
913
- };
914
- };
915
- required: string[];
916
- };
917
- } | {
918
- name: string;
919
- description: string;
920
- inputSchema: {
921
- type: string;
922
- properties: {
923
- subCommand: {
924
- type: string;
925
- description: string;
926
- enum: string[];
927
- default: string;
928
- };
929
- resourceType: {
930
- type: string;
931
- description: string;
932
- enum: string[];
933
- default: string;
934
- };
935
- name: {
936
- type: string;
937
- description: string;
938
- };
939
- namespace: {
940
- type: "string";
941
- description: string;
942
- default: string;
943
- };
944
- revision: {
945
- type: string;
946
- description: string;
947
- };
948
- toRevision: {
949
- type: string;
950
- description: string;
951
- };
952
- timeout: {
953
- type: string;
954
- description: string;
955
- };
956
- watch: {
957
- type: string;
958
- description: string;
959
- default: boolean;
960
- };
961
- context: {
962
- type: "string";
963
- description: string;
964
- default: string;
965
- };
966
- };
967
- required: string[];
968
- };
969
771
  } | {
970
772
  name: string;
971
773
  description: string;
@@ -18,6 +18,9 @@ import { KubernetesManager } from "../types.js";
18
18
  export declare const execInPodSchema: {
19
19
  name: string;
20
20
  description: string;
21
+ annotations: {
22
+ destructiveHint: boolean;
23
+ };
21
24
  inputSchema: {
22
25
  type: string;
23
26
  properties: {
@@ -21,6 +21,9 @@ import { contextParameter, namespaceParameter } from "../models/common-parameter
21
21
  export const execInPodSchema = {
22
22
  name: "exec_in_pod",
23
23
  description: "Execute a command in a Kubernetes pod or container and return the output. Command must be an array of strings where the first element is the executable and remaining elements are arguments. This executes directly without shell interpretation for security.",
24
+ annotations: {
25
+ destructiveHint: true,
26
+ },
24
27
  inputSchema: {
25
28
  type: "object",
26
29
  properties: {
@@ -19,6 +19,9 @@ import { HelmInstallOperation, HelmUpgradeOperation, HelmUninstallOperation } fr
19
19
  export declare const installHelmChartSchema: {
20
20
  name: string;
21
21
  description: string;
22
+ annotations: {
23
+ destructiveHint: boolean;
24
+ };
22
25
  inputSchema: {
23
26
  type: string;
24
27
  properties: {
@@ -78,6 +81,9 @@ export declare const installHelmChartSchema: {
78
81
  export declare const upgradeHelmChartSchema: {
79
82
  name: string;
80
83
  description: string;
84
+ annotations: {
85
+ destructiveHint: boolean;
86
+ };
81
87
  inputSchema: {
82
88
  type: string;
83
89
  properties: {
@@ -23,6 +23,9 @@ import { contextParameter, namespaceParameter, } from "../models/common-paramete
23
23
  export const installHelmChartSchema = {
24
24
  name: "install_helm_chart",
25
25
  description: "Install a Helm chart with support for both standard and template-based installation",
26
+ annotations: {
27
+ destructiveHint: true,
28
+ },
26
29
  inputSchema: {
27
30
  type: "object",
28
31
  properties: {
@@ -74,6 +77,9 @@ export const installHelmChartSchema = {
74
77
  export const upgradeHelmChartSchema = {
75
78
  name: "upgrade_helm_chart",
76
79
  description: "Upgrade an existing Helm chart release",
80
+ annotations: {
81
+ destructiveHint: true,
82
+ },
77
83
  inputSchema: {
78
84
  type: "object",
79
85
  properties: {
@@ -2,6 +2,9 @@ import { KubernetesManager } from "../types.js";
2
2
  export declare const kubectlApplySchema: {
3
3
  readonly name: "kubectl_apply";
4
4
  readonly description: "Apply a Kubernetes YAML manifest from a string or file";
5
+ readonly annotations: {
6
+ readonly destructiveHint: true;
7
+ };
5
8
  readonly inputSchema: {
6
9
  readonly type: "object";
7
10
  readonly properties: {
@@ -8,6 +8,9 @@ import { contextParameter, namespaceParameter, dryRunParameter } from "../models
8
8
  export const kubectlApplySchema = {
9
9
  name: "kubectl_apply",
10
10
  description: "Apply a Kubernetes YAML manifest from a string or file",
11
+ annotations: {
12
+ destructiveHint: true,
13
+ },
11
14
  inputSchema: {
12
15
  type: "object",
13
16
  properties: {
@@ -2,6 +2,9 @@ import { KubernetesManager } from "../types.js";
2
2
  export declare const kubectlPatchSchema: {
3
3
  name: string;
4
4
  description: string;
5
+ annotations: {
6
+ destructiveHint: boolean;
7
+ };
5
8
  inputSchema: {
6
9
  type: string;
7
10
  properties: {
@@ -8,6 +8,9 @@ import { contextParameter, dryRunParameter, namespaceParameter, } from "../model
8
8
  export const kubectlPatchSchema = {
9
9
  name: "kubectl_patch",
10
10
  description: "Update field(s) of a resource using strategic merge patch, JSON merge patch, or JSON patch",
11
+ annotations: {
12
+ destructiveHint: true,
13
+ },
11
14
  inputSchema: {
12
15
  type: "object",
13
16
  properties: {
@@ -2,6 +2,9 @@ import { KubernetesManager } from "../types.js";
2
2
  export declare const kubectlRolloutSchema: {
3
3
  name: string;
4
4
  description: string;
5
+ annotations: {
6
+ destructiveHint: boolean;
7
+ };
5
8
  inputSchema: {
6
9
  type: string;
7
10
  properties: {
@@ -5,6 +5,9 @@ import { contextParameter, namespaceParameter } from "../models/common-parameter
5
5
  export const kubectlRolloutSchema = {
6
6
  name: "kubectl_rollout",
7
7
  description: "Manage the rollout of a resource (e.g., deployment, daemonset, statefulset)",
8
+ annotations: {
9
+ destructiveHint: true,
10
+ },
8
11
  inputSchema: {
9
12
  type: "object",
10
13
  properties: {
@@ -2,6 +2,9 @@ import { KubernetesManager } from "../types.js";
2
2
  export declare const kubectlScaleSchema: {
3
3
  name: string;
4
4
  description: string;
5
+ annotations: {
6
+ destructiveHint: boolean;
7
+ };
5
8
  inputSchema: {
6
9
  type: string;
7
10
  properties: {
@@ -40,7 +43,7 @@ export declare function kubectlScale(k8sManager: KubernetesManager, input: {
40
43
  context?: string;
41
44
  }): Promise<{
42
45
  content: {
43
- success: boolean;
44
- message: string;
46
+ type: "text";
47
+ text: string;
45
48
  }[];
46
49
  }>;
@@ -5,6 +5,9 @@ import { contextParameter, namespaceParameter } from "../models/common-parameter
5
5
  export const kubectlScaleSchema = {
6
6
  name: "kubectl_scale",
7
7
  description: "Scale a Kubernetes deployment",
8
+ annotations: {
9
+ destructiveHint: true,
10
+ },
8
11
  inputSchema: {
9
12
  type: "object",
10
13
  properties: {
@@ -54,8 +57,11 @@ export async function kubectlScale(k8sManager, input) {
54
57
  return {
55
58
  content: [
56
59
  {
57
- success: true,
58
- message: `Scaled ${resourceType} ${input.name} to ${input.replicas} replicas`,
60
+ type: "text",
61
+ text: JSON.stringify({
62
+ success: true,
63
+ message: `Scaled ${resourceType} ${input.name} to ${input.replicas} replicas`,
64
+ }),
59
65
  },
60
66
  ],
61
67
  };
@@ -69,8 +75,11 @@ export async function kubectlScale(k8sManager, input) {
69
75
  return {
70
76
  content: [
71
77
  {
72
- success: false,
73
- message: error.message,
78
+ type: "text",
79
+ text: JSON.stringify({
80
+ success: false,
81
+ message: error.message,
82
+ }),
74
83
  },
75
84
  ],
76
85
  };
@@ -78,8 +87,11 @@ export async function kubectlScale(k8sManager, input) {
78
87
  return {
79
88
  content: [
80
89
  {
81
- success: false,
82
- message: `Failed to scale resource: ${error.message}`,
90
+ type: "text",
91
+ text: JSON.stringify({
92
+ success: false,
93
+ message: `Failed to scale resource: ${error.message}`,
94
+ }),
83
95
  },
84
96
  ],
85
97
  };
@@ -2,6 +2,9 @@ import { KubernetesManager } from "../utils/kubernetes-manager.js";
2
2
  export declare const PortForwardSchema: {
3
3
  name: string;
4
4
  description: string;
5
+ annotations: {
6
+ title: string;
7
+ };
5
8
  inputSchema: {
6
9
  type: string;
7
10
  properties: {
@@ -39,6 +42,9 @@ export declare function startPortForward(k8sManager: KubernetesManager, input: {
39
42
  export declare const StopPortForwardSchema: {
40
43
  name: string;
41
44
  description: string;
45
+ annotations: {
46
+ title: string;
47
+ };
42
48
  inputSchema: {
43
49
  type: string;
44
50
  properties: {
@@ -38,6 +38,9 @@ async function executeKubectlCommandAsync(command) {
38
38
  export const PortForwardSchema = {
39
39
  name: "port_forward",
40
40
  description: "Forward a local port to a port on a Kubernetes resource",
41
+ annotations: {
42
+ title: "Port Forward",
43
+ },
41
44
  inputSchema: {
42
45
  type: "object",
43
46
  properties: {
@@ -87,6 +90,9 @@ export async function startPortForward(k8sManager, input) {
87
90
  export const StopPortForwardSchema = {
88
91
  name: "stop_port_forward",
89
92
  description: "Stop a port-forward process",
93
+ annotations: {
94
+ title: "Stop Port Forward",
95
+ },
90
96
  inputSchema: {
91
97
  type: "object",
92
98
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-server-kubernetes",
3
- "version": "3.0.4",
3
+ "version": "3.1.0",
4
4
  "description": "MCP server for interacting with Kubernetes clusters via kubectl",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@kubernetes/client-node": "1.3.0",
41
- "@modelcontextprotocol/sdk": "1.17.0",
41
+ "@modelcontextprotocol/sdk": "1.25.2",
42
42
  "express": "4.21.2",
43
43
  "js-yaml": "4.1.1",
44
44
  "yaml": "2.7.0",
45
- "zod": "3.23.8"
45
+ "zod": "3.25.76"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/express": "5.0.1",