MCP Server

Feature Overview

Model Context Protocol (MCP) servers expose platform APIs as tools that AI agents can discover and invoke using the open MCP standard. Instead of writing oc commands manually, developers and SREs can ask an AI assistant to perform cluster operations, retrieve logs, query metrics, and manage resources — all through natural language.

Your environment includes an OpenShift MCP Server that provides tools for querying and managing OpenShift cluster resources across multiple toolsets:

  • Core — generic resource CRUD (get, list, create, update, delete), pod logs, events

  • Metrics — query Prometheus for CPU, memory, and custom metrics via PromQL

  • Config — manage kubeconfig contexts for multi-cluster operations

  • NetEdge — diagnose OVN networking issues on nodes

  • OSSM — query and manage OpenShift Service Mesh / Istio via Kiali (mesh health, traffic graphs, tracing, Istio config management)

The server implements the MCP specification, allowing any MCP-compatible client (opencode, Claude Desktop, Cursor, VS Code, MCP Inspector, or custom agents) to connect and use cluster tools. RBAC is enforced — the MCP server respects the user’s OpenShift permissions, so a read-only user cannot delete resources even through the AI.

These exercises use opencode, an open source AI coding agent that runs in an mcp-cli pod in your cluster. It is pre-configured with the lab’s LLM and with this MCP server, so you don’t need to install a client or spend your own tokens. Alternatively, you can use the built-in OpenShift Lightspeed chat window for most exercises — it has been pre-configured to use the same MCP server outlined here. However, Exercise 4 (RBAC Enforcement) and Exercise 8 (Read-Only Mode) require an MCP client such as opencode, since they involve switching user tokens and refreshing client-side tool lists, which cannot be done through Lightspeed.

Before You Begin

  • Verify the OpenShift MCP server is running:

    oc get pods -n openshift-mcp
  • Verify the mcp-cli pod, which runs the opencode AI client, is running:

    oc get pods -n mcp-cli
  • Note the MCP server endpoint. opencode is already configured with it; you only need it to connect another MCP client:

    https://mcp-server.{openshift_cluster_ingress_domain}/mcp

Core Platform Operations

Exercise 1: Connect Your AI Client to the MCP Server

The MCP server acts on behalf of whoever calls it, so an MCP client needs an OpenShift bearer token. opencode reads the token from the OPENSHIFT_MCP_TOKEN environment variable when it starts.

  1. Generate a token for the mcp-admin user (has full cluster access) and save it to ~/.bashrc (in case your terminal session disconnects):

    cp ~/.kube/config ~/.kube/config.bak
    MCP_ADMIN_PASS=$(oc get secret mcp-user-credentials -n openshift-mcp -o jsonpath='{.data.mcp-admin}' | base64 -d)
    oc login -u mcp-admin -p "${MCP_ADMIN_PASS}"
    export MCP_ADMIN_TOKEN=$(oc whoami -t)
    cp ~/.kube/config.bak ~/.kube/config
    echo "export MCP_ADMIN_TOKEN=$MCP_ADMIN_TOKEN" >> ~/.bashrc
    echo "mcp-admin token saved in \$MCP_ADMIN_TOKEN"
    The commands above log in as mcp-admin to obtain the token, then restore the cluster admin session.
  2. Start opencode in the mcp-cli pod with the mcp-admin token:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_ADMIN_TOKEN opencode

    opencode connects to the MCP server, registered as openshift, at startup. Its tools appear with an openshift_ prefix (for example openshift_pods_list_in_namespace).

    opencode is also configured with the MCP Gateway from the next module. It shows as needing authentication until you provide a gateway token in that module — you can ignore it here.
  3. Verify the connection by asking:

    List all pods in namespace openshift-lightspeed

    Confirm it returns results without you running any oc commands.

Keep opencode open for the following exercises and paste the prompts into it. Before running a command in the terminal, leave opencode: in the opencode session, type /exit. Each exercise shows this as a separate step. To come back to the same conversation afterwards, run the start command again with --continue added after opencode.

If your terminal disconnects while opencode is running, or opencode does not start (the screen stays blank), an earlier opencode session is probably still running in the mcp-cli pod and blocking new ones. Delete the pod — it is recreated automatically — and wait for the new one to be ready:

oc delete pod -n mcp-cli -l app=mcp-cli
oc rollout status deployment/mcp-cli -n mcp-cli

Then start opencode again without --continue — previous conversations are removed with the pod.

Exercise 2: AI-Assisted Log Retrieval

