Skip to main content
The Conduktor Model Context Protocol (MCP) server covers Kafka resources, Schema Registry, Kafka Connect, access control, Self-service, Chargeback, the audit log and Insights data held by Console. To start using it, connect an AI assistant. Most tools take a clusterSlug parameter that identifies the Kafka cluster to query. If you name a cluster in your question, the assistant normally uses it as the slug. Otherwise it calls list-clusters to find it. Tools that return lists are paged, so the assistant can request further pages when it needs them. You don’t have to call tools or write their inputs yourself: the assistant picks the tools and builds the inputs from your question. The key inputs listed below help you phrase questions and check what the assistant did. Most tools only read. Four tools change things: apply-topic, apply-subject and apply-connector create or change a resource and preview the change by default, and set-topic-labels adds or updates labels on a topic. See make changes with the apply tools.

Permissions

Each tool runs with the permissions of the token you connect with:
  • Tools that list resources only return the resources you have access to, and leave out the rest without an error.
  • Tools that read a single resource fail if you don’t have access to it.
  • get-chargeback-report returns every application to users with platform-wide Chargeback access. For other users, it only returns the applications they have Chargeback permissions on.
  • list-service-accounts and get-service-account return every service account to users who can view the cluster’s Access Control Lists (ACLs). Other users only see the service accounts owned by application instances they have access to.
  • set-topic-labels needs Manage metadata on the topic, whether or not metadata governance is enabled. While metadata governance is disabled, it also needs another permission on the topic, such as View config.
  • apply-topic needs View config on the topic, plus Create to create it or Edit config to change it.
  • apply-subject needs View and Create/Update on the subject. To change the subject’s compatibility, it also needs Edit compatibility.
  • apply-connector needs View config on the connector, plus Create to create it or Edit config to change it.
The tools that make changes check these permissions on a preview too, so a preview fails if the token can’t make the change. The assistant sees every tool whatever the token’s permissions are: a tool the token has no permission for fails when it’s called.

Clusters

Topics

Console offers four tools to find topics. The assistant picks one based on your question:

Messages

Schema Registry

Consumer groups

Kafka Connect

Access control and lineage

Self-service and Chargeback

Audit log

Insights

These tools are only available when Insights is enabled. See Disable Insights.

Certificates

Make changes with the apply tools

apply-topic, apply-subject and apply-connector create a resource or change an existing one. They’re built so that a request that names one setting can’t undo the others, and so that you see a change before it happens.

Preview a change, then apply it

Each apply tool takes a dryRun input, which is true unless the assistant sets it to false:
  • With dryRun left out or true, Console checks the token’s permissions and any Self-service policies that apply, validates the request and reports what would change. Nothing is written.
  • With dryRun set to false, Console makes the change and records it in the audit log.
The preview also validates the change where it can:
  • apply-subject checks the new schema against the subject’s compatibility mode and fails with the Schema Registry’s reasons if it isn’t compatible. When the schema is compatible and new to the subject, the preview reports that a new version would be registered.
  • apply-connector asks Kafka Connect to validate the connector configuration and fails with the errors it returns.
Ask the assistant to show you the preview first, then to apply the change:

Read the response

A preview and an applied change return the same response. This one previews a lower retention on a topic:

What a request changes and what it keeps

The apply tools only write what the request names: When the resource doesn’t exist yet, the request has to describe all of it:
  • A new topic needs partitions. The replication factor defaults to the broker’s.
  • A new subject needs schema. The format defaults to Avro.
  • A new connector needs config with connector.class.
To set labels on a topic, the assistant uses set-topic-labels. It merges labels in the same way, but has no preview: it writes the labels as soon as it’s called.

Analyze topics with aggregate-topics

aggregate-topics answers “how many” and “how much per X” questions about the topics on a cluster. It groups topics, then computes one figure per group: a count, or the sum, average, minimum or maximum of a numeric field. Because the work happens in Console, the assistant gets back a short list of totals instead of thousands of topic rows. Use it to answer questions such as: aggregate-topics needs Insights and only counts the topics your token can access.

How a request works

The assistant sends a request like this one, which totals storage per team, where the team is the first dot-separated segment of the topic name:
Console returns one bucket per group. In each bucket, key is the group, value is the computed figure and count is the number of topics in the group. totalCount is the number of groups.

Parameters

Group topics

Pass several fields to nest the groups. With "groupBy": ["label.team", "replicationFactor"], each bucket’s key is a list, such as ["payments", "3"]. If one prefix holds most of your topics, ask the assistant to group by more segments. For example, topicNamePrefix(.,2) splits payments.* into payments.cards, payments.refunds and so on.

Aggregate a field

sum, avg, min and max work on these fields:

Filter topics

filter narrows down the topics before they’re grouped. It takes two lists of clauses:
  • all: every clause has to match.
  • any: at least one clause has to match.
When you use both, a topic has to match all of the all clauses and at least one of the any clauses. Add "negate": true to a clause to match the topics that don’t satisfy it. A clause compares a field with a value, using an operator the field accepts: For between, give two comma-separated values, such as "10,100". For in and notin, give a comma-separated list. Instead of a field, a clause can use a named filter: For example, this filter keeps the stale topics that are larger than 1 GB:

Keep only some groups

having filters the groups after the figures are computed. It takes an operator (eq, lt, lte, gt, gte or between) and a value. For example, to keep the prefixes with more than 100 topics:

Internal topics

Internal topics are left out by default. These are Kafka’s and Conduktor’s own topics, topics whose name starts with an underscore, Kafka Connect topics and ksqlDB topics. To include them, ask about them explicitly so the assistant sets includeInternal to true, or filter on classification. When a request returns no groups because internal topics were left out, the response says so, and the assistant can try again with them included.