kafka-mcp-server

kafka-mcp-server

23

The Kafka MCP Server is an MCP server allowing integration with Apache Kafka for LLM models, enabling comprehensive Kafka operations through a standardized protocol. It features security configurations, compatibility with various clients, and robust error handling.

Kafka MCP Server

A Model Context Protocol (MCP) server for Apache Kafka implemented in Go, enabling LLM models to interact with Kafka through a standardized interface.

Overview

  • Produces and consumes messages from topics
  • Lists, describes, and manages topics
  • Monitors and manages consumer groups
  • Assesses cluster health and configuration

Key Features

  • Kafka integration via MCP
  • Supports SASL and TLS authentication
  • Error handling with feedback
  • Customizable configuration
  • Pre-configured prompts for Kafka
  • Compatibility with MCP-compatible LLM models

Getting Started

Prerequisites

  • Go 1.21 or later
  • Docker
  • Access to a Kafka cluster

Installation

Homebrew (macOS and Linux)
  • Use Homebrew to install kafka-mcp-server.
From Source
  • Clone the repository and build the server using Go.

MCP Client Integration

Integrate with MCP-compatible clients by configuring client settings and optionally using Docker.

Tools
  • Produce and consume Kafka messages
  • List brokers and consumer groups
  • Describe topics and consumer groups

Configuration

Environment variables for configuration include KAFKA_BROKERS, KAFKA_CLIENT_ID, MCP_TRANSPORT, etc.

Security Considerations

  • Supports SASL authentication methods and TLS encryption
  • Input validation and secure error handling.

Development

Testing

  • Comprehensive tests available, requiring Docker.

Contributing

  • Open to contributions via Pull Requests.

License

Licensed under the MIT License.