# MCP Kafka

> MCP Kafka is an open-source MCP server for developer tools. Governed MCP server to monitor Kafka clusters and consumer lag from an AI client. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Repository:** https://github.com/dockndevai/mcp-kafka
- **MCP Registry name:** io.github.dockndevai/mcp-kafka
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-18

## About

Where most Kafka tooling is built for dashboards, this server answers questions in chat such as which consumer groups are furthest behind. Consumer-group descriptions report lag per partition and in total, alongside broker and cluster info, topic metadata and offsets.

Behaviour is set by flags. KAFKA_MODE starts at read-only and widens to read-write (create topics, add partitions, alter topic configs, reset group offsets) and then admin (delete topics and consumer groups, which also needs KAFKA_ALLOW_DELETE). Tools above the chosen mode are never registered. Topics beginning with an underscore are protected from changes by default, a topic allowlist narrows scope, and a dry-run option previews writes.

Connection supports plaintext, TLS and SASL (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512). Destructive actions ask a person to approve through MCP elicitation, and each guarded operation writes a JSON audit line to stderr.

## Features

- **Consumer lag reporting:** Per-partition and total lag for any consumer group.
- **Topic inspection:** Describe topics and read their offsets.
- **Layered access modes:** Read-only, read-write and admin, with higher tools left unregistered.
- **Internal topic protection:** Topics starting with an underscore can be read but not changed by default.
- **Topic allowlist:** Limit operations to a chosen set of topics.
- **SASL and TLS support:** Connect over plaintext, TLS or SASL with PLAIN or SCRAM.

## Good for

- Find the consumer groups with the most lag
- Inspect a topic's partitions and offsets during an incident
- Create a topic with a set partition count and retention
- Reset a consumer group's offsets after a bad deploy
- Preview cluster changes with dry-run before applying them

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-kafka --env KAFKA_BROKERS='<KAFKA_BROKERS>' -- npx -y @dockndevai/mcp-kafka
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-kafka": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-kafka"
      ],
      "env": {
        "KAFKA_BROKERS": "<KAFKA_BROKERS>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-kafka": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-kafka"
      ],
      "env": {
        "KAFKA_BROKERS": "<KAFKA_BROKERS>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-kafka": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-kafka"
      ],
      "env": {
        "KAFKA_BROKERS": "<KAFKA_BROKERS>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-kafka": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-kafka"
      ],
      "env": {
        "KAFKA_BROKERS": "<KAFKA_BROKERS>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-kafka": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-kafka"
      ],
      "env": {
        "KAFKA_BROKERS": "<KAFKA_BROKERS>"
      }
    }
  }
}
```

## Tools

- `cluster_info`: Cluster and broker information
- `list_topics`: List topics
- `describe_topic`: Describe a topic
- `topic_offsets`: Read topic offsets
- `list_consumer_groups`: List consumer groups
- `describe_consumer_group`: Describe a consumer group, including lag
- `create_topic`: Create a topic (read-write)
- `create_partitions`: Add partitions (read-write)
- `alter_topic_config`: Alter topic configuration (read-write)
- `reset_consumer_group_offsets`: Reset a group's offsets (read-write)
- `delete_topic`: Delete a topic (admin)
- `delete_consumer_group`: Delete a consumer group (admin)

## FAQ

### Which tools does it expose?

Read tools for cluster, topics, offsets and consumer groups; write tools to create topics and partitions, alter configs and reset offsets; and two delete tools in admin mode.

### Can it delete topics by default?

No. Deletion needs admin mode and KAFKA_ALLOW_DELETE=true.

### What does it require to run?

A comma-separated KAFKA_BROKERS list; the mode defaults to read-only.

### Which clients work with it?

Claude Desktop, Claude Code, Cursor, Windsurf, Codex CLI and VS Code with Copilot agent mode.

### Is MCP Kafka free?

Yes. MCP Kafka is open source, so you can use and self-host it for free.

### How do I add MCP Kafka to Claude Code?

Run this command in your terminal: claude mcp add mcp-kafka --env KAFKA_BROKERS='<KAFKA_BROKERS>' -- npx -y @dockndevai/mcp-kafka

### What are the best alternatives to MCP Kafka?

The closest alternatives to MCP Kafka are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/mcp-kafka
