MCP + Lightspeed

OpenShift Lightspeed with MCP

OpenShift Lightspeed is an AI assistant integrated into the OpenShift console that has access to MCP tools (Model Context Protocol) to diagnose and resolve issues in the cluster.

In this cluster, Lightspeed has access to 55+ MCP tools covering Kubernetes, OpenShift, Argo CD, Developer Hub, and now the Kafka/CDC pipeline as well.

CDC Pipeline troubleshooting prompts

Kafka Cluster

Situation Prompt for Lightspeed

Kafka cluster not ready

"Get the Kafka resource in namespace kafka-cdc and show its status"

Brokers not starting

"Get pods in namespace kafka-cdc with label strimzi.io/kind=Kafka and show their status"

Topics not being created

"List KafkaTopics in namespace kafka-cdc"

Debezium / KafkaConnect

Situation Prompt for Lightspeed

KafkaConnect build failing

"Get the logs from the KafkaConnect pod in namespace kafka-cdc"

Debezium not capturing changes

"Get the KafkaConnectors in namespace kafka-cdc and show their status"

Connector in FAILED state

"Get events in namespace kafka-cdc related to KafkaConnect"

Replication slot not created

"Get the logs from deployment cdc-postgresql in namespace kafka-cdc"

Kafka Bridge

Situation Prompt for Lightspeed

Bridge not responding

"Get pods in namespace kafka-cdc with label strimzi.io/kind=KafkaBridge"

Error producing via REST

"Get the logs from the KafkaBridge pod in namespace kafka-cdc"

Apicurio Registry

Situation Prompt for Lightspeed

Registry unavailable

"Get pods in namespace kafka-cdc with label app=apicurio-registry"

Kafka connection error

"Get the logs from the ApicurioRegistry pod in namespace kafka-cdc"

Camel CDC Processor

Situation Prompt for Lightspeed

Processor not starting

"Get pods in namespace kafka-cdc with label app=camel-cdc-processor"

Errors in the Camel route

"Get the logs from deployment camel-cdc-processor in namespace kafka-cdc"

Emails not reaching Mailpit

"Check connectivity from namespace kafka-cdc to n8n-mailpit.openshift-lightspeed.svc"

Streams Console

Situation Prompt for Lightspeed

Console not loading

"Get the Console resource in namespace kafka-cdc and show its status"

Authentication error

"Get events in namespace kafka-cdc related to Console"

How it Works

Model Context Protocol (MCP)

MCP is an open protocol that connects AI models to external tools:

  1. Lightspeed receives the user’s prompt in the OpenShift console.

  2. The model analyzes intent and selects the relevant MCP tools from the 55+ available.

  3. For each selected tool, MCP runs a function call against the OpenShift API server (or Argo CD, etc.) with parameters inferred from the prompt.

  4. The results (resource YAML, logs, events) are injected back into the model context.

  5. The model synthesizes a response that combines the retrieved information with its platform knowledge.

Troubleshooting prompt flow

When a user asks "Get the KafkaConnectors in namespace kafka-cdc and show their status":

  1. Lightspeed identifies the need for the k8s_listResources tool with kind: KafkaConnector, namespace: kafka-cdc.

  2. MCP runs the equivalent of oc get kafkaconnectors -n kafka-cdc -o json.

  3. The JSON response contains the CRs with their .status.conditions (type, status, message).

  4. The model interprets the conditions and produces a readable answer: "The connector debezium-postgresql-source is in RUNNING state with 1 active task. The connector mailpit-http-sink is RUNNING with 1 task."

  5. If it detects an abnormal state (FAILED, PAUSED), it suggests corrective actions based on the error messages.

Security and permissions

MCP tools run with the permissions of the ServiceAccount configured in the mcp-system namespace. OpenShift RBAC controls which resources can be read or modified — Lightspeed does not have unrestricted cluster access.

Quick diagnostic workflow

To validate the entire CDC pipeline after a deployment, run these prompts in sequence:

1. "Get the Kafka resource in namespace kafka-cdc and check if it's ready"
2. "Get KafkaConnectors in namespace kafka-cdc and show their status"
3. "Get pods in namespace kafka-cdc and check their status"
4. "Check if consumer group camel-cdc-consumer has lag in namespace kafka-cdc"
5. "Get the Console resource in namespace kafka-cdc"
6. "Get the ApicurioRegistry resource in namespace kafka-cdc"

MCP tools available for Kafka

MCP tools registered in mcp-system that are relevant to the CDC pipeline:

Tool Usage

k8s_listPods

List pods in the kafka-cdc namespace

k8s_getPodLogs

View logs for any pipeline component

k8s_listEvents

View namespace events for troubleshooting

ocp_getRoute

Verify access to Kafka Console, Bridge, Apicurio

argo_listApplications

View status of Kafka/CDC Argo CD Applications

Official Documentation