Retrieving pod logs is one of the most common troubleshooting tasks. The MCP server lets AI assistants fetch logs directly, identify failing pods, and correlate errors — all through conversation.

Your environment includes a demo namespace mcp-demo-logs with two pods:

  • healthy-pod — streams INFO-level request logs every 5 seconds

  • failing-pod — crashes in a loop with database connection timeout errors (CrashLoopBackOff)

  1. Using your connected AI client, ask:

    Show me the logs for the failing pod in namespace mcp-demo-logs
  2. Observe how the AI responds. It should:

    1. Call pods_list_in_namespace to discover pod statuses

    2. Identify failing-pod as the non-Running pod

    3. Call pods_log to retrieve the actual error logs (database connection timeouts)

    4. Clearly distinguish the healthy pod from the failing one

  3. You can also try:

    Are there any pods in CrashLoopBackOff across the cluster?
    It is normal to see CrashLoopBackOff pods — these are intentional fixtures used in other exercises.

Exercise 3: Create a Resource via AI

The MCP server supports resource creation through natural language. This demonstrates how AI can translate intent into valid Kubernetes YAML and apply it.

  1. Ask your AI assistant:

    Create a ConfigMap named test-config in namespace default with key app.properties and value environment=staging
  2. Once the AI confirms the ConfigMap was created, leave opencode. In the opencode session, type /exit:

    /exit
  3. Verify it was created:

    oc get cm test-config -n default -o yaml
  4. Clean up when done:

    oc delete cm test-config -n default

Exercise 4: RBAC Enforcement — Read-Only User

If you are using OpenShift Lightspeed rather than your own MCP-enabled client, you can skip this exercise.

In production environments, not every user should have write access. The MCP server enforces OpenShift RBAC per-user via bearer token passthrough — a read-only user cannot create, modify, or delete resources even when asking the AI to do so.

  1. If opencode is open, leave it. In the opencode session, type /exit:

    /exit
  2. Generate a token for the mcp-viewer user (has read-only access):

    cp ~/.kube/config ~/.kube/config.bak
    MCP_VIEWER_PASS=$(oc get secret mcp-user-credentials -n openshift-mcp -o jsonpath='{.data.mcp-viewer}' | base64 -d)
    oc login -u mcp-viewer -p "${MCP_VIEWER_PASS}"
    export MCP_VIEWER_TOKEN=$(oc whoami -t)
    cp ~/.kube/config.bak ~/.kube/config
    echo "mcp-viewer token saved in \$MCP_VIEWER_TOKEN"
  3. Start opencode with the mcp-viewer token:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_VIEWER_TOKEN opencode
  4. Try a read operation — this should succeed:

    List all pods in the mcp-demo-logs namespace
  5. Try a write operation — this should fail with a permissions error:

    Delete the pod healthy-pod in namespace mcp-demo-logs
  6. Try another write operation — this should also fail:

    Create a ConfigMap named hack in namespace default
  7. Verify the AI reports a permissions error for the ConfigMap creation (e.g., configmaps "hack" is forbidden: User "mcp-viewer" cannot patch resource "configmaps").

  8. Leave opencode. In the opencode session, type /exit:

    /exit
  9. Confirm the ConfigMap was not created:

    oc get cm hack -n default 2>&1 || echo "ConfigMap not found — RBAC enforcement confirmed"
  10. Switch back to the mcp-admin token (from Exercise 1) before continuing. The remaining exercises require write access and will fail with the mcp-viewer token:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_ADMIN_TOKEN opencode

Observability & Network Diagnostics

Exercise 5: Query Prometheus Metrics

Observability is critical for maintaining healthy clusters. The MCP server’s metrics toolset lets AI assistants query Prometheus directly using PromQL, making it easy to investigate performance issues through conversation.

Your environment includes a mcp-demo-production namespace with CPU-intensive workloads:

  • app-api — 2 replicas generating moderate CPU load

  • app-worker — 2 replicas generating heavy CPU load

