Skip to main content

Essential CLI Tools for Kafka Management

Confluent

  • confluent - This tool manages Confluent Cloud and Confluent Platform, including RBAC, secrets, and the ability to deploy a single-node Confluent Platform instance as well as creating, updating, and deleting topics. For more information, see Confluent CLI.
  • confluent-hub - This tool installs and manages connectors. For more information, see Confluent Marketplace Command Reference.
  • confluent-rebalancer - This tool balances data and partitions between brokers. For more information, see Quick Start for Auto Data Balancing in Confluent Platform.

Connect

Control Center

  • control-center-console-consumer - This tool starts the Control Center console consumer.
  • control-center-export - This tool exports data from Control Center to an output file.
  • control-center-reset - This tool resets Control Center and deletes all data. For more information, see This tool resets Control Center and deletes all data. For more information, see Control Center Installation.
  • control-center-run-class - This tool is a thin wrapper around the Control Center Java class. It is mainly used by the start and stop scripts and should not be run by itself.
  • control-center-set-acls - This tool is used to set the Control Center ACLs.
  • control-center-start - This tool starts Control Center. For a usage example, see Start Confluent Platform.
  • control-center-stop - This tool stops Control Center. For a usage example, see Enable and disable dynamic editing of broker configurations

KSQL

  • ksql - This tool runs ksqlDB. For more information, see Configure ksqlDB CLI.
  • ksql-datagen - This tool generates test data that complies with a custom schema that you define. For more information, see kafka-connect-datagen ⭐ 50
  • ksql-migrations - This tool manages metadata schemas for your ksqlDB clusters by applying statements from migration files to your ksqlDB clusters. For more info, see Manage metadata schemas.
  • ksql-restore-command - This tool restores the command topic.
  • ksql-run-class - This tool is a thin wrapper around the ksqlDB Java class. It is mainly used by the start and stop scripts and should not be run by itself.
  • ksql-server-start - This tool starts the ksqlDB server. For more information, see Starting the ksqlDB Server.
  • ksql-server-stop - This tool stops the ksqlDB server. For more information, see Operate ksqlDB for Confluent Platform.
  • ksql-stop - This tool stops the ksqlDB CLI. For more information, see Install ksqlDB for Confluent Platform.
  • ksql-test-runner - This tool is a ksqlDB testing tool that can test a set of KSQL statements.

Replicator

Schema Registry

Trogdor

This tool is a test framework for Kafka. Trogdor can run benchmarks and other workloads. Trogdor can also inject faults in order to stress test the system.

The Trogdor fault injector.

Usage:
./trogdor.sh [action] [options]

Actions:
agent: Run the trogdor agent.
coordinator: Run the trogdor coordinator.
client: Run the client which communicates with the trogdor coordinator.
agent-client: Run the client which communicates with the trogdor agent.
help: This help message.

kafka/TROGDOR.md at master · a0x8o/kafka · GitHub ⭐ 72

The Kafka benchmarking suite | The Write Ahead Log

Alternative - The OpenMessaging Benchmark Framework

Performance Testing

kafka-consumer-perf-test

This tool tests the consumer performance for the Kafka cluster.

kafka-consumer-perf-test \
--bootstrap-server localhost:9092 \
--topic topicname \
--group consumer_group \
--threads 8 \
--messages 1000000

kafka-producer-perf-test

This tool tests the producer performance for the Kafka cluster. For more information, see Quick Start for Auto Data Balancing in Confluent Platform.

The most efficient way to generate massive load is using the built-in kafka-producer-perf-test script. This tool is designed for benchmarking and can hit 100,000+ msgs/sec from a single client.

kafka-producer-perf-test \
--topic your_topic \
--num-records 1000000 \
--record-size 100 \
--throughput 10000 \
--producer-props bootstrap.servers=<broker_url> acks=1 batch.size=65536 linger.ms=10

Demos / Hands-on / Learning

Confluent MCP

  • npx @confluentinc/mcp-confluent --init-oauth-config
  • npx @confluentinc/mcp-confluent@1.3.0 --init-oauth-config
  • claude mcp add confluent -- npx -y @confluentinc/mcp-confluent --config ./config.yaml
  • Kafka and AI walk into a bar...

Setting up Confluent Cloud managed MCP server in Claude Code

Get a Confluent Cloud API key

The managed MCP server (https://api.confluent.cloud/mcp/v1) uses HTTP Basic auth, not Bearer tokens.

  • Use a Global API key (works for both global + regional servers) or a Cloud API key (global server only).
  • Resource-scoped keys (cluster-only, Schema Registry-only) are not supported.
  • Create one via Confluent Cloud Console, or CLI:

confluent api-key create --resource cloud

Base64-encode key:secret

printf '%s' '<API_KEY>:<API_SECRET>' | base64

Add the MCP server to Claude Code

claude mcp add --transport http confluent-mcp-global https://api.confluent.cloud/mcp/v1 --header "Authorization: Basic base64-encoded-key:secret"

Scope defaults to local (private to you, in the current project). Use -s user or -s project for a different scope.

Verify the connection

claude mcp get confluent-mcp-global

Should show Status: ✔ Connected.

Restart Claude Code

MCP tools are only loaded at session start — restart (or open a new session) in the project for the mcp__confluent-mcp-global__* tools to become available.

Smoke test

Ask Claude to list environments — it should call list_environments and return your Confluent Cloud environment(s).

Common pitfall: a placeholder like Authorization: Bearer <CONFLUENT_CLOUD_API_KEY> left unfilled, or using Bearer instead of Basic, causes an HTTP 401 with OAuth fallback disabled.

Useful commands:

  • claude mcp list — health-check all configured MCP servers
  • claude mcp remove confluent-mcp-global -s local — remove/reset the config

Others

  • security-plugins-run-class - This tool is a thin wrapper around the Confluent Security Plugins Java class. It is mainly used by the start and stop scripts and should not be run by itself.
  • sr-acl-cli - This tool runs the Schema Registry ACL CLI tool. For more information, see Schema Registry ACL Authorizer for Confluent Platform.