Kafka MCP logo

Kafka MCP

by wklee610

Manage Kafka cluster metadata, topics, consumer groups, offsets, messages, configurations, and optional JMX metrics through MCP.

Install Kafka MCP

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for wklee610/kafka-mcp, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

The wklee610/kafka-mcp MCP server connects MCP-compatible agents to Apache Kafka clusters through a Python-based stdio process. It exposes tools for inspecting brokers, topics, consumer groups, configurations, messages, offsets, and optional Prometheus JMX Exporter metrics. Use it when an agent needs Kafka administration or operational visibility, including controlled consumer-group offset changes. Kafka connections support plaintext, TLS/mTLS, SASL mechanisms, and OAuth bearer configurations.

Use cases

  • Inspect Kafka brokers and cluster metadata
  • Manage topics and partition counts
  • Review consumer groups and reset offsets
  • Consume or produce Kafka messages
  • Summarize Kafka health from JMX metrics

Key features

  • Cluster and broker inspection
  • Topic and partition management
  • Consumer-group offset reset and rewind
  • Message consumption and production
  • Dynamic Kafka configuration management
  • Optional JMX Exporter health metrics

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

6/7 checks healthy over the last 78d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars13Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Kafka MCP works

What wklee610/kafka-mcp MCP server does

The wklee610/kafka-mcp MCP server gives an MCP client access to Kafka cluster operations through a collection of structured tools. It can retrieve cluster and broker metadata, inspect and manage topics, view or change dynamic configurations, work with consumer groups, and send or read records.

Topic operations include listing, describing, creating, deleting, and increasing partition counts. Consumer-group tools cover discovery and inspection, along with offset reset and timestamp-based rewind operations. The offset-management tools include state validation, dry-run support, and execution audit logging, which are relevant when changing how a group resumes consumption.

The server also provides optional health summaries from Prometheus JMX Exporter endpoints. These metrics can cover replication, in-sync replicas, controller state, log directories, broker, and topic measurements, subject to the metrics exposed by the configured endpoints.

How it works

The wklee610/kafka-mcp MCP server runs locally with Python 3.10 or newer and communicates with an MCP client over its standard process interface. It uses KAFKA_BOOTSTRAP_SERVERS to locate the Kafka cluster, then creates a Kafka client using the supplied connection and authentication settings.

Run it with uv run kafka-mcp, or build and run the supplied Docker image. A client configuration can launch the process with an environment containing the bootstrap broker address. The repository documents a Claude Desktop setup using uv and the project directory.

Kafka tools do not require JMX monitoring. JMX functionality is enabled separately by supplying one or more HTTP /metrics endpoints from Prometheus JMX Exporter. Endpoints can be provided as JSON, a URL list, or named URL entries. Requests can use HTTPS, custom CA material, client certificates, HTTP Basic authentication, or bearer authentication.

Setup and configuration

Install Python 3.10 or newer, clone the repository, and install dependencies with uv sync. A running Kafka cluster is required. The only required setting is KAFKA_BOOTSTRAP_SERVERS, containing comma-separated broker addresses such as localhost:9092; the default client ID is kafka-mcp.

Optional connection settings select PLAINTEXT, SSL, SASL_PLAINTEXT, or SASL_SSL. SASL supports PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, GSSAPI, and OAUTHBEARER. TLS settings accept CA, client certificate, private key, key password, hostname verification, and certificate revocation list paths. Additional scalar librdkafka properties can be passed as a JSON object through KAFKA_CLIENT_CONFIG_JSON.

Kerberos requires a librdkafka build with GSSAPI support; the documented Docker image builds that variant. OAUTHBEARER can use librdkafka OIDC, metadata, or client-assertion flows, with flow-specific settings.

Tools and capabilities

The wklee610/kafka-mcp MCP server includes tools for:

  • Describing the cluster and listing brokers.
  • Listing, creating, deleting, describing, and repartitioning topics.
  • Reading and changing dynamic topic, broker, and group configurations.
  • Listing and describing consumer groups.
  • Resetting offsets or rewinding them by timestamp, with validation and dry-run behavior.
  • Consuming messages from the beginning, latest position, or specified offsets.
  • Producing messages to Kafka.
  • Summarizing broker and topic health from configured JMX Exporter endpoints.

Limitations and notes

The server does not include a built-in Kafka cluster; it must connect to an existing deployment. JMX tools return a structured not_configured result when no exporter endpoints are supplied. Client certificates and private keys must be configured together for mTLS.

The prebuilt confluent-kafka wheels do not provide GSSAPI. Deployments using Kerberos outside Docker need a compatible librdkafka build. The README also cautions that librdkafka’s unsecured OAuth bearer token handler is intended only for development and testing.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Kafka MCP

wklee610/kafka-mcp is an MCP server that connects LLM agents to Apache Kafka clusters. Its main tools inspect brokers, topics, consumer groups, and configurations; consume and produce messages; and safely reset or rewind consumer-group offsets. Optional tools summarize Kafka health using Prometheus JMX Exporter endpoints.

Install it by cloning the repository and running `uv sync` with Python 3.10 or newer. Start it with `uv run kafka-mcp` after setting `KAFKA_BOOTSTRAP_SERVERS`. The project also provides a Dockerfile for building and running a container.

Configure authentication with the documented security environment variables. Select a security protocol, then set SASL mechanism and credentials for SASL connections, or certificate paths for TLS and mTLS. Additional scalar librdkafka properties can be supplied through `KAFKA_CLIENT_CONFIG_JSON`.

Yes, it provides offset reset and timestamp-based rewind tools with state validation, dry-run support, and execution audit logging. These tools are intended for managing how a consumer group resumes processing, but the server still requires access to the target Kafka cluster.

Add an `mcpServers` entry that launches `kafka-mcp` through `uv`, points to the cloned project directory, and supplies `KAFKA_BOOTSTRAP_SERVERS` in the environment.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewKafka MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/wklee610-kafka-mcp?style=directory)](https://allmcps.com/mcp/wklee610-kafka-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/wklee610-kafka-mcp"><img src="https://allmcps.com/api/badge/wklee610-kafka-mcp?style=directory" alt="Kafka MCP on AllMCPs" /></a>