Kafka

Kafka

A Model Context Protocol (MCP) server for Apache Kafka implemented in Go, leveraging franz-go.

38
Stars
10
Forks
10
Releases

Overview

Kafka MCP Server bridges the gap between LLM models and Apache Kafka, enabling them to produce and consume messages, list, describe, and manage topics, monitor consumer groups, and assess cluster health and configuration through the MCP interface. The server implements an MCP Protocol Handler with three registries—Tools (Kafka operations), Resources (health and diagnostics), and Prompts (pre-configured workflows)—and a Kafka client wrapper that communicates with the cluster via the franz-go library. The architecture connects MCP clients (AI applications such as Claude Desktop, Cursor, Windsurf, and ChatWise) to an Apache Kafka cluster, translating MCP requests into Kafka API calls and returning results. It supports STDIO by default for local use and HTTP for remote access, with optional OAuth 2.1 authentication on the HTTP transport. The server exposes tools (produce_message, consume_messages, list_brokers, describe_topic, list_consumer_groups, describe_consumer_group, describe_configs, cluster_overview, list_topics), resources (overview, health_check, under-replicated_partitions, consumer_lag_report), and prompts (kafka_cluster_overview, kafka_health_check, kafka_under_replicated_partitions, kafka_consumer_lag_report). Security includes SASL, TLS, and OAuth 2.1 providers.

Details

Owner
tuannvm
Language
Go
License
Updated
2025-12-07

Features

Kafka operations via MCP

Implements common Kafka operations (produce/consume, describe topics, list topics, consumer groups, configs) accessible through MCP tools.

Security and authentication

Supports SASL (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512) and TLS, plus OAuth 2.1 for HTTP transport with providers such as Okta, Google, Azure AD, and HMAC.

Flexible transport

STDIO for local clients and HTTP for remote access.

Error handling

Meaningful feedback and robust input validation to prevent injection and misconfigurations.

Configurability

Environment-based options to customize servers for different environments.

Pre-configured prompts

Includes a set of pre-configured prompts for Kafka operations and diagnostics.

MCP compatibility with LLMs

Designed to work with MCP-compatible LLM models.

Audience

LLM ModelsInteract with Kafka through MCP to perform produce/consume and manage topics.
AI ApplicationsConnect to Kafka MCP Server to run Kafka workflows through prompts and tools.
DevelopersIntegrate MCP server into applications for Kafka task automation and diagnostics.

Tags

KafkaMCPGofranz-goLLMToolsResourcesPromptsSecurityOAuth 2.1HTTP transportSTDIO transport