MCP server integration for Kafka operations. Auto-activates on keywords kafka mcp, mcp server, mcp configure, mcp setup, kanapuli, tuannvm, confluent mcp, kafka integration. Provides configuration examples and connection guidance for all 4 MCP servers.
Inherits all available tools
Additional assets for this skill
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Expert knowledge for integrating SpecWeave with Kafka MCP (Model Context Protocol) servers. Supports 4 MCP server implementations with auto-detection and configuration guidance.
Code-First Recommendation: For most Kafka automation tasks, writing code is better than MCP (98% token reduction). Use kafkajs or kafka-node directly:
import { Kafka } from 'kafkajs'; const kafka = new Kafka({ brokers: ['localhost:9092'] }); const producer = kafka.producer(); await producer.send({ topic: 'events', messages: [{ value: 'Hello' }] });When MCP IS useful: Quick interactive debugging, topic exploration, Claude Desktop integration.
When to use code instead: CI/CD pipelines, test automation, production scripts, anything that should be committed and reusable.
Installation:
npm install -g mcp-kafka
Capabilities:
Configuration Example:
{
"mcpServers": {
"kafka": {
"command": "npx",
"args": ["mcp-kafka"],
"env": {
"KAFKA_BROKERS": "localhost:9092",
"KAFKA_SASL_MECHANISM": "plain",
"KAFKA_SASL_USERNAME": "user",
"KAFKA_SASL_PASSWORD": "password"
}
}
}
}
Installation:
go install github.com/tuannvm/kafka-mcp-server@latest
Capabilities:
Configuration Example:
{
"mcpServers": {
"kafka": {
"command": "kafka-mcp-server",
"args": [
"--brokers", "localhost:9092",
"--sasl-mechanism", "SCRAM-SHA-256",
"--sasl-username", "admin",
"--sasl-password", "admin-secret"
]
}
}
}
Installation:
pip install kafka-mcp-server
Capabilities:
Configuration Example:
{
"mcpServers": {
"kafka": {
"command": "python",
"args": ["-m", "kafka_mcp_server"],
"env": {
"KAFKA_BOOTSTRAP_SERVERS": "localhost:9092"
}
}
}
}
Installation:
confluent plugin install mcp-server
Capabilities:
Configuration Example:
{
"mcpServers": {
"kafka": {
"command": "confluent",
"args": ["mcp", "start"],
"env": {
"CONFLUENT_CLOUD_API_KEY": "your-api-key",
"CONFLUENT_CLOUD_API_SECRET": "your-api-secret"
}
}
}
}
SpecWeave can auto-detect installed MCP servers:
/sw-kafka:mcp-configure
This command:
/sw-kafka:mcp-configure
Interactive wizard guides you through:
Install preferred MCP server (see installation commands above)
Create .mcp.json configuration:
{
"serverType": "tuannvm",
"brokerUrls": ["localhost:9092"],
"authentication": {
"mechanism": "SASL/SCRAM-SHA-256",
"username": "admin",
"password": "admin-secret"
}
}
# Via MCP server CLI
kafka-mcp-server test-connection
# Or via SpecWeave
node -e "import('./dist/lib/mcp/detector.js').then(async ({ MCPServerDetector }) => {
const detector = new MCPServerDetector();
const result = await detector.detectAll();
console.log(JSON.stringify(result, null, 2));
});"
| Feature | kanapuli | tuannvm | Joel-hanson | Confluent |
|---|---|---|---|---|
| Language | Node.js | Go | Python | Official CLI |
| SASL_PLAINTEXT | ✅ | ✅ | ✅ | ✅ |
| SCRAM-SHA-256 | ❌ | ✅ | ❌ | ✅ |
| SCRAM-SHA-512 | ❌ | ✅ | ❌ | ✅ |
| mTLS/SSL | ❌ | ✅ | ✅ | ✅ |
| OAuth | ❌ | ❌ | ❌ | ✅ |
| Consumer Groups | ❌ | ✅ | ❌ | ✅ |
| Offset Mgmt | ❌ | ✅ | ❌ | ✅ |
| Schema Registry | ❌ | ❌ | ❌ | ✅ |
| ksqlDB | ❌ | ❌ | ❌ | ✅ |
| Flink SQL | ❌ | ❌ | ❌ | ✅ |
| AI/NL Interface | ❌ | ❌ | ❌ | ✅ |
| Best For | Prototyping | Production | Desktop | Enterprise |
# Check if MCP server installed
npm list -g mcp-kafka # kanapuli
which kafka-mcp-server # tuannvm
pip show kafka-mcp-server # Joel-hanson
confluent version # Confluent
kcat -L -b localhost:9092/sw-kafka:mcp-configure list-topicsOnce configured, you can perform Kafka operations via MCP:
import { MCPServerDetector } from './lib/mcp/detector';
const detector = new MCPServerDetector();
const result = await detector.detectAll();
// Use recommended server
if (result.recommended) {
console.log(`Using ${result.recommended} MCP server`);
console.log(`Reason: ${result.rankingReason}`);
}
/sw-kafka:mcp-configure - Interactive MCP server setup/sw-kafka:dev-env start - Start local Kafka for testing/sw-kafka:deploy - Deploy production Kafka cluster