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
| SDK | Framework | Best For |
|---|---|---|
kafkamcp-langchain | LangChain | Single-agent workflows, chains, and OpenAI function-calling agents |
kafkamcp-crewai | CrewAI | Multi-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
- A running KafkaMCP server (see Getting Started)
- Python 3.10+
- The
mcpPython package for MCP client connectivity
Guides
- LangChain SDK Guide — Full setup and usage with LangChain agents
- CrewAI SDK Guide — Full setup and usage with CrewAI crews
See Also
- Go SDK — Native Go client
- TypeScript SDK — TypeScript/Node.js client
- API Reference: Tools — Full list of MCP tools