kanapuli
MCP Serverkanapulipublic

mcp kafka

A Model Context Protocol Server to perform Kafka client operations

Repository Info

64
Stars
0
Forks
64
Watchers
2
Issues
Go
Language
MIT License
License

About This Server

A Model Context Protocol Server to perform Kafka client operations

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

mcp-kafka

A Model Context Protocol (MCP) server for performing Kafka client operations from AI assistants.

Overview

mcp-kafka provides a bridge between AI assistants and Apache Kafka, allowing them to interact with Kafka clusters through the Model Context Protocol. This tool enables AI assistants to create, manage, and interact with Kafka topics and messages directly.

Here is a short video demo on youtube

!mcp-kafka-demo

Features

The mcp-kafka server provides the following Kafka operations:

  • Create Topic: Create a new Kafka topic with configurable partitions and replication factor
  • List Topics: Get a list of all available Kafka topics in the cluster
  • Delete Topic: Remove an existing Kafka topic
  • Describe Topic: Get detailed information about a specific topic, including partition details
  • Produce Message: Send messages to a Kafka topic with support for message keys and headers
  • Consume Messages: Read messages from a Kafka topic with configurable timeout

Installation

Prerequisites

  • Go 1.24 or higher
  • A running Kafka cluster (default connection: localhost:9092)

Building from Source

  1. Clone the repository:

    git clone https://github.com/kanapuli/mcp-kafka.git
    cd mcp-kafka
    
  2. Build the application:

    make build
    
  3. Optionally, build for a specific platform:

    make build GOOS=darwin GOARCH=arm64
    

Installing as a Claude Desktop Tool

To use mcp-kafka with Claude Desktop:

  1. Build the application as mentioned above.

  2. Place the executable in a location included in your system PATH or in a dedicated tools directory.

  3. Please follow this Claude Desktop Tool Installation Guide to install the tool.

The JSON to be added to the claude_desktop_config.json file is as follows, Use the right username and password for SASL login. Leave them empty for PLAINTEXT authentication.

{
  "mcpServers": {
    "kafka": {
	    "command": "/Your-mcp-kafka-executable-path/mcp-kafka-darwin-arm64",
      "args": [
          "--bootstrap-servers=localhost:9092",
          "--consumer-group-id=mcp-kafka-consumer-group",
          "--username=",
          "--password="
        ],
      "env": {}
    }
  }
}

Configuration

The mcp-kafka tool accepts the following configuration parameters:

ParameterDescriptionDefault
topicTopic to interact with(required)
num_partitionsNumber of partitions for topic creation(optional)
replication_factorReplication factor for topic creation(optional)
produce_message_keyKey for produced messages(optional)
produce_message_valueValue for produced messages(optional)
produce_message_headersHeaders for produced messages(optional)
consumer_timeoutTimeout in seconds for message consumption10

These parameters will be automatically derived from your Natural language message to the LLM.

CLI flags for the mcp-kafka tool

The following flags should be used to configure the Kafka client:

--bootstrap-servers=localhost:9092
--consumer-group-id=mcp-kafka-consumer-group
--username='your_sasl_username'
--password='your_sasl_password'

NOTE: Currently, SASL_PLAINTEXT is supported along with PLAINTEXT authentication. SASL_SSL is not supported.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Acknowledgments

  • Built using the MCP Golang library

Quick Start

1

Clone the repository

git clone https://github.com/kanapuli/mcp-kafka
2

Install dependencies

cd mcp-kafka
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerkanapuli
Repomcp-kafka
LanguageGo
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation