How It Works
Three steps to give your AI agents full Kafka access.
Install
go install github.com/josedab/kafkamcp/cmd/kafkamcp@latestSingle Go binary, no JVM or CGO. Signed Docker images and pre-built binaries begin with the first tagged release.
Configure
kafkamcp init --output kafkamcp.yamlPoint it at your Kafka clusters. Add Schema Registry, access policies, and audit logging as needed.
Connect
kafkamcp --config kafkamcp.yamlWire it into Claude Desktop, LangChain, CrewAI, or any MCP-compatible client. Agents get instant Kafka access.
Why KafkaMCP
Everything agents need to work with Kafka β built into a single server.
π Discover
Agents list topics, browse schemas, inspect consumer groups, and explore cluster topology β with zero prior knowledge.
π¨ Consume & Produce
Read messages with flexible positioning (offset, timestamp, latest) and publish with delivery confirmation and schema validation.
π Secure by Default
Per-agent access control with default-deny policies, rate limiting, TLS 1.3, and a full audit trail of every interaction.
π Schema-Aware
Auto-discovers Avro, Protobuf, and JSON schemas from Schema Registry. Agents understand message structure without human annotation.
ποΈ Multi-Cluster
Connect to multiple Kafka clusters. Each tool accepts a cluster parameter. Agents discover clusters via MCP resources.
π Observable
Prometheus metrics, OpenTelemetry tracing, Grafana dashboards, and a built-in web UI for real-time monitoring.
Your Agent, Connected to Kafka
Once KafkaMCP is running, agents interact with Kafka using natural language.
kafka_list_topics β Discover your entire Kafka topologykafka_consume β Read messages with flexible positioningkafka_describe_consumer_group β Monitor consumer health and lagkafka_analyze_dlq β Categorize and diagnose DLQ errorsRead-only by default (β€15 tools in core-read pack). Additional packs β ops-write and governance β unlock real, guarded mutations and policy controls behind approval enforcement. Full tool catalog and 9 MCP resources cover discovery, consumption, schema management, consumer groups, connectors, and more.
server:
transport: stdio
clusters:
- name: production
bootstrap_servers: "broker:9092"
default: true
schema_registry:
url: "http://schema-registry:8081"
policies:
default_deny: true
agents:
- id: "my-agent"
topics:
- pattern: "orders.*"
permissions: [read, write]
rate_limit:
requests_per_minute: 120
audit:
enabled: trueArchitecture
A purpose-built bridge between AI agents and Apache Kafka.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Agents (Claude, LangChain, CrewAI, AutoGen, Custom) β
ββββββββββββββββ¬ββββββββββββββββββββββ¬ββββββββββββββββββββββ
β stdio β SSE / HTTP
ββββββββββββββββΌββββββββββββββββββββββΌββββββββββββββββββββββ
β KafkaMCP Server β
β βββββββββββ βββββββββββ ββββββββ ββββββββββ ββββββββββ β
β β β€15 β β 18 β β Auth β β Rate β β Audit β β
β β Tools * β β Rsrcs β βEngineβ βLimiter β β Logger β β
β ββββββ¬βββββ ββββββ¬βββββ ββββββββ ββββββββββ ββββββββββ β
β βββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β ββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ β
β β Kafka Client (franz-go) β Schema Registry β Connectβ β
β ββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββΌβββββββββββββββ
βΌ βΌ βΌ
βββββββββββ βββββββββββββ ββββββββββββ
β Kafka β β Schema β β Kafka β
β Brokers β β Registry β β Connect β
βββββββββββ βββββββββββββ ββββββββββββ
* Default core-read pack. ops-write/governance packs available.Join the Community
KafkaMCP is open source under the Apache 2.0 license. We welcome contributions of all kinds.