Kafka MCP

v1.0.0Databasesstable

A Model Context Protocol Server to perform Kafka client operations

mcp-kafkamcpai-integration
Share:
78
Stars
0
Downloads
0
Weekly
0/5

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

Perform Kafka client operations through MCP interface.
Manage message streaming and broker interactions.
kanapuli

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-kafka

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-kafka
2

Build 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 build
3

Test 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=
4

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-kafka": { "command": "npx", "args": ["-y", "mcp-kafka"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides