# Kafka MCP

> Kafka MCP is an open-source MCP server for developer tools. Debug Kafka from an agent: find messages, measure lag, unblock consumers, compare clusters. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://denizgursoy.github.io/kafka-mcp/
- **Repository:** https://github.com/denizgursoy/kafka-mcp
- **MCP Registry name:** io.github.denizgursoy/kafka-mcp
- **Categories:** developer tools, cloud and infrastructure
- **Listing updated:** 2026-11-14

## About

Kafka incidents usually start with a question like where is the message for order 1042, or why is this consumer stuck. This server turns those checks into tools an agent can call, and every write shows a preview before anything changes. Each answer states what it covered, so a partial scan is not mistaken for a full one.

One process can connect to several clusters. In stdio mode an endpoint is chosen for the session; in HTTP mode each endpoint gets its own path, so a session is bound to one cluster by how it connects rather than by a parameter a caller could forget. Endpoint policy lives in a kafka-mcp.yaml file: you can mark an endpoint read_only or switch off single tools such as copy_message, and keep passwords out of the file with {env:VAR} references. TLS, mTLS and SCRAM authentication are supported, and the client library is franz-go.

It ships as a binary, an MCP bundle for Claude Desktop, a container image and a registry entry, and a Kafka debugging skill is embedded in the binary.

## Features

- **Find messages:** Locates a message by a value such as an order id across a topic.
- **Consumer lag:** Measures lag per consumer group.
- **Preview before write:** Every change shows a preview before it is applied.
- **Multi-cluster endpoints:** One process serves several clusters, each endpoint with its own policy and path.
- **Read-only mode:** Endpoints can be read_only or disable individual tools.
- **Several install paths:** Binary, MCP bundle, container image or registry install.

## Good for

- Trace a message by order id through a topic
- Check how far behind a consumer group is
- Unblock a stuck consumer with a previewed change
- Compare two clusters before and after a migration
- Give agents read-only access to production while keeping a separate writable endpoint

## Install

### Claude Code (Terminal)

```sh
claude mcp add kafka-mcp -- docker run -i --rm ghcr.io/denizgursoy/kafka-mcp:v0.2.8
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "kafka-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/denizgursoy/kafka-mcp:v0.2.8"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "kafka-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/denizgursoy/kafka-mcp:v0.2.8"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "kafka-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/denizgursoy/kafka-mcp:v0.2.8"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "kafka-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/denizgursoy/kafka-mcp:v0.2.8"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "kafka-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/denizgursoy/kafka-mcp:v0.2.8"
      ]
    }
  }
}
```

## Tools

- `server_config`: Reports the endpoint's description so a caller knows its intended use.
- `skill_reference`: Reads the built-in Kafka debugging skill.
- `copy_message`: Copies a message; can be switched off per endpoint in the configuration.

## FAQ

### Can an agent change data by accident?

Writes show a preview first, and endpoints can be set read_only or have tools such as copy_message turned off.

### Does it support TLS and SASL?

Yes. The sample config shows TLS with a CA file, optional mTLS, and SCRAM-SHA-256 or SCRAM-SHA-512.

### How do I keep passwords out of the config?

Use {env:VAR} references or password_file instead of writing the password in the YAML.

### What does it need to run from source?

The site says Go 1.27 or later, and the tests need Docker.

### Is Kafka MCP free?

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

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

Run this command in your terminal: claude mcp add kafka-mcp -- docker run -i --rm ghcr.io/denizgursoy/kafka-mcp:v0.2.8

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

The closest alternatives to Kafka MCP are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [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.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

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