> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/ai-and-agents/mcp/hosted/kafka.md).

# Kafka

Give an agent access to Kafka through the ilert MCP connector you deploy in your own network.

#### Required permissions

<table><thead><tr><th width="177.515625">Tool</th><th width="178.515625">Required Permission</th><th>Description</th></tr></thead><tbody><tr><td><code>list_topics</code></td><td><code>read</code></td><td>List all Kafka topics in the cluster. Useful for discovering available topics and their configurations.</td></tr><tr><td><code>describe_topic</code></td><td><code>read</code></td><td>Get detailed information about a specific topic including partitions, replication factor, and configuration settings.</td></tr><tr><td><code>list_consumers</code></td><td><code>read</code></td><td>List all consumer groups in the cluster. Useful for monitoring consumer lag and group status.</td></tr><tr><td><code>describe_consumer</code></td><td><code>read</code></td><td>Get detailed information about a consumer group including member assignments, lag, and current offsets.</td></tr><tr><td><code>get_consumer_lag</code></td><td><code>read</code></td><td>Get consumer lag information for a specific consumer group and topic. Helps identify if consumers are falling behind.</td></tr></tbody></table>

#### Deploy the ilert MCP connector

ilert does not talk to your brokers directly. The Kafka MCP server calls the **ilert MCP connector**, a service you deploy in your own network and expose over a public HTTPS URL. Deployment, the auth token and all configuration options are on its own page:

{% content-ref url="/pages/cKuRiKPs7NQX5toTeOJo" %}
[ilert MCP connector](/ai-and-agents/mcp/ilert-mcp-connector.md)
{% endcontent-ref %}

Enable Kafka on the connector with these variables:

```bash
KAFKA_ENABLED=true
KAFKA_BROKERS=kafka1:9092,kafka2:9092
KAFKA_AUTH_TYPE=PLAIN          # or NONE, SCRAM-SHA-256, SCRAM-SHA-512, SSL, SASL_SSL
KAFKA_USERNAME=your_username
KAFKA_PASSWORD=your_password
```

Use `KAFKA_AUTH_TYPE=NONE` if your cluster requires no authentication, and see the connector page for the TLS variables the `SSL` and `SASL_SSL` types need.

#### Connect Kafka with agent

To connect Kafka with your AI SRE agent:

{% stepper %}
{% step %}
Navigate to **Agents** in the ilert navigation menu
{% endstep %}

{% step %}
Open the agent detail view for the agent you want to configure
{% endstep %}

{% step %}
Go to the **Tools** tab
{% endstep %}

{% step %}
Under the **ilert hosted MCP servers** section, locate the **Kafka** card
{% endstep %}

{% step %}
Click **Connect** on the Kafka card
{% endstep %}

{% step %}
In the connection dialog that appears:

* **Select connector:** Choose "Create new connector" (or select an existing connector if you have one)
* **Type:** Select **Bearer Token** from the dropdown
* **Secret name:** Enter a name for your connector (e.g., "Kafka Production" or "Kafka Main")
* **Secret value:** Enter the `AUTH_TOKEN` value from your connector deployment
* **Host URL:** Enter the public URL where your connector is reachable (e.g., `https://ilert-mcp-connector.example.com`)
  {% endstep %}

{% step %}
Click **Connect** to complete the connection
{% endstep %}

{% step %}
After connecting, you can enable or disable specific tools needed for alert investigation, such as:

* `list_topics` - List all Kafka topics in the cluster
* `describe_topic` - Get detailed information about a specific topic
* `list_consumers` - List all consumer groups in the cluster
* `describe_consumer` - Get detailed information about a consumer group
* `get_consumer_lag` - Get consumer lag information for monitoring
  {% endstep %}
  {% endstepper %}

The Kafka integration is now connected and ready to use for root cause analysis.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ilert.com/ai-and-agents/mcp/hosted/kafka.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
