Integrations
Supports environment variable configuration through .env files for Kafka connection settings and tool descriptions.
Provides publish and consume functionalities for Kafka topics, allowing messages to be sent to and retrieved from Kafka streams. Messages consumed cannot be read again using the same group ID.
Utilizes Pydantic for settings management and validation of configuration values.
Kafka MCP Server
A Message Context Protocol (MCP) server that integrates with Apache Kafka to provide publish and consume functionalities for LLM and Agentic applications.
Overview
This project implements a server that allows AI models to interact with Kafka topics through a standardized interface. It supports:
- Publishing messages to Kafka topics
- Consuming messages from Kafka topics
Prerequisites
- Python 3.8+
- Apache Kafka instance
- Python dependencies (see Installation section)
Installation
- Clone the repository:Copy
- Create a virtual environment and activate it:Copy
- Install the required dependencies:If no requirements.txt exists, install the following packages:CopyCopy
Configuration
Create a .env
file in the project root with the following variables:
Usage
Running the Server
You can run the server using the provided main.py
script:
Available transport options:
stdio
: Standard input/output (default)sse
: Server-Sent Events
Integrating with Claude Desktop
To use this Kafka MCP server with Claude Desktop, add the following configuration to your Claude Desktop configuration file:
Replace <PATH TO PROJECTS>
with the absolute path to your project directory.
Project Structure
main.py
: Entry point for the applicationkafka.py
: Kafka connector implementationserver.py
: MCP server implementation with tools for Kafka interactionsettings.py
: Configuration management using Pydantic
Available Tools
kafka-publish
Publishes information to the configured Kafka topic.
kafka-consume
consume information from the configured Kafka topic.
- Note: once a message is read from the topic it can not be read again using the same groupid
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables AI models to publish and consume messages from Apache Kafka topics through a standardized interface, making it easy to integrate Kafka messaging with LLM and agent applications.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables AI models to interact with messages from various messaging platforms (Mobile, Mail, WhatsApp, LinkedIn, Slack, Twitter, Telegram, Instagram, Messenger) through a standardized interface.Last updated -33PythonMIT License
- -securityFlicense-qualityEnables AI and LLM systems to interact with the Buttondown newsletter service, supporting email drafting, scheduling, analytics retrieval, and list management through a Model Context Protocol interface.Last updated -TypeScript
YaVendió Toolsofficial
-security-license-qualityAn MCP-based messaging system that allows AI systems to interact with various messaging platforms through standardized tools for sending text, images, documents, buttons, and alerts.Last updated -Pythonmcp-confluentofficial
AsecurityAlicenseAqualityAn MCP server implementation built to interact with Confluent Kafka and Confluent Cloud REST APIs.Last updated -242026TypeScriptMIT License