Skip to main content

Kiali MCP Server (Model Context Protocol) with special support for OpenShift

Project description

Kiali MCP Server

GitHub License npm PyPI - Version GitHub release (latest SemVer) Build

https://github.com/user-attachments/assets/0a7c1e08-2044-4426-92d6-89cbf6084ca1

Kiali MCP Server is a specialized Model Context Protocol (MCP) server that brings powerful Istio service mesh management capabilities to AI assistants like Claude, Cursor, and others. Built as an extension of the upstream Kubernetes MCP Server, it provides seamless integration with Kiali for service mesh observability and management.

  • 🌐 Native Kiali Integration: Direct access to service mesh topology, validations, and health data
  • 🔧 Built on Kubernetes MCP: Inherits all Kubernetes/OpenShift management capabilities
  • 🚀 AI-First Design: Optimized for AI assistant workflows and natural language interactions
  • 📊 Real-time Mesh Insights: Live service mesh topology, traffic flows, and health status

For the complete set of Kubernetes tools and capabilities, see the upstream documentation: openshift/openshift-mcp-server README

✨ Features | 🚀 Getting Started | 🎥 Demos | ⚙️ Configuration | 🛠️ Tools | 🧑‍💻 Development

✨ Features

🎯 Service Mesh Management

  • 📊 Mesh Topology Visualization: Real-time service graph with traffic flows, health status, and connectivity
  • 🔍 Configuration Validation: Comprehensive Istio object validation across namespaces
  • 🌐 Multi-Namespace Support: Work with single namespaces or multiple namespaces simultaneously
  • ⚡ Live Data: Direct integration with running Kiali instances for up-to-date mesh insights

🤖 AI-Optimized Experience

  • Natural Language Queries: Ask questions like "Check my bookinfo mesh status" or "Show validations for istio-system"
  • Intelligent Context: Tools designed for AI understanding and optimal prompt engineering
  • Flexible Parameters: Support both single and multiple namespace operations
  • Rich Responses: Structured JSON data perfect for AI analysis and interpretation

🔧 Built on Kubernetes MCP

Inherits all capabilities from the upstream Kubernetes MCP Server including pod management, resource operations, Helm integration, and more.

🚀 Getting Started

Requirements

  • Kubernetes/OpenShift Cluster: Access via kubeconfig or in-cluster service account
  • Kiali Instance: A running and accessible Kiali server
  • Network Access: Connectivity between the MCP server and your Kiali instance
  • AI Assistant: Claude Desktop, Cursor, or any MCP-compatible AI tool

Quick Start with Claude Desktop

https://github.com/user-attachments/assets/0a7c1e08-2044-4426-92d6-89cbf6084ca1

Using npx (Recommended)

If you have npm installed, this is the fastest way to get started with Kiali MCP Server on Claude Desktop.

Open your claude_desktop_config.json and add the MCP server to the list of mcpServers:

{
  "mcpServers": {
    "kiali-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kiali-mcp-server@latest"
      ]
    }
  }
}

Quick Start with Cursor

Install the Kiali MCP server extension in Cursor by clicking the button below:

Install MCP Server

Alternatively, you can install the extension manually by editing the mcp.json file:

{
  "mcpServers": {
    "kiali-mcp-server": {
      "command": "npx",
      "args": ["-y", "kiali-mcp-server@latest"]
    }
  }
}

https://github.com/user-attachments/assets/d88a3b72-980c-43db-a69a-a19ad564cf49

Configuring Kiali Connection

Note: You must specify the Kiali endpoint if the MCP server cannot auto-detect it. You may also need to configure TLS settings.

{
  "mcpServers": {
    "kiali-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kiali-mcp-server@latest",
        "--kiali-server-url",
        "https://kiali-istio-system.apps-crc.testing/",
        "--kiali-insecure"
      ]
    }
  }
}

Common Configuration Examples

🔒 Secure Kiali with Valid TLS
{
  "mcpServers": {
    "kiali-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kiali-mcp-server@latest",
        "--kiali-server-url",
        "https://kiali.example.com/"
      ]
    }
  }
}
🔓 Local Development with Self-Signed Certificates
{
  "mcpServers": {
    "kiali-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kiali-mcp-server@latest",
        "--kiali-server-url",
        "https://kiali-istio-system.apps-crc.testing/",
        "--kiali-insecure"
      ]
    }
  }
}
🎯 Kiali-Only Mode
{
  "mcpServers": {
    "kiali-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kiali-mcp-server@latest",
        "--toolsets",
        "kiali",
        "--kiali-server-url",
        "https://kiali.example.com/"
      ]
    }
  }
}

⚙️ Configuration

Kiali MCP Server extends the upstream Kubernetes MCP Server with additional Kiali-specific configuration options.

Kiali-Specific Flags

Flag Type Description Example
--kiali-server-url string URL of the Kiali server https://kiali-istio-system.apps-crc.testing/
--kiali-insecure boolean Skip TLS verification when connecting to Kiali Use for self-signed certificates

Toolset Configuration

By default, both Kubernetes and Kiali tools are available. Use --toolsets to control which tool groups are enabled:

# Kiali tools only
--toolsets kiali

# All available toolsets (default)
--toolsets core,config,helm,kiali

Command Line Examples

Using npx:

npx -y kiali-mcp-server@latest \
  --kiali-server-url "https://kiali-istio-system.apps-crc.testing/" \
  --kiali-insecure \
  --toolsets kiali

