mcp-kafka
mcp-kafka is a Model Context Protocol (MCP) server that allows AI assistants to interact directly with Apache Kafka. This tool simplifies the interaction with Kafka clusters, enabling AI assistants to create, manage, and operate Kafka topics and messages. It provides a seamless way to produce and consume messages, making it highly beneficial for developers and data engineers looking to integrate AI capabilities into their Kafka workflows.
GitHub Stars
72
User Rating
Not Rated
Favorites
0
Views
29
Forks
0
Issues
2
Installation
Difficulty
IntermediateEstimated Time
10-20 minutes
Requirements
Go 1.24 or higherA running Kafka cluster (default connection: localhost:9092)Installation
Installation
Prerequisites
Go: 1.24 or higher
Running Kafka Cluster: Default connection at localhost:9092
Installation Steps
1. Clone the Repository
bash
git clone https://github.com/kanapuli/mcp-kafka.git
cd mcp-kafka
2. Build the Application
bash
make build
3. Optionally Build for a Specific Platform
bash
make build GOOS=darwin GOARCH=arm64
4. Install as a Claude Desktop Tool
1Build the application as mentioned above.
2Place the executable in a location included in your system PATH or in a dedicated tools directory.
3Follow this [Claude Desktop Tool Installation Guide](https://modelcontextprotocol.io/quickstart/user) to install the tool.
Troubleshooting
Issue: Server won't start Solution: Check Go version and reinstall dependencies.Configuration
Configuration
Basic Configuration
Editclaude_desktop_config.json to add the MCP server:
json
{
"mcpServers": {
"kafka": {
"command": "/Your-mcp-kafka-executable-path/mcp-kafka-darwin-arm64",
"args": [
"--bootstrap-servers=localhost:9092",
"--consumer-group-id=mcp-kafka-consumer-group",
"--username=",
"--password="
],
"env": {}
}
}
}
Advanced Configuration
Security Settings
Manage authentication credentials securely and use environment variables as needed.
Examples
Examples
Basic Usage
Programmatic Usage
javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');
const client = new MCPClient();
await client.connect();
// Execute tool
const result = await client.callTool('toolName', {
parameter1: 'value1',
parameter2: 'value2'
});
console.log(result);
Use Cases
Creating Kafka topics for real-time data processing by AI assistants.
Retrieving detailed information about specific topics to verify configurations.
Using message queues to asynchronously send data between different systems.
Consuming messages from Kafka topics for data analysis or processing.
Additional Resources
Author Information
Software engineer, Golang fanatic, hardcore pragmatic programmer and interested in making things scalable, secure, fast and reliable
@protectai Berlin
49
Followers
88
Repositories
26
Gists
0
Total Contributions