Wait at least 10 minutes after environment provisioning for Prometheus to collect enough metrics data.
  1. Using your AI client, ask:

    Show me CPU usage for all pods in namespace mcp-demo-production over the last hour, focusing on high-usage pods

    The AI should call list_metrics to verify the metric name, then execute_range_query with a PromQL query like rate(container_cpu_usage_seconds_total{namespace="mcp-demo-production"}[5m]) to return per-pod CPU data. You should see app-worker pods using more CPU than app-api pods.

  2. Cross-check results in the OpenShift Console: Observe > Metrics, then paste:

    rate(container_cpu_usage_seconds_total{namespace="mcp-demo-production"}[5m])
    Prometheus metrics query in OpenShift Console showing CPU usage for mcp-demo-production pods
  3. You can also try:

    Are there any firing alerts in the cluster?
    It is normal to see firing alerts — some are generated by intentional demo fixtures used in other exercises.
  4. Once you have finished exploring metrics, leave opencode. In the opencode session, type /exit:

    /exit
  5. Scale down the CPU-burning workloads to free up cluster resources:

    oc scale deployment app-api app-worker -n mcp-demo-production --replicas=0

Exercise 6: Network Diagnostics with NetEdge

Network issues can be difficult to diagnose. The NetEdge toolset provides AI-accessible network diagnostics for OVN-Kubernetes, DNS, and ingress routing — allowing SREs to troubleshoot connectivity issues through natural language.

Your environment includes a mcp-demo-network namespace with a deliberately failing network setup:

  • A NetworkAttachmentDefinition named sriov-network configured for an SR-IOV CNI plugin

  • A sriov-test-pod that requests this network attachment — it will be stuck in ContainerCreating because the SR-IOV CNI plugin is not installed on the nodes

  1. Start opencode again with the mcp-admin token, continuing your previous conversation:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_ADMIN_TOKEN opencode --continue
  2. Using your AI client, ask:

    Check OVN network status and show me any failed network attachments in the mcp-demo-network namespace

    The AI should call events_list to surface the FailedCreatePodSandBox warning event with the root cause: failed to find plugin "sriov" in path. It should also identify the NetworkAttachmentDefinition that exists but cannot be fulfilled.

  3. You can also try general network diagnostics:

    Run ingress diagnostics on this cluster
    Check DNS resolution for kubernetes.default.svc

Safety & Access Control

Exercise 7: AI Safety — Destructive Operation Warnings

In environments with write access, it’s important that AI assistants warn users before executing potentially destructive operations. The MCP server marks destructive tools (delete, scale, exec) with safety annotations that compliant AI clients use to prompt for confirmation.

  1. Using your AI client, ask:

    Delete the namespace mcp-demo-production

    The AI should not immediately delete the namespace. Instead, it should warn you about the consequences — the mcp-demo-production namespace contains real workloads (app-api and app-worker deployments without running replicas) that would be permanently removed. The AI should ask for explicit confirmation before proceeding.

    Type cancel or no to abort. Do not actually delete this namespace — it is used by Exercise 5.
  2. Try other phrasings to test the safety boundary:

    Delete the healthy-pod in namespace mcp-demo-logs
    Remove all pods in the mcp-demo-logs namespace

    Each should trigger a confirmation prompt before execution. Cancel each one to keep the demo environment intact.

Exercise 8: Read-Only Mode

If you are using OpenShift Lightspeed rather than your own MCP-enabled client, you can skip this exercise.

For compliance and security-sensitive environments, the MCP server can be placed in read-only mode at the server level. This blocks ALL write operations regardless of the user’s RBAC permissions — even cluster-admin cannot create or delete resources through the MCP server.

  1. If opencode is open, leave it. In the opencode session, type /exit:

    /exit
  2. Enable read-only mode:

    oc patch deployment openshift-mcp-server -n openshift-mcp \
      --type=json \
      -p='[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--read-only"}]'
    oc rollout status deployment openshift-mcp-server -n openshift-mcp --timeout=120s

    In read-only mode, write tools are hidden entirely, not just blocked. This applies to all toolsets including OSSM (e.g., ossm_manage_istio_config also disappears). The tool count drops from 49 to approximately 41.

  3. Start opencode again. MCP clients load the tool list when they connect, so a new session picks up the reduced tool set:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_ADMIN_TOKEN opencode
  4. Try a write prompt — should fail with "unknown tool":

    Create a deployment named test-deploy in namespace default
  5. Try another write prompt — should also fail:

    Delete the pod test-pod in namespace sandbox
  6. Try a read prompt — should succeed:

    List all pods in the mcp-demo-logs namespace
  7. When done, leave opencode. In the opencode session, type /exit:

    /exit
  8. Restore write mode by removing the --read-only flag:

    oc patch deployment openshift-mcp-server -n openshift-mcp \
      --type=json \
      -p='[{"op":"replace","path":"/spec/template/spec/containers/0/args","value":["--config","/etc/mcp/config.toml"]}]'
    oc rollout status deployment openshift-mcp-server -n openshift-mcp --timeout=120s
  9. Start opencode again so the write tools reappear:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_ADMIN_TOKEN opencode

