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" |
How it Works
Model Context Protocol (MCP)
MCP is an open protocol that connects AI models to external tools:
-
Lightspeed receives the user’s prompt in the OpenShift console.
-
The model analyzes intent and selects the relevant MCP tools from the 55+ available.
-
For each selected tool, MCP runs a function call against the OpenShift API server (or Argo CD, etc.) with parameters inferred from the prompt.
-
The results (resource YAML, logs, events) are injected back into the model context.
-
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":
-
Lightspeed identifies the need for the
k8s_listResourcestool withkind: KafkaConnector,namespace: kafka-cdc. -
MCP runs the equivalent of
oc get kafkaconnectors -n kafka-cdc -o json. -
The JSON response contains the CRs with their
.status.conditions(type, status, message). -
The model interprets the conditions and produces a readable answer: "The connector
debezium-postgresql-sourceis in RUNNING state with 1 active task. The connectormailpit-http-sinkis RUNNING with 1 task." -
If it detects an abnormal state (FAILED, PAUSED), it suggests corrective actions based on the error messages.
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 |
|---|---|
|
List pods in the kafka-cdc namespace |
|
View logs for any pipeline component |
|
View namespace events for troubleshooting |
|
Verify access to Kafka Console, Bridge, Apicurio |
|
View status of Kafka/CDC Argo CD Applications |
Official Documentation
-
Red Hat OpenShift Lightspeed — AI assistant for OpenShift
-
OpenShift CLI (oc) — Command-line tool for OpenShift
-
Model Context Protocol (MCP) Specification — Open standard for connecting AI models to tools
-
Red Hat OpenShift GitOps — Argo CD for OpenShift