SuperAPI AI Directory

mcp-kafka

Monitor and manage Apache Kafka clusters, topics and consumer groups (including lag), with access modes, topic allowlists and delete gating.

Open website

About this tool

Purpose

mcp-kafka is a Model Context Protocol (MCP) server for Apache Kafka. It lets MCP-capable clients (such as Claude Desktop, Claude Code, etc.) monitor and manage Kafka clusters, covering topics, partitions, configs, and consumer groups (including consumer lag). The server's behavior is entirely controlled by flags.

Main Capabilities

Monitoring

  • Cluster/broker information
  • Topic metadata and offsets
  • Consumer groups
  • Per-partition and overall consumer lag

Management

  • Create topics
  • Add partitions
  • Modify topic configs
  • Reset consumer group offsets
  • Delete topics/consumer groups (admin mode)

Access Modes

A layered design is used: read-only → read-write → admin. A mode never exposes tools above its level.

Safety Flags

  • Topic allowlist
  • Protected/internal topics
  • Delete gating
  • Dry-run
  • JSON audit logging

Authentication

Supports plaintext, TLS, and SASL (PLAIN / SCRAM-SHA-256 / SCRAM-SHA-512).

Tool List

Read-only (read-only and above)

  • cluster_info
  • list_topics
  • describe_topic
  • topic_offsets
  • list_consumer_groups
  • describe_consumer_group (including lag)

Write operations (read-write and above)

  • create_topic
  • create_partitions
  • alter_topic_config
  • reset_consumer_group_offsets

Admin (admin)

  • delete_topic
  • delete_consumer_group

Both require the KAFKA_ALLOW_DELETE flag.

Usage

Quick Start - Add to Your Agent

Published to npm as @dockndevai/mcp-kafka. No cloning or building required - your MCP client will run it on demand via npx. It is recommended to start in read-only mode; see .env.example for all variables, and docs/CLIENTS.md for the complete per-client guide.

  • Claude Code (CLI): The material mentions that this client is supported, but does not provide specific configuration code.
  • Claude Desktop, Cursor, Windsurf: Use the same configuration block, placed in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json.
  • OpenAI Codex CLI: Configure in ~/.codex/config.toml.
  • VS Code (GitHub Copilot, Agent mode): Configure in .vscode/mcp.json.

(The specific configuration code blocks for the above clients are not given in the provided text.)

Example Prompts

  • "Which consumer groups have the most lag right now?"
  • "Describe the orders topic and show its offsets."
  • "Create a topic events with 6 partitions and 7-day retention." (requires read-write)

Run from Source (Development)

Prefer the published package above. If you need to run from a clone, the material mentions that it is possible, but does not provide specific commands.

The server ships with a server.json for the official MCP registry, as well as an m for npm ownership verificationcpName. For information about publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP, see PUBLISHING.md.

Applicable Scenarios

Suitable for operations personnel, developers, or agent workflows that need to monitor and manage Kafka clusters through an MCP client.

Limitations

  • Starts in read-only mode by default; destructive operations such as deletion require explicitly enabling the deletion gate and being in administrator mode.
  • Access modes are layered, and lower-level modes cannot use higher-level tools.
  • Topic allowlists and protected/internal topics need to be configured to enhance security.
  • Specific client configuration code, environment variable details, and source code run commands are not fully provided in the supplied materials and are not yet available.