Service Mesh (Kiali/OSSM)

Before starting the service mesh exercises, open the Service Mesh pages in the OpenShift Console to visualize traffic alongside the AI-driven exercises.

  1. In the OpenShift Console, navigate to Service Mesh > Overview in the left navigation. This page shows the overall status of the service mesh on the cluster and insights into the services configured.

    Service Mesh Overview page showing bookinfo namespace health
    The Overview page may show Istio config validation warnings or errors in other namespaces on the cluster. This is normal — they are used by other exercises outside the MCP server scenarios and can be ignored.
  2. Next, navigate to Service Mesh > Traffic Graph.

  3. At the top, select the bookinfo namespace from the namespace dropdown.

  4. Set the graph type to Versioned app graph.

  5. Click Display and enable:

    • Traffic Animation — shows animated request flow along edges

    • Idle Nodes — shows services with no current traffic

    • Idle Edges — shows edges with no current traffic

      Kiali traffic graph for bookinfo showing initial state — all traffic to reviews-v1 with no traffic to ratings

      You should see traffic flowing from the traffic generator (shown as "unknown") through productpage to details-v1 and reviews-v1. Note that reviews-v2, reviews-v3, and ratings show as idle nodes — no traffic reaches them because the reviews VirtualService routes 100% to v1. This will change in later exercises as we test various functions of the mesh through the Kiali/Service Mesh MCP server.

Exercise 9: Kiali/OSSM Toolset Discovery

Verify that the OSSM toolset is enabled and that the Kiali tools are available.

  1. Using your connected AI client, ask:

    List all available service mesh tools

    The AI should return a list of ossm_* tools, including ossm_get_mesh_status, ossm_manage_istio_config, ossm_manage_istio_config_read, and ossm_get_mesh_traffic_graph.

  2. Verify that the Kiali toolset is reachable by asking:

    Can you connect to Kiali and confirm the service mesh is accessible?

    The AI should confirm connectivity to the Kiali endpoint without connection errors.

Exercise 10: Mesh Health Check

An SRE needs to quickly assess the overall health of the service mesh. The ossm_get_mesh_status tool provides a high-level view of control plane, data plane, and observability components.

  1. Ask your AI assistant:

    Check the status of the service mesh and identify any control plane, data plane, or observability issues

    The AI should use ossm_get_mesh_status and return:

    • Control plane status (Istio version, healthy components)

    • Data plane namespace health (e.g., bookinfo = HEALTHY)

    • Connectivity between components (Kiali to Prometheus, Jaeger, istiod)

  2. You can also try:

    Is the Istio control plane healthy? What version is running?

Exercise 11: List Istio Config and Report Validations

Kiali validates Istio configuration objects and can surface misconfigurations that oc get alone would miss.

  1. Ask your AI assistant:

    List Istio config in bookinfo and tell me if anything is invalid or has Kiali validation warnings

    The AI should use ossm_manage_istio_config_read (list/get) and report:

    • Which Istio objects exist (VirtualServices, DestinationRules, Gateways)

    • Whether any have validation errors or KIA warnings

    • Plain-language explanation of warning vs hard error

If the namespace is fully valid, reporting "no validation errors" is a successful result.

Exercise 12: Traffic Topology and Latency

The OSSM toolset provides AI-accessible traffic graphs and metrics from Kiali, allowing SREs to visualize service-to-service traffic and identify slow hops.

  1. Ask your AI assistant:

    Show me the traffic graph and latency for bookinfo. Which hops are slowest?

    The AI should use ossm_get_mesh_traffic_graph and/or ossm_get_metrics to:

    • Report hop-level latency and error signals from live data

    • Identify which service-to-service edges are slowest

    • Give actionable next steps only when evidence supports them

If traffic volume is low, the AI should report that rather than invent spikes.

Exercise 13: Distributed Tracing Drill-Down

When troubleshooting latency or errors, distributed traces show the exact path a request took through the mesh and where time was spent.

  1. Ask your AI assistant:

    Show me recent traces for the productpage service in bookinfo and explain any slow or error traces

    The AI should use ossm_list_traces and optionally ossm_get_trace_details to:

    • List recent traces for the service

    • Identify the bottleneck span/service if slow traces exist

    • Provide clear "no traces found" guidance if the trace list is empty

If the tracing backend (Tempo) has not collected traces yet, an empty result is expected. Allow a few minutes of traffic generation before retrying.

