Skip to main content
ClaudeWave

MCP server for Apache Kafka — monitor & manage clusters, topics, and consumer groups (with lag), with security modes and access-control flags.

MCP ServersOfficial Registry1 stars0 forksTypeScriptMITUpdated today
ClaudeWave Trust Score
95/100
Verified
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
  • Documented (README)
Last scanned: 8/24/2026
Install in Claude Code / Claude Desktop
Method: NPX · @dockndevai/mcp-kafka
Claude Code CLI
claude mcp add mcp-kafka -- npx -y @dockndevai/mcp-kafka
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "mcp-kafka": {
      "command": "npx",
      "args": ["-y", "@dockndevai/mcp-kafka"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Use cases

MCP Servers overview

# mcp-kafka

[![CI](https://github.com/dockndevai/mcp-kafka/actions/workflows/ci.yml/badge.svg)](https://github.com/dockndevai/mcp-kafka/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![npm](https://img.shields.io/npm/v/@dockndevai/mcp-kafka)](https://www.npmjs.com/package/@dockndevai/mcp-kafka)

A [Model Context Protocol](https://modelcontextprotocol.io) server for **Apache Kafka**. It lets an MCP-capable client (Claude Desktop, Claude Code, etc.) **monitor and manage** Kafka clusters — topics, partitions, configs, and consumer groups (including lag) — with behaviour controlled entirely by flags.

Safe by default: it starts read-only, can be scoped to an allowlist of topics, protects internal/critical topics from mutation, and gates destructive operations behind an explicit opt-in.

## Features

- **Monitoring** — cluster/broker info, topic metadata and offsets, consumer groups, and **per-partition + total consumer lag**.
- **Management** — create topics, add partitions, alter topic configs, reset group offsets; delete topics/groups (admin).
- **Access modes** — `read-only` → `read-write` → `admin`, layered so a mode never exposes tools above its level.
- **Security flags** — topic allowlist, protected/internal topics, delete gating, dry-run, and JSON audit logging (see below).
- **Auth** — plaintext, TLS, and SASL (PLAIN / SCRAM-SHA-256 / SCRAM-SHA-512).

## Security model

| Concern | Flag | Default | Effect |
| --- | --- | --- | --- |
| What can the server do? | `KAFKA_MODE` | `read-only` | `read-only` exposes only monitoring; `read-write` adds management; `admin` adds deletes. Tools above the mode are **never registered**. |
| Which topics are in scope? | `KAFKA_TOPIC_ALLOWLIST` | *(all)* | When set, operations on other topics are refused. |
| Protect internal topics | `KAFKA_PROTECT_INTERNAL_TOPICS` | `true` | Topics starting with `_` can be read but never mutated. |
| Protect specific topics | `KAFKA_PROTECTED_TOPICS` | *(none)* | Additional read-only-forever topics. |
| Can it delete? | `KAFKA_ALLOW_DELETE` | `false` | `delete_topic` / `delete_consumer_group` need this **and** admin mode. |
| Preview without touching the cluster | `KAFKA_DRY_RUN` | `false` | Write/admin tools validate + log intent, then return. |
| Audit trail | `KAFKA_AUDIT_LOG` | `true` | Emits a JSON line to stderr per guarded operation. |

## Tools

**Read** (`read-only`+): `cluster_info`, `list_topics`, `describe_topic`, `topic_offsets`, `list_consumer_groups`, `describe_consumer_group` (with lag)

**Write** (`read-write`+): `create_topic`, `create_partitions`, `alter_topic_config`, `reset_consumer_group_offsets`

**Admin** (`admin`): `delete_topic`, `delete_consumer_group` (both need `KAFKA_ALLOW_DELETE`)

## Quickstart — add to your agent

Published on npm as [`@dockndevai/mcp-kafka`](https://www.npmjs.com/package/@dockndevai/mcp-kafka). No clone or build needed — your MCP client runs it on demand with `npx`. **Start in `read-only` mode**; see [`.env.example`](.env.example) for every variable and [docs/CLIENTS.md](docs/CLIENTS.md) for the full per-client guide.

**Claude Code** (CLI)

```bash
claude mcp add kafka -e KAFKA_BROKERS="localhost:9092" -e KAFKA_MODE="read-only" -- npx -y @dockndevai/mcp-kafka
```

**Claude Desktop · Cursor · Windsurf** — same block in `claude_desktop_config.json`, `.cursor/mcp.json`, or `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "kafka": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-kafka"
      ],
      "env": {
        "KAFKA_BROKERS": "localhost:9092",
        "KAFKA_MODE": "read-only"
      }
    }
  }
}
```

**OpenAI Codex CLI** — in `~/.codex/config.toml`:

```toml
[mcp_servers.kafka]
command = "npx"
args = ["-y", "@dockndevai/mcp-kafka"]
env = { KAFKA_BROKERS = "localhost:9092", KAFKA_MODE = "read-only" }
```

**VS Code (GitHub Copilot, Agent mode)** — in `.vscode/mcp.json`:

```json
{
  "servers": {
    "kafka": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-kafka"
      ],
      "env": {
        "KAFKA_BROKERS": "localhost:9092",
        "KAFKA_MODE": "read-only"
      }
    }
  }
}
```

## 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."* (needs `read-write`)

## Run from source (development)

Prefer the published package above. To run from a clone:

```bash
npm install
npm run build
node dist/index.js   # with the environment variables set
```

## Develop

```bash
npm run dev
npm test
npm run typecheck
```

## Publishing

This server ships a [`server.json`](server.json) for the official MCP registry and an [`mcpName`](package.json) for npm ownership validation. See **[PUBLISHING.md](PUBLISHING.md)** for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.

## License

MIT
apache-kafkakafkallmmcpmodel-context-protocolobservability

What people ask about mcp-kafka

What is dockndevai/mcp-kafka?

+

dockndevai/mcp-kafka is mcp servers for the Claude AI ecosystem. MCP server for Apache Kafka — monitor & manage clusters, topics, and consumer groups (with lag), with security modes and access-control flags. It has 1 GitHub stars and its last recorded update is dated 2026-08-23.

How do I install mcp-kafka?

+

You can install mcp-kafka by cloning the repository (https://github.com/dockndevai/mcp-kafka) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is dockndevai/mcp-kafka safe to use?

+

Our security agent has analyzed dockndevai/mcp-kafka and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.

Who maintains dockndevai/mcp-kafka?

+

dockndevai/mcp-kafka is maintained by dockndevai. The last recorded GitHub activity is dated 2026-08-23, with 0 open issues.

Are there alternatives to mcp-kafka?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy mcp-kafka to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: dockndevai/mcp-kafka
[![Featured on ClaudeWave](https://claudewave.com/api/badge/dockndevai-mcp-kafka)](https://claudewave.com/repo/dockndevai-mcp-kafka)
<a href="https://claudewave.com/repo/dockndevai-mcp-kafka"><img src="https://claudewave.com/api/badge/dockndevai-mcp-kafka" alt="Featured on ClaudeWave: dockndevai/mcp-kafka" width="320" height="64" /></a>

More MCP Servers

mcp-kafka alternatives