Getting Started
Get KafkaMCP running and connected to your Kafka cluster in under 5 minutes.
Prerequisites
- A running Kafka cluster (local or remote)
- One of the following (choose your preferred install method):
- Go 1.25+ (for source install)
- Docker
- Pre-built binary from GitHub Releases
Step 1: Install
:::warning Pre-release repository No signed binary or GHCR image has been published yet. Use Go Install or From Source today. The Binary and Docker commands below become available after the first tagged release. :::
- Go Install
- Binary (after first release)
- Docker (after first release)
- From Source
go install github.com/josedab/kafkamcp/cmd/kafkamcp@latest
# Download the latest release for your platform
# Browse all releases: https://github.com/josedab/kafkamcp/releases
curl -sSL https://github.com/josedab/kafkamcp/releases/latest/download/kafkamcp_$(uname -s)_$(uname -m).tar.gz | tar xz
sudo mv kafkamcp /usr/local/bin/
docker pull ghcr.io/josedab/kafkamcp:VERSION
git clone https://github.com/josedab/kafkamcp.git
cd kafkamcp
go build -o bin/kafkamcp ./cmd/kafkamcp
Step 2: Configure
Create a kafkamcp.yaml file:
server:
transport: stdio
log_level: info
# tool_packs defaults to [core-read] — ≤15 read-only tools.
# Guarded packs (ops-write/governance) require secure HTTP identity and a signing key.
clusters:
- name: local
bootstrap_servers: "localhost:9092"
security_protocol: PLAINTEXT
default: true
audit:
enabled: true
max_entries: 10000
For Confluent Cloud, AWS MSK, or other managed Kafka services, see the configuration reference for SASL/TLS settings.
:::warning Guarded packs require a network transport
ops-write and governance cannot be used with transport: stdio. To
enable either pack you must:
- Switch to
transport: sseortransport: streamable-http - Configure a cryptographic identity provider (
policies.identity.provider: static,oidc, ormtls) - Set
policies.default_deny: true - Set
KAFKAMCP_APPROVAL_SIGNING_KEY(≥32 bytes) in your environment
Every mutating tool will then require a short-lived, two-person approval grant before it executes. See the Security guide for the full approval workflow. :::
Step 3: Validate
Verify your configuration is correct:
kafkamcp validate --config kafkamcp.yaml
You should see:
Configuration is valid.
Step 4: Connect to an AI Agent
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"kafkamcp": {
"command": "kafkamcp",
"args": ["--config", "/path/to/kafkamcp.yaml"]
}
}
}
Restart Claude Desktop. You should see "KafkaMCP" in the available MCP servers.
Other MCP Clients
For any MCP-compatible client, start KafkaMCP in stdio mode:
kafkamcp --config kafkamcp.yaml
For remote agents, use SSE transport:
# In kafkamcp.yaml, set:
# server:
# transport: sse
# host: 0.0.0.0
# port: 3100
kafkamcp --config kafkamcp.yaml
# Agents connect to http://localhost:3100
Step 5: Try It
Once connected, ask your agent:
"List all Kafka topics in my cluster"
The agent will call kafka_list_topics and return a list of all topics with their partition counts, replication factors, and message count estimates.
Try more:
"Show me the last 5 messages from my-topic"
"Describe the consumer group my-consumer-group"
"What schemas are registered in the Schema Registry?"
What's Next?
- Core Concepts — Understand tools, resources, and the auth model
- Claude Desktop Guide — Detailed Claude Desktop setup
- Docker Compose Guide — Full local environment with Kafka + KafkaMCP
- API Reference — Full tool catalog with examples