mcp-kafka
The provided schema exposes read-only Kafka monitoring; the README notes that higher modes add write/admin management.
Inspect cluster info: brokers, controller, and cluster id.
List topic names, with allowlist filtering and optional internal topics.
Describe a topic: partitions, replicas, in-sync replicas, and non-default configs.
View earliest/latest offsets per partition for a topic.
List consumer groups and their protocol types.
Describe a consumer group and compute per-partition and total lag.
Per README: read-write mode can create topics, add partitions, alter configs, and reset group offsets; admin mode can delete topics/groups when explicitly allowed.
Provides monitoring and management for Apache Kafka clusters, including cluster/topic metadata, consumer groups and lag, topic creation and configuration, partition management, offset resets, and guarded deletion of topics and consumer groups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-kafka Which consumer groups have the most lag right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-kafka
A Model Context Protocol 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).
Related MCP server: Kafka MCP Server
Security model
Concern | Flag | Default | Effect |
What can the server do? |
|
|
|
Which topics are in scope? |
| (all) | When set, operations on other topics are refused. |
Protect internal topics |
|
| Topics starting with |
Protect specific topics |
| (none) | Additional read-only-forever topics. |
Can it delete? |
|
|
|
Preview without touching the cluster |
|
| Write/admin tools validate + log intent, then return. |
Audit trail |
|
| Emits a JSON line to stderr per guarded operation. |
Interactive confirmation | (automatic) | — | Destructive & high-impact actions prompt the human to approve via MCP elicitation before running. The prompt shows the tool, the exact arguments and a fingerprint; the target's version is pinned across the prompt and the action is refused if it changed; a prompt nobody answers is a refusal. |
Require a human |
|
| When |
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. No clone or build needed — your MCP client runs it on demand with npx. Start in read-only mode; see .env.example for every variable and docs/CLIENTS.md for the full per-client guide.
Claude Code (CLI)
claude mcp add kafka -e KAFKA_BROKERS="localhost:9092" -e KAFKA_MODE="read-only" -- npx -y @dockndevai/mcp-kafkaClaude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.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:
[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:
{
"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
orderstopic and show its offsets.""Create a topic
eventswith 6 partitions and 7-day retention." (needsread-write)
Run from source (development)
Prefer the published package above. To run from a clone:
npm install
npm run build
node dist/index.js # with the environment variables setDevelop
npm run dev
npm test
npm run typecheckPublishing
This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.
License
MIT
Available Tools
6 toolscluster_infoCluster infoARead-onlyIdempotent
Describe the Kafka cluster: brokers, controller, and cluster id.
Inputs: no named parameters.
describe_consumer_groupDescribe consumer group (with lag)BRead-onlyIdempotent
Describe a consumer group's state and compute per-partition and total lag across its topics.
Inputs: groupId (required).
describe_topicDescribe topicCRead-onlyIdempotent
Partitions, replicas, in-sync replicas, and non-default configs for a topic.
Inputs: topic (required).
list_consumer_groupsList consumer groupsARead-onlyIdempotent
List consumer groups and their protocol types.
Inputs: no named parameters.
list_topicsList topicsBRead-onlyIdempotent
List topic names. Topics outside the allowlist are filtered out.
Inputs: includeInternal.
topic_offsetsTopic offsetsARead-onlyIdempotent
Earliest and latest offsets per partition for a topic (message backlog view).
Inputs: topic (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource+action: topic listing vs. topic detail vs. offset backlog, consumer group listing vs. group detail/lag, and cluster summary. The list_* vs describe_* split is crisp, and topic_offsets is clearly separated from describe_topic. No two tools could be reasonably confused.
Most tools follow a verb_noun pattern (list_topics, describe_topic, describe_consumer_group, list_consumer_groups), but topic_offsets and cluster_info use noun-phrase forms. The deviation is minor and still readable, and the overall style is snake_case and predictable.
Six tools is well-scoped for a read-only Kafka inspection server, covering the three core surfaces (topics, consumer groups, cluster) without redundancy. Each tool earns its place with no filler.
The read-only inspection surface is coherent and covers topic metadata, offset backlog, consumer group lag, and cluster state with no dead ends within its scope. Gaps exist for write/admin operations (create/delete topics, config changes) and message preview, but these appear intentionally out of scope.
Maintenance
Related MCP Connectors
Managed MCP gateway with OAuth, per-agent permissions, shared accounts and activity logs.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
One MCP URL for all your connectors — scoped writes, enforced constraints, and a full audit trail.
Managed Keycloak from any MCP client: clusters, realms, apps, SSO, users, domains, audit events.
Related MCP Servers
AlicenseBqualityAmaintenanceAn MCP server implementation built to interact with Confluent Kafka and Confluent Cloud REST APIs.241,927 npm169MIT- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Kafka clusters to manage topics, monitor consumer groups, and stream messages. It provides a comprehensive suite of tools for broker metadata inspection and local Kafka user management.MIT
- AlicenseBqualityBmaintenanceMCP server for Apache Kafka that allows LLM agents to inspect topics, consumer groups, and safely manage offsets (reset, rewind).1913Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Kafka clusters via MCP, supporting topic management (list, create, delete, inspect), connection initialization, and more through natural language.1Apache 2.0