Exercise 14: Traffic Routing and Issue Detection

The EAP environment pre-seeds a VirtualService for reviews that routes 100% of traffic to v1 (no red stars on the product page). The AI should detect this and be able to fix it.

  1. Open and reload the Bookinfo product page several times and note that reviews never show any stars, red or black (only reviews-v1 is receiving traffic):

    Bookinfo product page showing reviews without stars — all traffic routed to reviews-v1

    You can also confirm this in the Kiali traffic graph — reviews-v2, reviews-v3, and ratings should all be idle (no traffic).

  2. Ask your AI assistant:

    The product page never shows any stars for reviews. Can you investigate the traffic routing in bookinfo and fix it so all review versions get traffic?

    The AI should:

    1. Use ossm_manage_istio_config_read to find the VirtualService for reviews

    2. Identify that v3 has weight 0

    3. Use ossm_manage_istio_config to patch the weights (with confirmation)

    4. Verify traffic distribution afterward

  3. Refresh the Bookinfo product page several times — you should now see ratings stars appear: black stars from reviews-v2 and red stars from reviews-v3.

    Bookinfo product page showing reviews with red stars — traffic now reaching reviews-v3
  4. Check the Kiali traffic graph — you should now see traffic flowing to all three reviews versions, and the ratings service should no longer be idle (you may need to click the Refresh button in the upper right if you want immediate feedback - or just wait)

    Kiali traffic graph showing traffic distributed across reviews-v1 v2 and v3 with ratings now receiving traffic
  5. Leave opencode. In the opencode session, type /exit:

    /exit
  6. To restore the original routing for other exercises:

    oc apply -f - <<'EOF'
    apiVersion: networking.istio.io/v1
    kind: VirtualService
    metadata:
      name: reviews
      namespace: bookinfo
      labels:
        eap.kiali.io/test: eap-preconditions
    spec:
      hosts:
      - reviews.bookinfo.svc.cluster.local
      http:
      - route:
        - destination:
            host: reviews.bookinfo.svc.cluster.local
            subset: v1
          weight: 100
        - destination:
            host: reviews.bookinfo.svc.cluster.local
            subset: v2
          weight: 0
        - destination:
            host: reviews.bookinfo.svc.cluster.local
            subset: v3
          weight: 0
    EOF

Exercise 15: Fault Injection Troubleshooting

In this exercise you will inject a fault into the Bookinfo details service and then ask the AI to diagnose and fix it.

  1. First, apply a fault injection that returns HTTP 503 for 100% of requests to the details service:

    oc apply -f - <<'EOF'
    apiVersion: networking.istio.io/v1
    kind: DestinationRule
    metadata:
      name: details
      namespace: bookinfo
      labels:
        eap.kiali.io/test: eap-preconditions
    spec:
      host: details.bookinfo.svc.cluster.local
      subsets:
      - name: v1
        labels:
          version: v1
    ---
    apiVersion: networking.istio.io/v1
    kind: VirtualService
    metadata:
      name: details
      namespace: bookinfo
      labels:
        eap.kiali.io/test: eap-preconditions
    spec:
      hosts:
      - details.bookinfo.svc.cluster.local
      http:
      - route:
        - destination:
            host: details.bookinfo.svc.cluster.local
            subset: v1
          weight: 100
        fault:
          abort:
            percentage:
              value: 100
            httpStatus: 503
    EOF

    Wait about 30 seconds for traffic to flow through the faulted path. Refresh the Bookinfo product page (it may take multiple refreshes) to confirm the details section shows an error:

    Bookinfo product page with details section showing an error due to fault injection

    In the Kiali traffic graph, you should see the edge from productpage to details turn red, indicating HTTP errors. Click on the red edge to see the error rate details.

    Kiali traffic graph showing red edge from productpage to details due to 503 fault injection
  2. Reconnect to opencode with the mcp-admin token, continuing your previous conversation:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_ADMIN_TOKEN opencode --continue
  3. Now ask your AI assistant:

    Users are seeing 503 errors on the Bookinfo details page. Can you investigate what's causing this and fix it?

    The AI should:

    1. Use ossm_manage_istio_config_read to find the VirtualService for details in the bookinfo namespace

    2. Identify the fault.abort block (httpStatus 503, percentage 100%)

    3. Explain how this configuration causes 503 errors

    4. Use ossm_manage_istio_config to remove the fault block (with confirmation)

    5. Verify the fix by checking that details requests succeed

  4. Confirm the details section is working again by refreshing the Bookinfo product page.

    Bookinfo product page with details section restored after removing fault injection

    If you wait a minute or two, the Kiali traffic graph should also show the repaired service.

  5. Leave opencode. In the opencode session, type /exit:

    /exit
  6. Clean up any remaining resources when done:

    oc delete virtualservice details -n bookinfo --ignore-not-found
    oc delete destinationrule details -n bookinfo --ignore-not-found

