Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

kafka-mcp MCP server](https://glama.ai/mcp/servers/wklee610/kafka-mcp/badges/score.svg)](https://glama.ai/mcp/servers/wklee610/kafka-mcp) 🐍 🏠 ☁️ - MCP server for Apache Kafka that allows LLM agents to inspect topics, consumer groups, and safely manage...

README.md

Kafka MCP Server

!Python !License !Kafka !MCP

---

An MCP server implementation for Kafka, allowing LLMs to interact with and manage Kafka clusters.

Features

  • Cluster Management: View broker details describe_cluster, describe_brokers.
  • Topic Management: List list_topics, create create_topic, delete delete_topic, describe describe_topic, and increase partitions create_partitions.
  • Configuration Management: View describe_configs and modify alter_configs dynamic configs for topics, brokers, and groups.
  • Consumer Groups: List list_consumer_groups, describe describe_consumer_group, and securely manage offsets with reset_consumer_group_offset and rewind_consumer_group_offset_by_timestamp. Advanced tools include state validation, dry runs, and execution audit logging.
  • Messaging: Consume messages consume_messages (from beginning, latest, or specific offsets) and produce messages produce_message.

Prerequisites

  • Python 3.10+
  • uv package manager (recommended)
  • A running Kafka cluster (e.g., local Docker, Confluent Cloud, etc.)

Installation

  1. Clone the repository.
  2. Install dependencies:
   uv sync

Configuration

The server requires the KAFKA_BOOTSTRAP_SERVERS environment variable.

  • KAFKA_BOOTSTRAP_SERVERS: Comma-separated list of broker urls (e.g., localhost:9092).
  • KAFKA_CLIENT_ID: (Optional) Client ID for connection (default: kafka-mcp).

Usage

Running the Server

You can run the server directly using uv or python, or use Docker.

Using uv (Recommended)

export KAFKA_BOOTSTRAP_SERVERS=localhost:9092
uv run kafka-mcp

Using Docker

  1. Build the Docker image:
   docker build -t kafka-mcp .
  1. Run the container:
   docker run -i --rm -e KAFKA_BOOTSTRAP_SERVERS=host.docker.internal:9092 kafka-mcp

(Note: Use host.docker.internal instead of localhost if your Kafka cluster is running on the host machine.)

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file (claude_desktop_config.json):

{
  "mcpServers": {
    "kafka": {
      "command": "<uv PATH>",
      "args": [
        "--directory",
        "<kafka-mcp PATH>",
        "run",
        "kafka-mcp"
      ],
      "env": {
        "KAFKA_BOOTSTRAP_SERVERS": "localhost:9092"
      }
    }
  }
}

Debugging / Development

To verify that the server can start and connect to your Kafka cluster (ensure your Kafka is running first):

# Set your bootstrap server
export KAFKA_BOOTSTRAP_SERVERS=localhost:9092

# Run a quick check
uv run python -c "from src.kafka_mcp import main; print('Imports successful')"

Available Tools

| Category | Tool Name | Description | |----------|-----------|-------------| | Cluster | describe_cluster | Get cluster metadata (controller, brokers). | | | describe_brokers | List all brokers. | | Topics | list_topics | List all available topics. | | | describe_topic | Get detailed info (partitions, replicas) for a topic. | | | create_topic | Create a new topic with partitions/replication factor. | | | delete_topic | Delete a topic. | | | create_partitions | Increase partitions for a topic. | | Configs | describe_configs | View dynamic configs for topic/broker/group. | | | alter_configs | Update dynamic configs. | | Consumers | list_consumer_groups | List all active consumer groups. | | | describe_consumer_group | Get members and state of a group. | | | get_consumer_group_offsets | Get committed offset, high/low watermarks, and calculate total lag for a topic. | | | reset_consumer_group_offset | Safely change consumer group offsets to earliest, latest, or a specific offset. | | | rewind_consumer_group_offset_by_timestamp | Rewind/advance consumer group offsets securely based on a timestamp. | | Messages | consume_messages | Consume messages from a topic (supports offsets, limits). | | | produce_message | Send a message to a topic. |

Project Structure

src/kafka_mcp/
β”œβ”€β”€ configs/       # Configuration handling
β”œβ”€β”€ connections/   # Kafka client factories (singleton)
β”œβ”€β”€ tools/         # Tool implementations
β”‚   β”œβ”€β”€ admin.py     # Topic & Config management
β”‚   β”œβ”€β”€ cluster.py   # Cluster metadata
β”‚   β”œβ”€β”€ consumer.py  # Consumer group & message consumption
β”‚   └── producer.py  # Message production
└── main.py        # Entry point & MCP tool registration

Troubleshooting

  • Connection Refused: Ensure KAFKA_BOOTSTRAP_SERVERS is correct and reachable.

TODO

  • SASL
  • JMX

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use AI & ML servers.