MCP

Manage Kafka with Natural Language

Manage Kafka operations with natural language. AI agents can publish/consume messages, manage topics, brokers, and partitions.

Works with kafka

90
Spark score
out of 100
Updated 4 months ago
Version 1.0.0
Models

Add to Favorites

Why it matters

Interact with Kafka clusters using natural language commands. This asset allows AI agents to publish and consume messages, manage topics, and monitor broker and partition information.

Outcomes

What it gets done

01

Publish and consume messages from Kafka topics.

02

Create, delete, and list Kafka topics.

03

Retrieve broker and partition details.

04

Manage consumer group offsets.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-kafka-mcp | bash

Capabilities

Tools your agent gets

consumer

Consume messages from Kafka topics

producer

Publish messages to Kafka topics

topic

List, create, delete, and describe topics in Kafka

broker

Get broker information from Kafka cluster

partition

Get partitions and partition offsets from Kafka

group_offset

Get and reset offsets in Kafka consumer groups

Overview

kafka-mcp server

What it does

This MCP server provides a natural language interface for managing Kafka operations. It allows AI agents to interact with Kafka clusters for publishing and consuming messages. It also supports managing topics, brokers, and partitions within the Kafka environment.

How it connects

Use this MCP server when you need to enable AI agents to perform Kafka operations using natural language queries. It's suitable for scenarios requiring seamless integration with any MCP client for smooth communication and full Kafka support, including producers, consumers, topics, brokers, partitions, and offsets.

Source README

An MCP server that provides a natural language interface for managing Kafka operations, enabling AI agents to interact with Kafka clusters for publishing and consuming messages, as well as managing topics, brokers, and partitions.

Installation

From source code

python3 -m venv .venv
source .venv/bin/activate  # On macOS/Linux
.venv\Scripts\activate     # On Windows
pip install -r requirements.txt
# Or using uv
uv pip install -r requirements.txt

Configuration

Claude Desktop

{
  "mcpServers": {
    "kafka-mcp": {
      "command": "python3",
      "args": ["/Users/I528600/Desktop/mcp/kafka-mcp/src/main.py"],
      "env": {
        "BOOTSTRAP_SERVERS": "localhost:9092",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Available Tools

Tool Description
consumer Consume messages from Kafka topics
producer Publish messages to Kafka topics
topic List, create, delete, and describe topics in Kafka
broker Get broker information
partition Get partitions and partition offsets
group_offset Get and reset offsets in Kafka

Features

  • Natural language queries: Allows AI agents to query and update Kafka using natural language
  • Seamless MCP integration: Works with any MCP client for smooth communication
  • Full Kafka support: Handles producers, consumers, topics, brokers, partitions, and offsets
  • Scalability and lightweight: Designed for high-performance data operations

Environment Variables

Required

  • BOOTSTRAP_SERVERS - URL of your Kafka server
  • MCP_TRANSPORT - Transport protocol for MCP communication

Usage Examples

Publish message 'i am using kafka server' on the topic 'test-kafka'
Consume the message from topic 'test-kafka'
List all topics from the kafka environment
List all topics in the kafka cluster
Create topic 'my-kafka' in kafka cluster

Notes

Run the server using 'python3 src/main.py' or 'uv run python3 src/main.py'. The server requires a running Kafka cluster and proper bootstrap server configuration.

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.