You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+81-81Lines changed: 81 additions & 81 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,25 +7,25 @@ OpenShift MCP Server is currently under development.
7
7
A powerful and flexible Kubernetes [Model Context Protocol (MCP)](https://blog.marcnuri.com/model-context-protocol-mcp-introduction) server implementation with support for **Kubernetes** and **OpenShift**.
8
8
9
9
-**✅ Configuration**:
10
-
- Automatically detect changes in the Kubernetes configuration and update the MCP server.
11
-
-**View** and manage the current [Kubernetes `.kube/config`](https://blog.marcnuri.com/where-is-my-default-kubeconfig-file) or in-cluster configuration.
10
+
- Automatically detect changes in the Kubernetes configuration and update the MCP server.
11
+
-**View** and manage the current [Kubernetes `.kube/config`](https://blog.marcnuri.com/where-is-my-default-kubeconfig-file) or in-cluster configuration.
12
12
-**✅ Generic Kubernetes Resources**: Perform operations on **any** Kubernetes or OpenShift resource.
13
-
- Any CRUD operation (Create or Update, Get, List, Delete).
13
+
- Any CRUD operation (Create or Update, Get, List, Delete).
14
14
-**✅ Pods**: Perform Pod-specific operations.
15
-
-**List** pods in all namespaces or in a specific namespace.
16
-
-**Get** a pod by name from the specified namespace.
17
-
-**Delete** a pod by name from the specified namespace.
18
-
-**Show logs** for a pod by name from the specified namespace.
19
-
-**Top** gets resource usage metrics for all pods or a specific pod in the specified namespace.
20
-
-**Exec** into a pod and run a command.
21
-
-**Run** a container image in a pod and optionally expose it.
15
+
-**List** pods in all namespaces or in a specific namespace.
16
+
-**Get** a pod by name from the specified namespace.
17
+
-**Delete** a pod by name from the specified namespace.
18
+
-**Show logs** for a pod by name from the specified namespace.
19
+
-**Top** gets resource usage metrics for all pods or a specific pod in the specified namespace.
20
+
-**Exec** into a pod and run a command.
21
+
-**Run** a container image in a pod and optionally expose it.
22
22
-**✅ Namespaces**: List Kubernetes Namespaces.
23
23
-**✅ Events**: View Kubernetes events in all namespaces or in a specific namespace.
24
24
-**✅ Projects**: List OpenShift Projects.
25
25
-**☸️ Helm**:
26
-
-**Install** a Helm chart in the current or provided namespace.
27
-
-**List** Helm releases in all namespaces or in a specific namespace.
28
-
-**Uninstall** a Helm release in the current or provided namespace.
26
+
-**Install** a Helm chart in the current or provided namespace.
27
+
-**List** Helm releases in all namespaces or in a specific namespace.
28
+
-**Uninstall** a Helm release in the current or provided namespace.
29
29
30
30
Unlike other Kubernetes MCP server implementations, this **IS NOT** just a wrapper around `kubectl` or `helm` command-line tools.
31
31
It is a **Go-based native implementation** that interacts directly with the Kubernetes API server.
@@ -160,59 +160,59 @@ Get the current Kubernetes configuration content as a kubeconfig YAML
- If `true`, keeps only the current-context and relevant configuration pieces
165
-
- If `false`, returns all contexts, clusters, auth-infos, and users
163
+
- Return a minified version of the configuration
164
+
- If `true`, keeps only the current-context and relevant configuration pieces
165
+
- If `false`, returns all contexts, clusters, auth-infos, and users
166
166
167
167
### `events_list`
168
168
169
169
List all the Kubernetes events in the current cluster from all namespaces
170
170
171
171
**Parameters:**
172
172
-`namespace` (`string`, optional)
173
-
- Namespace to retrieve the events from. If not provided, will list events from all namespaces
173
+
- Namespace to retrieve the events from. If not provided, will list events from all namespaces
174
174
175
175
### `helm_install`
176
176
177
177
Install a Helm chart in the current or provided namespace with the provided name and chart
178
178
179
179
**Parameters:**
180
180
-`chart` (`string`, required)
181
-
- Name of the Helm chart to install
182
-
- Can be a local path or a remote URL
183
-
- Example: `./my-chart.tgz` or `https://example.com/my-chart.tgz`
181
+
- Name of the Helm chart to install
182
+
- Can be a local path or a remote URL
183
+
- Example: `./my-chart.tgz` or `https://example.com/my-chart.tgz`
184
184
-`values` (`object`, optional)
185
-
- Values to pass to the Helm chart
186
-
- Example: `{"key": "value"}`
185
+
- Values to pass to the Helm chart
186
+
- Example: `{"key": "value"}`
187
187
-`name` (`string`, optional)
188
-
- Name of the Helm release
189
-
- Random name if not provided
188
+
- Name of the Helm release
189
+
- Random name if not provided
190
190
-`namespace` (`string`, optional)
191
-
- Namespace to install the Helm chart in
192
-
- If not provided, will use the configured namespace
191
+
- Namespace to install the Helm chart in
192
+
- If not provided, will use the configured namespace
193
193
194
194
### `helm_list`
195
195
196
196
List all the Helm releases in the current or provided namespace (or in all namespaces if specified)
197
197
198
198
**Parameters:**
199
199
-`namespace` (`string`, optional)
200
-
- Namespace to list the Helm releases from
201
-
- If not provided, will use the configured namespace
200
+
- Namespace to list the Helm releases from
201
+
- If not provided, will use the configured namespace
202
202
-`all_namespaces` (`boolean`, optional)
203
-
- If `true`, will list Helm releases from all namespaces
204
-
- If `false`, will list Helm releases from the specified namespace
203
+
- If `true`, will list Helm releases from all namespaces
204
+
- If `false`, will list Helm releases from the specified namespace
205
205
206
206
### `helm_uninstall`
207
207
208
208
Uninstall a Helm release in the current or provided namespace with the provided name
209
209
210
210
**Parameters:**
211
211
-`name` (`string`, required)
212
-
- Name of the Helm release to uninstall
212
+
- Name of the Helm release to uninstall
213
213
-`namespace` (`string`, optional)
214
-
- Namespace to uninstall the Helm release from
215
-
- If not provided, will use the configured namespace
214
+
- Namespace to uninstall the Helm release from
215
+
- If not provided, will use the configured namespace
216
216
217
217
### `namespaces_list`
218
218
@@ -226,97 +226,97 @@ Delete a Kubernetes Pod in the current or provided namespace with the provided n
226
226
227
227
**Parameters:**
228
228
-`name` (`string`, required)
229
-
- Name of the Pod to delete
229
+
- Name of the Pod to delete
230
230
-`namespace` (`string`, required)
231
-
- Namespace to delete the Pod from
231
+
- Namespace to delete the Pod from
232
232
233
233
### `pods_exec`
234
234
235
235
Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command
236
236
237
237
**Parameters:**
238
238
-`command` (`string[]`, required)
239
-
- Command to execute in the Pod container
240
-
- First item is the command, rest are arguments
241
-
- Example: `["ls", "-l", "/tmp"]`
239
+
- Command to execute in the Pod container
240
+
- First item is the command, rest are arguments
241
+
- Example: `["ls", "-l", "/tmp"]`
242
242
-`name` (string, required)
243
-
- Name of the Pod
243
+
- Name of the Pod
244
244
-`namespace` (string, required)
245
-
- Namespace of the Pod
245
+
- Namespace of the Pod
246
246
-`container` (`string`, optional)
247
-
- Name of the Pod container to get logs from
247
+
- Name of the Pod container to get logs from
248
248
249
249
### `pods_get`
250
250
251
251
Get a Kubernetes Pod in the current or provided namespace with the provided name
252
252
253
253
**Parameters:**
254
254
-`name` (`string`, required)
255
-
- Name of the Pod
255
+
- Name of the Pod
256
256
-`namespace` (`string`, required)
257
-
- Namespace to get the Pod from
257
+
- Namespace to get the Pod from
258
258
259
259
### `pods_list`
260
260
261
261
List all the Kubernetes pods in the current cluster from all namespaces
262
262
263
263
**Parameters:**
264
264
-`labelSelector` (`string`, optional)
265
-
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
265
+
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
266
266
267
267
### `pods_list_in_namespace`
268
268
269
269
List all the Kubernetes pods in the specified namespace in the current cluster
270
270
271
271
**Parameters:**
272
272
-`namespace` (`string`, required)
273
-
- Namespace to list pods from
273
+
- Namespace to list pods from
274
274
-`labelSelector` (`string`, optional)
275
-
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
275
+
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
276
276
277
277
### `pods_log`
278
278
279
279
Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name
280
280
281
281
**Parameters:**
282
282
-`name` (`string`, required)
283
-
- Name of the Pod to get logs from
283
+
- Name of the Pod to get logs from
284
284
-`namespace` (`string`, required)
285
-
- Namespace to get the Pod logs from
285
+
- Namespace to get the Pod logs from
286
286
-`container` (`string`, optional)
287
-
- Name of the Pod container to get logs from
287
+
- Name of the Pod container to get logs from
288
288
289
289
### `pods_run`
290
290
291
291
Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name
292
292
293
293
**Parameters:**
294
294
-`image` (`string`, required)
295
-
- Container Image to run in the Pod
295
+
- Container Image to run in the Pod
296
296
-`namespace` (`string`, required)
297
-
- Namespace to run the Pod in
297
+
- Namespace to run the Pod in
298
298
-`name` (`string`, optional)
299
-
- Name of the Pod (random name if not provided)
299
+
- Name of the Pod (random name if not provided)
300
300
-`port` (`number`, optional)
301
-
- TCP/IP port to expose from the Pod container
302
-
- No port exposed if not provided
301
+
- TCP/IP port to expose from the Pod container
302
+
- No port exposed if not provided
303
303
304
304
### `pods_top`
305
305
306
306
Lists the resource consumption (CPU and memory) as recorded by the Kubernetes Metrics Server for the specified Kubernetes Pods in the all namespaces, the provided namespace, or the current namespace
- If `true`, lists resource consumption for Pods in all namespaces
311
-
- If `false`, lists resource consumption for Pods in the configured or provided namespace
310
+
- If `true`, lists resource consumption for Pods in all namespaces
311
+
- If `false`, lists resource consumption for Pods in the configured or provided namespace
312
312
-`namespace` (`string`, optional)
313
-
- Namespace to list the Pod resources from
314
-
- If not provided, will list Pods from the configured namespace (in case all_namespaces is false)
313
+
- Namespace to list the Pod resources from
314
+
- If not provided, will list Pods from the configured namespace (in case all_namespaces is false)
315
315
-`name` (`string`, optional)
316
-
- Name of the Pod to get resource consumption from
317
-
- If not provided, will list resource consumption for all Pods in the applicable namespace(s)
316
+
- Name of the Pod to get resource consumption from
317
+
- If not provided, will list resource consumption for all Pods in the applicable namespace(s)
318
318
-`label_selector` (`string`, optional)
319
-
- Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label (Optional, only applicable when name is not provided)
319
+
- Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label (Optional, only applicable when name is not provided)
320
320
321
321
### `projects_list`
322
322
@@ -328,8 +328,8 @@ Create or update a Kubernetes resource in the current cluster by providing a YAM
328
328
329
329
**Parameters:**
330
330
-`resource` (`string`, required)
331
-
- A JSON or YAML containing a representation of the Kubernetes resource
332
-
- Should include top-level fields such as apiVersion, kind, metadata, and spec
331
+
- A JSON or YAML containing a representation of the Kubernetes resource
332
+
- Should include top-level fields such as apiVersion, kind, metadata, and spec
333
333
334
334
**Common apiVersion and kind include:**
335
335
- v1 Pod
@@ -344,47 +344,47 @@ Delete a Kubernetes resource in the current cluster
344
344
345
345
**Parameters:**
346
346
-`apiVersion` (`string`, required)
347
-
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
347
+
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
348
348
-`kind` (`string`, required)
349
-
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
349
+
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
350
350
-`name` (`string`, required)
351
-
- Name of the resource
351
+
- Name of the resource
352
352
-`namespace` (`string`, optional)
353
-
- Namespace to delete the namespaced resource from
354
-
- Ignored for cluster-scoped resources
355
-
- Uses configured namespace if not provided
353
+
- Namespace to delete the namespaced resource from
354
+
- Ignored for cluster-scoped resources
355
+
- Uses configured namespace if not provided
356
356
357
357
### `resources_get`
358
358
359
359
Get a Kubernetes resource in the current cluster
360
360
361
361
**Parameters:**
362
362
-`apiVersion` (`string`, required)
363
-
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
363
+
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
364
364
-`kind` (`string`, required)
365
-
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
365
+
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
366
366
-`name` (`string`, required)
367
-
- Name of the resource
367
+
- Name of the resource
368
368
-`namespace` (`string`, optional)
369
-
- Namespace to retrieve the namespaced resource from
370
-
- Ignored for cluster-scoped resources
371
-
- Uses configured namespace if not provided
369
+
- Namespace to retrieve the namespaced resource from
370
+
- Ignored for cluster-scoped resources
371
+
- Uses configured namespace if not provided
372
372
373
373
### `resources_list`
374
374
375
375
List Kubernetes resources and objects in the current cluster
376
376
377
377
**Parameters:**
378
378
-`apiVersion` (`string`, required)
379
-
- apiVersion of the resources (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
379
+
- apiVersion of the resources (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
380
380
-`kind` (`string`, required)
381
-
- kind of the resources (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
381
+
- kind of the resources (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
382
382
-`namespace` (`string`, optional)
383
-
- Namespace to retrieve the namespaced resources from
384
-
- Ignored for cluster-scoped resources
385
-
- Lists resources from all namespaces if not provided
383
+
- Namespace to retrieve the namespaced resources from
384
+
- Ignored for cluster-scoped resources
385
+
- Lists resources from all namespaces if not provided
386
386
-`labelSelector` (`string`, optional)
387
-
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label.
387
+
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label.
0 commit comments