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
相关服务器
Scout Monitoring MCP
赞助Put performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
赞助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Together AI Image Server
A TypeScript-based server for generating images using the Together AI API.
mcp-rubber-duck
Query multiple LLMs in parallel from AI coding tools — rubber duck debugging, but the ducks talk back.
Unity MCP
Perform actions in the Unity Editor for game development using AI clients.
Claude Code Bridge
A bridge server connecting Claude Desktop with the Claude Code agent API.
hivekit-mcp
MCP server for git-native agent swarm coordination, providing tools for heartbeat, state, task claiming, and logging across distributed AI agents.
MCP Trading Partner Management
An MCP server for managing trading partners in the SAP Integration Suite.
Add Tool
Fetches and sets up an MCP server from a specified GitHub repository.
Replicate Recraft V3
Generate high-quality images using the Recraft V3 model via the Replicate API.
Frappe MCP Server
An MCP server for the Frappe Framework, enabling AI assistants to interact with Frappe's REST API for document management and schema operations.
MegaChad
Burn-to-create looksmaxxing engine on MegaETH with 14 MCP tools for swap quotes, token stats, NFT minting, gallery, leaderboard, wallet checks, gasless burns, and orchestrated agent flows