# Kafka MCP [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/denizgursoy/kafka-mcp  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/kafka-mcp

## Description
Debug Kafka from an agent: find messages, measure consumer lag, unblock consumers, compare clusters.

## Tools
Capabilities this server exposes over MCP:

- **value** — parsed JSON document; the decoded record for Avro, Protobuf, JSON Schema or a configured format; the raw text otherwise
- **key** — string, the decoded document when the key has a schema, or `null` when absent
- **headers** — object of header name to string
- **timestamp** — a `Date
- **format** — json`, `avro`, `protobuf`, `json_schema`, `msgpack`, `text`, `binary` or `null
- **schema_id** — the registry id the value names, or `null
- **decode_error** — why a value that named a schema could not be decoded, or `null

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "kafka-mcp": {
    "url": "http://localhost:8090/mcp/local"
  }
}
```

## Documentation

## What Kafka MCP MCP server does

Kafka MCP connects an MCP client to one or more Kafka clusters and presents Kafka investigation tasks as callable tools. It is intended for debugging and operational inspection rather than general application messaging. The available workflow includes finding messages, checking consumer lag, helping unblock consumers, comparing clusters, and, where permitted, copying or producing messages.

Kafka MCP MCP server can expose multiple endpoints backed by the same or different clusters. An endpoint can identify its cluster, describe its intended use, limit available tools, and operate in read-only mode. Cross-cluster destinations for message-copy operations are also controlled per endpoint.

Message results include a decoded value, key, headers, timestamp, detected format, schema ID, and any decoding error. Supported value formats include JSON, Avro, Protobuf, JSON Schema, MessagePack, text, and binary data. When a record names a schema that cannot be decoded, the result reports the reason instead of hiding the failure.

## How it works

The process speaks MCP over standard input and output by default. With the server option enabled, it serves streamable HTTP endpoints, with each configured endpoint assigned its own route. In stdio mode, a session selects an endpoint by name; in HTTP mode, the route determines the endpoint and therefore the cluster and policy.

Kafka connectivity uses configured broker addresses and the franz-go client library. A configuration can define TLS, custom certificate authorities, mutual TLS, and SASL mechanisms including SCRAM and PLAIN. Credentials can come from environment variables or password files rather than being placed directly in the configuration.

Read and write behavior is applied at the endpoint level. Read-only endpoints withhold writing operations regardless of individual tool settings. The configuration can also disable named tools, and the server validates those names during startup. `server_config` remains available so a client can learn which endpoint, cluster, policy, and tools it reached.

## Setup and configuration

Install a release binary, an MCP bundle, or the published container image. The project also appears in the official MCP Registry. Claude Desktop can install the MCP bundle directly when the platform and architecture are supported.

Create a TOML, YAML, YML, or JSON configuration containing at least one cluster with a broker. Configuration discovery checks the working directory, the user configuration directory, and `/etc`, using the first matching file. Set `CONFIG_FILE` to select a specific file. Run the process over stdio, optionally selecting an endpoint with `--endpoint`; use `--server` to expose configured endpoints over HTTP.

The HTTP listener defaults to port 8090, and its optional base path prefixes endpoint routes and the health check. The output directory defaults to the system temporary directory. Exported files stay inside that directory, and an existing output filename is not overwritten.

## Tools and capabilities

- Search Kafka records and return decoded or raw message data.
- Inspect consumer lag and investigate consumers that are not progressing.
- Compare information across configured Kafka clusters.
- Copy or produce messages when the endpoint policy permits writing.
- Create topics or commit offsets when those tools are enabled.
- Report endpoint configuration and available policy boundaries.

Kafka MCP MCP server is suitable for read-only production investigation when paired with a restricted endpoint. Separate writable endpoints can be used for approved changes, while cross-cluster writes require explicitly listed destination clusters.

## Limitations and notes

The server requires reachable Kafka brokers and a valid cluster configuration. An endpoint cannot widen restrictions imposed by read-only settings, and a destination cluster that is itself read-only will reject writes. Paths must be unique and cannot use `/`, `/healthz`, or include a query or fragment.

Schema decoding depends on the configured format and schema information. Records can therefore contain a decoding error even when the Kafka message itself is available. Keep credentials out of configuration files by using environment references or password files. Configuration fields that are not recognized are ignored.

_Full upstream README: https://allmcps.com/mcp/kafka-mcp/readme_

