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
Firebase MCP Server
You can use the Firebase MCP server to give AI-powered development tools the ability to work with your Firebase projects and your app's codebase.
Structurize-MCP
Generates structured CSV files from natural language descriptions using Google Gemini AI.
EdgeOne Pages MCP
An MCP server implementation using EdgeOne Pages Functions for intelligent chat applications.
MCP Command Server
A server for securely executing commands on the host system, requiring Java 21 or higher.
Deno Gemini Grounding MCP Server
A Model Context Protocol server that provides access to the connpass users API v2, utilizing Gemini for grounding.
Remote MCP Server (Authless)
A template for deploying a remote, auth-less MCP server on Cloudflare Workers.
Model Context Protocol servers
A collection of reference implementations for the Model Context Protocol (MCP), showcasing servers implemented with TypeScript and Python SDKs.
React MCP
An MCP server for integrating AI with React applications.
BoostSecurity
BoostSecurity MCP acts as a safeguard preventing agents from adding vulnerable packages into projects. It analyzes every package an AI agent introduces, flags unsafe dependencies, and recommends secure, maintained alternatives to keep projects protected.
Zeplin
Official Zeplin server for AI-assisted UI development.