Kafka MCP Server
카프카 MCP 서버
LLM 및 Agentic 애플리케이션에 대한 게시 및 사용 기능을 제공하기 위해 Apache Kafka와 통합되는 MCP(Message Context Protocol) 서버입니다.
개요
이 프로젝트는 AI 모델이 표준화된 인터페이스를 통해 Kafka 토픽과 상호 작용할 수 있도록 하는 서버를 구현합니다. 다음을 지원합니다.
Kafka 주제에 메시지 게시
Kafka 토픽에서 메시지 사용
Related MCP server: KafkaIQ
필수 조건
파이썬 3.8 이상
Apache Kafka 인스턴스
Python 종속성(설치 섹션 참조)
설치
저장소를 복제합니다.
지엑스피1
가상 환경을 만들고 활성화하세요.
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate필요한 종속성을 설치하세요:
pip install -r requirements.txtrequirements.txt가 없으면 다음 패키지를 설치하세요.
pip install aiokafka python-dotenv pydantic-settings mcp-server
구성
프로젝트 루트에 다음 변수를 사용하여 .env 파일을 만듭니다.
# Kafka Configuration
KAFKA_BOOTSTRAP_SERVERS=localhost:9092
TOPIC_NAME=your-topic-name
IS_TOPIC_READ_FROM_BEGINNING=False
DEFAULT_GROUP_ID_FOR_CONSUMER=kafka-mcp-group
# Optional: Custom Tool Descriptions
# TOOL_PUBLISH_DESCRIPTION="Custom description for the publish tool"
# TOOL_CONSUME_DESCRIPTION="Custom description for the consume tool"용법
서버 실행
제공된 main.py 스크립트를 사용하여 서버를 실행할 수 있습니다.
python main.py --transport stdio이용 가능한 교통 수단:
stdio: 표준 입출력(기본값)sse: 서버에서 보낸 이벤트
Claude Desktop과 통합
Claude Desktop과 함께 이 Kafka MCP 서버를 사용하려면 Claude Desktop 구성 파일에 다음 구성을 추가하세요.
{
"mcpServers": {
"kafka": {
"command": "python",
"args": [
"<PATH TO PROJECTS>/main.py"
]
}
}
}<PATH TO PROJECTS> 프로젝트 디렉토리의 절대 경로로 바꾸세요.
프로젝트 구조
main.py: 애플리케이션의 진입점kafka.py: 카프카 커넥터 구현server.py: Kafka 상호 작용을 위한 도구를 갖춘 MCP 서버 구현settings.py: Pydantic을 사용한 구성 관리
사용 가능한 도구
카프카-퍼블리시
구성된 Kafka 주제에 정보를 게시합니다.
카프카-소비
구성된 Kafka 토픽에서 정보를 사용합니다.
참고: 토픽에서 메시지를 읽으면 동일한 그룹 ID를 사용하여 다시 읽을 수 없습니다.
주제 생성
지정된 매개변수로 새로운 Kafka 토픽을 생성합니다.
옵션 :
--topic생성할 주제의 이름--partitions할당할 파티션 수--replication-factor브로커 간 복제 계수--config(선택 사항) 주제 수준 구성 재정의(예:retention.ms=604800000)
주제 삭제
기존 Kafka 주제를 삭제합니다.
옵션 :
--topic삭제할 주제의 이름--timeout(선택 사항) 삭제가 완료될 때까지 기다리는 시간
목록-주제
클러스터의 모든 주제를 나열합니다(또는 패턴으로 필터링합니다).
옵션 :
--bootstrap-server브로커 주소--pattern(선택 사항) 주제 이름을 필터링하는 정규 표현식--exclude-internal(선택 사항) 내부 주제를 제외합니다(기본값: true)
주제 구성
하나 이상의 주제에 대한 구성을 표시하거나 변경합니다.
옵션 :
--describe주제에 대한 현재 구성을 표시합니다.--alter구성 수정(예:--add-config retention.ms=86400000,--delete-config cleanup.policy)--topic주제의 이름
주제-메타데이터
주제 또는 클러스터에 대한 메타데이터를 검색합니다.
옵션 :
--topic(제공된 경우) 이 주제에 대한 메타데이터만 가져옵니다.--bootstrap-server브로커 주소--include-offline(선택 사항) 오프라인인 브로커 또는 파티션을 포함합니다.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.
Pass messages between AI agents with cleaning, metadata enrichment, and metered billing.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Apache Kafka topics, allowing users to publish messages to and read messages from Kafka instances through natural language.1Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and monitor Apache Kafka clusters through natural language, providing real-time operations, health monitoring, consumer lag analysis, and temporal trend detection for intelligent cluster management.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with Apache Kafka through natural language, supporting operations like producing/consuming messages, managing topics, and querying brokers, partitions, and consumer group offsets.1MIT
- FlicenseCqualityDmaintenanceExposes Kafka administration operations as MCP tools, enabling AI agents to inspect Kafka clusters using natural language.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pavanjava/kafka_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server