Skip to main content

Python SDK Overview

KafkaMCP provides Python SDKs for two popular AI agent frameworks: LangChain and CrewAI. Both SDKs connect to a running KafkaMCP server via the MCP protocol and expose Kafka operations as framework-native tools.

Choosing an SDK

SDKFrameworkBest For
kafkamcp-langchainLangChainSingle-agent workflows, chains, and OpenAI function-calling agents
kafkamcp-crewaiCrewAIMulti-agent crews with role-based collaboration

Both SDKs invoke the same KafkaMCP tool contracts. LangChain uses a caller-supplied MCP client; CrewAI includes a synchronous stdio adapter.

Quick Install

# LangChain integration
pip install "git+https://github.com/josedab/kafkamcp.git#subdirectory=sdk/python/kafkamcp_langchain"

# CrewAI integration
pip install "git+https://github.com/josedab/kafkamcp.git#subdirectory=sdk/python/kafkamcp_crewai"

The Python integrations are not yet published to PyPI.

Prerequisites

  1. A running KafkaMCP server (see Getting Started)
  2. Python 3.10+
  3. The mcp Python package for MCP client connectivity

Guides

See Also