Kafka MCP
A Model Context Protocol Server to perform Kafka client operations
What is Kafka MCP?
Kafka MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server to perform kafka client operations
A Model Context Protocol Server to perform Kafka client operations
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol Server to perform Kafka client oper
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-kafkaConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Kafka MCP
mcp-kafka is a Go-based MCP server that bridges AI assistants to Apache Kafka clusters, exposing topic management and message operations as native MCP tools. It enables AI clients to create, list, delete, and describe Kafka topics, produce messages with custom keys and headers, and consume messages from topics — all through structured tool calls without writing custom Kafka client code. Data engineers, backend developers, and DevOps teams use it to inspect and interact with Kafka infrastructure conversationally, debug message flows, and automate routine Kafka operations from an AI assistant.
Prerequisites
- Go 1.24 or higher installed (for building from source)
- A running Apache Kafka cluster accessible from your machine (default: localhost:9092)
- Optional: SASL credentials (username/password) if your Kafka cluster requires SASL_PLAINTEXT authentication
- An MCP-compatible client such as Claude Desktop or Claude Code
Clone the repository
Clone the mcp-kafka repository to your local machine. Building from source is currently the primary distribution method.
git clone https://github.com/kanapuli/mcp-kafka.git
cd mcp-kafkaBuild the binary for your platform
Use the Makefile to build the binary. Specify your target OS and architecture using GOOS and GOARCH. The binary is placed in a platform-specific directory.
# macOS Apple Silicon
make build GOOS=darwin GOARCH=arm64
# macOS Intel
make build GOOS=darwin GOARCH=amd64
# Linux
make build GOOS=linux GOARCH=amd64
# Default (detects current platform)
make buildTest the binary against your Kafka cluster
Run the binary directly to verify it can connect to your Kafka broker. For clusters without authentication, leave username and password empty.
./mcp-kafka-darwin-arm64 \
--bootstrap-servers=localhost:9092 \
--consumer-group-id=mcp-kafka-consumer-group \
--username= \
--password=Add the server to your MCP client configuration
Open your claude_desktop_config.json and add the mcp-kafka server entry. Replace the executable path with the actual path to your built binary.
Restart your MCP client and verify the connection
Restart Claude Desktop after saving the config. Ask it to list your Kafka topics to verify the server is connected and can reach your broker.
Kafka MCP Examples
Client configuration
Add this to your claude_desktop_config.json. Replace the command path with the actual location of your built mcp-kafka binary and update the bootstrap-servers to point to your Kafka cluster.
{
"mcpServers": {
"kafka": {
"command": "/path/to/mcp-kafka/mcp-kafka-darwin-arm64",
"args": [
"--bootstrap-servers=localhost:9092",
"--consumer-group-id=mcp-kafka-consumer-group",
"--username=",
"--password="
],
"env": {}
}
}
}Prompts to try
Once connected, manage your Kafka cluster and message streams through natural language.
- "List all Kafka topics in my cluster"
- "Create a topic named user-events with 3 partitions and a replication factor of 1"
- "Describe the user-events topic and show me partition details"
- "Produce a message with key 'user-123' and body '{\"action\": \"login\"}' to the user-events topic"
- "Consume the last 10 messages from the user-events topic"Troubleshooting Kafka MCP
Connection refused or timeout when connecting to Kafka broker
Verify your Kafka broker is running and accessible: run 'nc -zv localhost 9092' to test TCP connectivity. If running Kafka in Docker, ensure the advertised listener is set to a host reachable from your machine, not 'kafka' (internal Docker hostname).
SASL authentication fails
mcp-kafka supports PLAINTEXT and SASL_PLAINTEXT but not SASL_SSL. If your cluster requires SSL/TLS, the current version cannot connect. For SASL_PLAINTEXT, pass the correct --username and --password flags and ensure your broker's security.inter.broker.protocol allows SASL_PLAINTEXT.
Binary permission denied on macOS
After building, mark the binary as executable: 'chmod +x ./mcp-kafka-darwin-arm64'. On macOS you may also need to allow it in System Settings > Privacy & Security if macOS Gatekeeper blocks unsigned binaries.
Frequently Asked Questions about Kafka MCP
What is Kafka MCP?
Kafka MCP is a Model Context Protocol (MCP) server that model context protocol server to perform kafka client operations It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Kafka MCP?
Follow the installation instructions on the Kafka MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Kafka MCP?
Kafka MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Kafka MCP free to use?
Yes, Kafka MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Kafka MCP Alternatives — Similar Databases Servers
Looking for alternatives to Kafka MCP? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Kafka MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Kafka MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.