list-topicsLABSCO SUMMARY
Inspection that does not disturb the cluster.
The read path is deliberately harmless: the consumer it creates is ephemeral, starts at the earliest offset and never commits, so looking at a topic will not move anyone's offsets. Topic creation and deletion sit in the same tool set, so scope the broker credentials accordingly.
What it is
An MCP server over Apache Kafka administration, built in TypeScript on the Confluent Kafka client and speaking stdio. It manages topics, reports broker and consumer-group state, and can read messages off a topic.
What you get
- Topics listed, and one topic described with its partitions and replicas (list-topics, describe-topic)
- A topic created with a partition count and replication factor, or deleted (create-topic, delete-topic)
- Broker information for the cluster (get-cluster-info)
- Consumer groups listed, and one group described in detail (list-consumer-groups, describe-consumer-group)
- Messages read through an ephemeral consumer that starts at the earliest offset, commits nothing, and disconnects on a message count or a timeout
- Messages sent to a topic with an optional key
Requirements
A recent Node.js, a reachable Kafka-compatible broker such as Apache Kafka or Redpanda, and the broker addresses given in the environment, comma-separated for more than one.
Setup effort
Build from source — git clone https://github.com/lehtinentimo/kafka-mcp-server.git
USE CASES
Checking what a topic looks like before writing against it
List the topics, then read the partitions and replicas of the one you need.
Finding out whether a consumer group is keeping up
List the groups and describe the one behind the service you are debugging.
Setting up topics for a new service
Create them with the partition count and replication factor you want, then confirm.
Getting the lay of an unfamiliar cluster
Read the broker information and the topic list in one sitting.
Cleaning up test topics
List what exists and delete what was left behind.
9 tools
Listed in project docs. Your client may show a different list.
describe-topiccreate-topicdelete-topicproduceconsumeget-cluster-infolist-consumer-groupsdescribe-consumer-groupBEFORE YOU INSTALL
What to know first
Tools you get
9 tools named in the project's documentation.
Requires
- Node.js 18.18+ or 20.9+
- A running Kafka-compatible broker (Apache Kafka, Redpanda, etc.), set in KAFKA_BROKERS
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/lehtinentimo/kafka-mcp-server.git
cd kafka-mcp-server
npm install
npm run buildMCP Clients
Claude Code, Claude Desktop
{
"mcpServers": {
"kafka": {
"command": "node",
"args": [
"<YOUR_PATH_TO_KAFKA_MCP_SERVER>/dist/index.js"
],
"env": {
"KAFKA_BROKERS": "localhost:9092"
}
}
}
}KAFKA_BROKERS is your broker's host:port; localhost:9092 is a broker on this machine. List several comma-separated: broker1:9092,broker2:9092.