Skip to content

Commit ac053ff

Browse files
authored
fix(kiali): Tool names with prefix kiali_ (#471)
* fix(kiali): Tool names with prefix kiali_ Signed-off-by: Alberto Gutierrez <[email protected]> * Change links Signed-off-by: Alberto Gutierrez <[email protected]> * Add comment to the url configuration Signed-off-by: Alberto Gutierrez <[email protected]> --------- Signed-off-by: Alberto Gutierrez <[email protected]>
1 parent 17126a0 commit ac053ff

File tree

13 files changed

+83
-209
lines changed

13 files changed

+83
-209
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ The following sets of tools are available (toolsets marked with ✓ in the Defau
213213
| config | View and manage the current local Kubernetes configuration (kubeconfig) ||
214214
| core | Most common tools for Kubernetes management (Pods, Generic Resources, Events, etc.) ||
215215
| helm | Tools for managing Helm charts and releases ||
216-
| kiali | Most common tools for managing Kiali, check the [Kiali integration documentation](https://github.com/containers/kubernetes-mcp-server/blob/main/docs/KIALI_INTEGRATION.md) for more details. | |
216+
| kiali | Most common tools for managing Kiali, check the [Kiali documentation](https://github.com/containers/kubernetes-mcp-server/blob/main/docs/KIALI.md) for more details. | |
217217

218218
<!-- AVAILABLE-TOOLSETS-END -->
219219

@@ -348,57 +348,57 @@ In case multi-cluster support is enabled (default) and you have access to multip
348348

349349
<summary>kiali</summary>
350350

351-
- **graph** - Check the status of my mesh by querying Kiali graph
351+
- **kiali_graph** - Check the status of my mesh by querying Kiali graph
352352
- `namespace` (`string`) - Optional single namespace to include in the graph (alternative to namespaces)
353353
- `namespaces` (`string`) - Optional comma-separated list of namespaces to include in the graph
354354

355-
- **mesh_status** - Get the status of mesh components including Istio, Kiali, Grafana, Prometheus and their interactions, versions, and health status
355+
- **kiali_mesh_status** - Get the status of mesh components including Istio, Kiali, Grafana, Prometheus and their interactions, versions, and health status
356356

357-
- **istio_config** - Get all Istio configuration objects in the mesh including their full YAML resources and details
357+
- **kiali_istio_config** - Get all Istio configuration objects in the mesh including their full YAML resources and details
358358

359-
- **istio_object_details** - Get detailed information about a specific Istio object including validation and help information
359+
- **kiali_istio_object_details** - Get detailed information about a specific Istio object including validation and help information
360360
- `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
361361
- `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
362362
- `name` (`string`) **(required)** - Name of the Istio object
363363
- `namespace` (`string`) **(required)** - Namespace containing the Istio object
364364
- `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1')
365365

366-
- **istio_object_patch** - Modify an existing Istio object using PATCH method. The JSON patch data will be applied to the existing object.
366+
- **kiali_istio_object_patch** - Modify an existing Istio object using PATCH method. The JSON patch data will be applied to the existing object.
367367
- `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
368368
- `json_patch` (`string`) **(required)** - JSON patch data to apply to the object
369369
- `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
370370
- `name` (`string`) **(required)** - Name of the Istio object
371371
- `namespace` (`string`) **(required)** - Namespace containing the Istio object
372372
- `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1')
373373

374-
- **istio_object_create** - Create a new Istio object using POST method. The JSON data will be used to create the new object.
374+
- **kiali_istio_object_create** - Create a new Istio object using POST method. The JSON data will be used to create the new object.
375375
- `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
376376
- `json_data` (`string`) **(required)** - JSON data for the new object
377377
- `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
378378
- `namespace` (`string`) **(required)** - Namespace where the Istio object will be created
379379
- `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1')
380380

381-
- **istio_object_delete** - Delete an existing Istio object using DELETE method.
381+
- **kiali_istio_object_delete** - Delete an existing Istio object using DELETE method.
382382
- `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
383383
- `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
384384
- `name` (`string`) **(required)** - Name of the Istio object
385385
- `namespace` (`string`) **(required)** - Namespace containing the Istio object
386386
- `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1')
387387

388-
- **validations_list** - List all the validations in the current cluster from all namespaces
388+
- **kiali_validations_list** - List all the validations in the current cluster from all namespaces
389389
- `namespace` (`string`) - Optional single namespace to retrieve validations from (alternative to namespaces)
390390
- `namespaces` (`string`) - Optional comma-separated list of namespaces to retrieve validations from
391391

392-
- **namespaces** - Get all namespaces in the mesh that the user has access to
392+
- **kiali_namespaces** - Get all namespaces in the mesh that the user has access to
393393

394-
- **services_list** - Get all services in the mesh across specified namespaces with health and Istio resource information
394+
- **kiali_services_list** - Get all services in the mesh across specified namespaces with health and Istio resource information
395395
- `namespaces` (`string`) - Comma-separated list of namespaces to get services from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, will list services from all accessible namespaces
396396

397-
- **service_details** - Get detailed information for a specific service in a namespace, including validation, health status, and configuration
397+
- **kiali_service_details** - Get detailed information for a specific service in a namespace, including validation, health status, and configuration
398398
- `namespace` (`string`) **(required)** - Namespace containing the service
399399
- `service` (`string`) **(required)** - Name of the service to get details for
400400

401-
- **service_metrics** - Get metrics for a specific service in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters
401+
- **kiali_service_metrics** - Get metrics for a specific service in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters
402402
- `byLabels` (`string`) - Comma-separated list of labels to group metrics by (e.g., 'source_workload,destination_service'). Optional
403403
- `direction` (`string`) - Traffic direction: 'inbound' or 'outbound'. Optional, defaults to 'outbound'
404404
- `duration` (`string`) - Duration of the query period in seconds (e.g., '1800' for 30 minutes). Optional, defaults to 1800 seconds
@@ -410,14 +410,14 @@ In case multi-cluster support is enabled (default) and you have access to multip
410410
- `service` (`string`) **(required)** - Name of the service to get metrics for
411411
- `step` (`string`) - Step between data points in seconds (e.g., '15'). Optional, defaults to 15 seconds
412412

413-
- **workloads_list** - Get all workloads in the mesh across specified namespaces with health and Istio resource information
413+
- **kiali_workloads_list** - Get all workloads in the mesh across specified namespaces with health and Istio resource information
414414
- `namespaces` (`string`) - Comma-separated list of namespaces to get workloads from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, will list workloads from all accessible namespaces
415415

416-
- **workload_details** - Get detailed information for a specific workload in a namespace, including validation, health status, and configuration
416+
- **kiali_workload_details** - Get detailed information for a specific workload in a namespace, including validation, health status, and configuration
417417
- `namespace` (`string`) **(required)** - Namespace containing the workload
418418
- `workload` (`string`) **(required)** - Name of the workload to get details for
419419

420-
- **workload_metrics** - Get metrics for a specific workload in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters
420+
- **kiali_workload_metrics** - Get metrics for a specific workload in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters
421421
- `byLabels` (`string`) - Comma-separated list of labels to group metrics by (e.g., 'source_workload,destination_service'). Optional
422422
- `direction` (`string`) - Traffic direction: 'inbound' or 'outbound'. Optional, defaults to 'outbound'
423423
- `duration` (`string`) - Duration of the query period in seconds (e.g., '1800' for 30 minutes). Optional, defaults to 1800 seconds
@@ -429,7 +429,7 @@ In case multi-cluster support is enabled (default) and you have access to multip
429429
- `step` (`string`) - Step between data points in seconds (e.g., '15'). Optional, defaults to 15 seconds
430430
- `workload` (`string`) **(required)** - Name of the workload to get metrics for
431431

432-
- **health** - Get health status for apps, workloads, and services across specified namespaces in the mesh. Returns health information including error rates and status for the requested resource type
432+
- **kiali_health** - Get health status for apps, workloads, and services across specified namespaces in the mesh. Returns health information including error rates and status for the requested resource type
433433
- `namespaces` (`string`) - Comma-separated list of namespaces to get health from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, returns health for all accessible namespaces
434434
- `queryTime` (`string`) - Unix timestamp (in seconds) for the prometheus query. If not provided, uses current time. Optional
435435
- `rateInterval` (`string`) - Rate interval for fetching error rate (e.g., '10m', '5m', '1h'). Default: '10m'
@@ -442,7 +442,7 @@ In case multi-cluster support is enabled (default) and you have access to multip
442442
- `tail` (`integer`) - Number of lines to retrieve from the end of logs (default: 100)
443443
- `workload` (`string`) **(required)** - Name of the workload to get logs for
444444

445-
- **app_traces** - Get distributed tracing data for a specific app in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.
445+
- **kiali_app_traces** - Get distributed tracing data for a specific app in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.
446446
- `app` (`string`) **(required)** - Name of the app to get traces for
447447
- `clusterName` (`string`) - Cluster name for multi-cluster environments (optional)
448448
- `endMicros` (`string`) - End time for traces in microseconds since epoch (optional)
@@ -452,7 +452,7 @@ In case multi-cluster support is enabled (default) and you have access to multip
452452
- `startMicros` (`string`) - Start time for traces in microseconds since epoch (optional)
453453
- `tags` (`string`) - JSON string of tags to filter traces (optional)
454454

455-
- **service_traces** - Get distributed tracing data for a specific service in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.
455+
- **kiali_service_traces** - Get distributed tracing data for a specific service in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.
456456
- `clusterName` (`string`) - Cluster name for multi-cluster environments (optional)
457457
- `endMicros` (`string`) - End time for traces in microseconds since epoch (optional)
458458
- `limit` (`integer`) - Maximum number of traces to return (default: 100)
@@ -462,7 +462,7 @@ In case multi-cluster support is enabled (default) and you have access to multip
462462
- `startMicros` (`string`) - Start time for traces in microseconds since epoch (optional)
463463
- `tags` (`string`) - JSON string of tags to filter traces (optional)
464464

465-
- **workload_traces** - Get distributed tracing data for a specific workload in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.
465+
- **kiali_workload_traces** - Get distributed tracing data for a specific workload in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.
466466
- `clusterName` (`string`) - Cluster name for multi-cluster environments (optional)
467467
- `endMicros` (`string`) - End time for traces in microseconds since epoch (optional)
468468
- `limit` (`integer`) - Maximum number of traces to return (default: 100)

docs/KIALI.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Kiali integration
2+
3+
This server can expose Kiali tools so assistants can query mesh information (e.g., mesh status/graph).
4+
5+
### Enable the Kiali toolset
6+
7+
Enable the Kiali tools via the server TOML configuration file.
8+
9+
Config (TOML):
10+
11+
```toml
12+
toolsets = ["core", "kiali"]
13+
14+
[toolset_configs.kiali]
15+
url = "https://kiali.example" # Endpoint/route to reach Kiali console
16+
# insecure = true # optional: allow insecure TLS (not recommended in production)
17+
# certificate_authority = """-----BEGIN CERTIFICATE-----
18+
# MIID...
19+
# -----END CERTIFICATE-----"""
20+
# When url is https and insecure is false, certificate_authority is required.
21+
```
22+
23+
When the `kiali` toolset is enabled, a Kiali toolset configuration is required via `[toolset_configs.kiali]`. If missing or invalid, the server will refuse to start.
24+
25+
### How authentication works
26+
27+
- The server uses your existing Kubernetes credentials (from kubeconfig or in-cluster) to set a bearer token for Kiali calls.
28+
- If you pass an HTTP Authorization header to the MCP HTTP endpoint, that is not required for Kiali; Kiali calls use the server's configured token.
29+
30+
### Troubleshooting
31+
32+
- Missing Kiali configuration when `kiali` toolset is enabled → set `[toolset_configs.kiali].url` in the config TOML.
33+
- Invalid URL → ensure `[toolset_configs.kiali].url` is a valid `http(s)://host` URL.
34+
- TLS certificate validation:
35+
- If `[toolset_configs.kiali].url` uses HTTPS and `[toolset_configs.kiali].insecure` is false, you must set `[toolset_configs.kiali].certificate_authority` with the PEM-encoded certificate(s) used by the Kiali server. This field expects inline PEM content, not a file path. You may concatenate multiple PEM blocks to include an intermediate chain.
36+
- For non-production environments you can set `[toolset_configs.kiali].insecure = true` to skip certificate verification.
37+

0 commit comments

Comments
 (0)