Exercise 16: Create an Istio Gateway

The OSSM write tool can create Istio resources. In this exercise, the AI creates a test Gateway to verify write functionality.

  1. Reconnect to opencode with the mcp-admin token, continuing your previous conversation:

    oc exec -it -n mcp-cli deploy/mcp-cli -- env OPENSHIFT_MCP_TOKEN=$MCP_ADMIN_TOKEN opencode --continue
  2. Ask your AI assistant:

    Create an Istio Gateway named eap-test-gateway in the istio-system namespace for HTTP traffic on port 80, using the istio ingressgateway selector

    The AI should:

    1. Use ossm_manage_istio_config to create the Gateway

    2. Confirm the action before proceeding (if confirmation is enabled)

    3. Report success

  3. Ask your AI assistant to verify the Gateway was created:

    Check that the Gateway eap-test-gateway exists in the istio-system namespace
  4. Verify the AI can read it back:

    Show me the details of the eap-test-gateway in istio-system

Exercise 17: Delete an Istio Gateway

After creating the test Gateway in Exercise 16, verify that the AI can also delete Istio resources.

  1. Ask your AI assistant:

    Delete the eap-test-gateway Gateway in istio-system

    The AI should confirm before deleting, then report success.

    AI clients are typically extra cautious with destructive operations. The MCP server includes system instructions telling AI tools to warn users and ask for explicit confirmation before deleting resources. You may need to confirm the deletion more than once — this is expected safety behavior, not a bug.
  2. Ask your AI assistant to verify the Gateway is gone:

    Check that the Gateway eap-test-gateway no longer exists in the istio-system namespace

Exercise 18: Multi-Tool Mesh Investigation

This exercise combines multiple OSSM tools in a single investigation, demonstrating how AI can correlate data from mesh health, traffic graphs, tracing, and Istio config to build a complete picture.

  1. Ask your AI assistant:

    Give me a complete health report for the bookinfo application: check the mesh status, show me the traffic graph with any error rates, list any Istio config validation warnings, and show recent traces if available

    The AI should call multiple tools (ossm_get_mesh_status, ossm_get_mesh_traffic_graph, ossm_manage_istio_config_read, ossm_list_traces) and synthesize the results into a coherent report that includes:

    • Overall mesh health

    • Traffic flow and error rates between services

    • Istio configuration status and any validation issues

    • Recent trace data (if available)

  2. You can also try asking the AI to correlate across toolsets:

    Are there any service mesh issues that correlate with Prometheus alerts?

Other Things to Try

  • Ask the AI to shift traffic gradually: "Route 10% of reviews traffic to v3 and monitor error rates for 2 minutes before increasing"

  • Ask about mTLS status: "Is mutual TLS enforced between services in bookinfo? Are there any permissive policies?"

  • Try a capacity planning question: "Based on current traffic patterns and resource usage in bookinfo, which services would need scaling first under 10x load?"

  • Ask the AI to compare mesh behavior over time: "Has the error rate for any bookinfo service changed in the last hour?"

  • Explore cross-toolset correlation: "Check if any service mesh latency spikes correlate with high CPU usage on the nodes running bookinfo pods"

Known Limitations

  • Bearer tokens expire (typically 24 hours) — generate a new token if you receive 401 errors

  • The metrics toolset requires the user’s token to have cluster-monitoring-view access for Prometheus queries

  • AI safety prompting depends on the AI client respecting the destructiveHint tool annotation — behavior may vary across clients

Key Takeaways

  • MCP servers bridge the gap between AI agents and platform APIs using a standardized protocol

  • Bearer token passthrough ensures per-user RBAC enforcement — each user’s permissions are respected

  • The metrics toolset provides AI-accessible Prometheus querying for observability workflows

  • Read-only mode provides a server-level safety mechanism independent of RBAC

  • Destructive operations are annotated with safety hints that compliant AI clients use for confirmation prompts

  • The OSSM toolset enables AI-driven service mesh operations — health checks, traffic analysis, tracing, and Istio config management through Kiali

  • MCP servers can be used standalone or federated through an MCP Gateway