Using compiled binary:

./kiali-mcp-server \
  --kiali-server-url "https://kiali-istio-system.apps-crc.testing/" \
  --kiali-insecure \
  --port 8080

Additional Configuration

For comprehensive configuration options including authentication, ports, read-only mode, and output formats, refer to the upstream documentation: openshift/openshift-mcp-server README

🛠️ Tools and Functionalities

The Kiali MCP server supports enabling or disabling specific groups of tools and functionalities (tools, resources, prompts, and so on) via the --toolsets command-line flag or toolsets configuration option. This allows you to control which Kubernetes functionalities are available to your AI tools. Enabling only the toolsets you need can help reduce the context size and improve the LLM's tool selection accuracy.

Available Toolsets

The following sets of tools are available (only Kiali by default):

Toolset Description
kiali Most common tools for managing Kiali

Tools

kiali
  • graph - Check the status of my mesh by querying Kiali graph

    • namespace (string) - Optional single namespace to include in the graph (alternative to namespaces)
    • namespaces (string) - Optional comma-separated list of namespaces to include in the graph
  • mesh_status - Get the status of mesh components including Istio, Kiali, Grafana, Prometheus and their interactions, versions, and health status

  • istio_config - Get all Istio configuration objects in the mesh including their full YAML resources and details

  • istio_object_details - Get detailed information about a specific Istio object including validation and help information

    • group (string) (required) - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
    • kind (string) (required) - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
    • name (string) (required) - Name of the Istio object
    • namespace (string) (required) - Namespace containing the Istio object
    • version (string) (required) - API version of the Istio object (e.g., 'v1', 'v1beta1')
  • istio_object_patch - Modify an existing Istio object using PATCH method. The JSON patch data will be applied to the existing object.

    • group (string) (required) - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
    • json_patch (string) (required) - JSON patch data to apply to the object
    • kind (string) (required) - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
    • name (string) (required) - Name of the Istio object
    • namespace (string) (required) - Namespace containing the Istio object
    • version (string) (required) - API version of the Istio object (e.g., 'v1', 'v1beta1')
  • istio_object_create - Create a new Istio object using POST method. The JSON data will be used to create the new object.

    • group (string) (required) - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
    • json_data (string) (required) - JSON data for the new object
    • kind (string) (required) - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
    • namespace (string) (required) - Namespace where the Istio object will be created
    • version (string) (required) - API version of the Istio object (e.g., 'v1', 'v1beta1')
  • istio_object_delete - Delete an existing Istio object using DELETE method.

    • group (string) (required) - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io')
    • kind (string) (required) - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway')
    • name (string) (required) - Name of the Istio object
    • namespace (string) (required) - Namespace containing the Istio object
    • version (string) (required) - API version of the Istio object (e.g., 'v1', 'v1beta1')
  • validations_list - List all the validations in the current cluster from all namespaces

    • namespace (string) - Optional single namespace to retrieve validations from (alternative to namespaces)
    • namespaces (string) - Optional comma-separated list of namespaces to retrieve validations from
  • namespaces - Get all namespaces in the mesh that the user has access to

  • services_list - Get all services in the mesh across specified namespaces with health and Istio resource information

    • 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
  • service_details - Get detailed information for a specific service in a namespace, including validation, health status, and configuration

    • namespace (string) (required) - Namespace containing the service
    • service (string) (required) - Name of the service to get details for
  • workloads_list - Get all workloads in the mesh across specified namespaces with health and Istio resource information

    • 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
  • workload_details - Get detailed information for a specific workload in a namespace, including validation, health status, and configuration

    • namespace (string) (required) - Namespace containing the workload
    • workload (string) (required) - Name of the workload to get details for

🎥 Demos

In this video, we explore how the Mesh Control Plane (MCP) in Kubernetes/OpenShift works together with Kiali to validate Istio configuration objects directly in your editor (Cursor).

Cursor: Kiali-mcp-server running

🧑‍💻 Development

Running with mcp-inspector

Compile the project and run the Kiali MCP server with mcp-inspector to inspect the MCP server.

# Compile the project
make build
# Run the Kubernetes MCP server with mcp-inspector
npx @modelcontextprotocol/inspector@latest $(pwd)/kiali-mcp-server --kiali-server-url "https://kiali-istio-system.apps-crc.testing/" --kiali-insecure

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kiali_mcp_server-0.4.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kiali_mcp_server-0.4.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file kiali_mcp_server-0.4.1.tar.gz.

File metadata

  • Download URL: kiali_mcp_server-0.4.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for kiali_mcp_server-0.4.1.tar.gz
Algorithm Hash digest
SHA256 108634153024385676cf9e6691c2ae032627d6e7647423f68d588637e18d75df
MD5 8013c7deb6fe3066a66fa90933cb0976
BLAKE2b-256 c574aad3e91da58174e8f9602f67f52a71c0e67103fe7279d28ea9dcc023685e

See more details on using hashes here.

File details

Details for the file kiali_mcp_server-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kiali_mcp_server-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 384cf543f17bf582870540a506a95fbf8915559321c92b55a8708ea589933187
MD5 58d31fc1db80174e0794792a8477801c
BLAKE2b-256 83cb89ff93e4062a400ed54c2f882aa9693e7395242caaab2d0c22aad1cab7da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page