kafka-mcp-server
Expose Apache Kafka operations (topics, produce, consume, consumer groups) as MCP tools.
Kafka MCP Server
A Model Context Protocol (MCP) server that exposes Apache Kafka operations as tools. Built with TypeScript, stdio transport, and the Confluent Kafka client.
Prerequisites
- Node.js 18.18+ or 20.9+
- A running Kafka-compatible broker (Apache Kafka, Redpanda, etc.)
Setup
npm install
npm run build
Configuration
Set the KAFKA_BROKERS environment variable (required):
export KAFKA_BROKERS=localhost:9092
Multiple brokers can be comma-separated: broker1:9092,broker2:9092.
Running
npm start
The server communicates over stdio using the MCP protocol.
Claude Code
Add the MCP server using the CLI:
claude mcp add kafka-mcp-server -e KAFKA_BROKERS=localhost:9092 node /path/to/kafka-mcp-server/dist/index.js
Or add to .mcp.json in your project root:
{
"mcpServers": {
"kafka": {
"command": "node",
"args": ["/path/to/kafka-mcp-server/dist/index.js"],
"env": {
"KAFKA_BROKERS": "localhost:9092"
}
}
}
}
Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"kafka": {
"command": "node",
"args": ["/path/to/kafka-mcp-server/dist/index.js"],
"env": {
"KAFKA_BROKERS": "localhost:9092"
}
}
}
}
Tools
Topics
| Tool | Description | Inputs |
|---|---|---|
list-topics | List all topics | none |
describe-topic | Get topic details (partitions, replicas) | topic |
create-topic | Create a new topic | topic, numPartitions (default 1), replicationFactor (default 1) |
delete-topic | Delete a topic | topic |
Produce / Consume
| Tool | Description | Inputs |
|---|---|---|
produce | Send a message to a topic | topic, value, key (optional) |
consume | Read messages from a topic | topic, maxMessages (default 10), timeout (default 5000ms) |
The consume tool creates an ephemeral consumer that reads from the earliest offset without committing. It disconnects after reaching maxMessages or the timeout.
Cluster
| Tool | Description | Inputs |
|---|---|---|
get-cluster-info | Get broker information | none |
list-consumer-groups | List all consumer groups | none |
describe-consumer-group | Get consumer group details | groupId |
Development
npm run build # Compile TypeScript
npm start # Run the server
npm run lint # Run ESLint
npm run lint:fix # Run ESLint with auto-fix
npm run format # Format code with Prettier
npm run format:check # Check formatting
Máy chủ liên quan
Scout Monitoring MCP
nhà tài trợPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
nhà tài trợAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
MCP QEMU VM Control
Give your AI full computer access — safely. Let Claude (or any MCP-compatible LLM) see your screen, move the mouse, type on the keyboard, and run commands — all inside an isolated QEMU virtual machine. Perfect for AI-driven automation, testing, and computer-use experiments without risking your host system.
TokenTool MCP
Deploy and manage compliant tokens from Claude, Cursor, or any AI agent — by typing a sentence.
CodeToPrompt MCP Server
An MCP server for the codetoprompt library, enabling integration with LLM agents.
Authless Remote MCP Server
A remote MCP server deployable on Cloudflare Workers that does not require authentication.
Read Docs MCP
Enables AI agents to access and understand package documentation from local or remote repositories.
Railagent
Provides structured workflows and tools for AI agents working with software development projects, with a specialized focus on Rails applications.
CC Token Saver
Use a local LLM for smaller or specialized tasks within Claude to save tokens.
Lanhu MCP
⚡ Boost Requirement Analysis Efficiency by 200%! The World's First Team Collaboration MCP Server Designed for the AI Coding Era. Automatically analyzes requirements, generates full-stack code, and downloads design assets.
Chrome DevTools MCP Server
An MCP server for AI-assisted frontend development using Chrome DevTools. Requires Google Chrome.
Advent of Code MCP Server
Interact with the Advent of Code website. Requires a session cookie for authentication.