Apache Kafka (REST Proxy / native) API + MCP Server + A2A Server for Agentic AI!
Project description
Kafka Mcp
API | MCP Server | A2A Agent
Apache Kafka API + MCP Server + A2A Agent for the agent-utilities ecosystem.
Version: 0.5.0
Documentation — Installation, deployment, usage across the API, CLI, and MCP interfaces, and guidance for provisioning the Apache Kafka platform are maintained in the official documentation.
kafka-mcp wraps the Apache Kafka administration and data-plane surface with typed,
deterministic tools an agent or policy router calls. It speaks to the Confluent REST
Proxy by default and ships an optional native (direct-to-broker) client and a
Pydantic-AI agent server.
What it provides
KafkaApi(kafka_mcp.api.api_client_kafka) — arequests-based REST facade over the Confluent REST Proxy v3 (with v2 consumer helpers), organized by Kafka resource: clusters, topics, partitions, records, consumer groups, brokers, and ACLs. The active cluster id resolves lazily unlessKAFKA_CLUSTER_IDpins it.- Six MCP tools (
kafka-mcpconsole script):kafka_topics,kafka_partitions,kafka_records,kafka_groups,kafka_cluster, and the optional nativekafka_native. Seedocs/overview.mdfor the full action surface. - An A2A agent server (
kafka-agentconsole script) — a Pydantic-AI graph agent wired to the MCP server viaMCP_URL.
Configuration (environment)
| Var | Default | Meaning |
|---|---|---|
KAFKA_REST_URL |
http://localhost:8082 |
Confluent REST Proxy base URL |
KAFKA_CLUSTER_ID |
(auto) | Pin the cluster id (else the first cluster is cached) |
KAFKA_TOKEN |
(empty) | Bearer token for the REST Proxy |
KAFKA_USERNAME |
(empty) | Basic-auth user (optional) |
KAFKA_PASSWORD |
(empty) | Basic-auth password (optional) |
KAFKA_SSL_VERIFY |
True |
Verify TLS (set False for self-signed homelab) |
KAFKATOOL |
True |
Register the Kafka tool set |
The optional native client reads KAFKA_BOOTSTRAP_SERVERS (default
localhost:9092) and requires the kafka-mcp[native] extra. Copy
.env.example to .env and populate only what you use; blank
connector credentials leave the corresponding surface inactive.
Install & run
pip install -e .
kafka-mcp # stdio MCP server (default transport)
kafka-mcp --transport streamable-http --host 0.0.0.0 --port 8000
Run the agent server against a live MCP server:
kafka-agent --mcp-url http://localhost:8000/mcp --host 0.0.0.0 --port 8080
MCP config
Register in your client's mcp_config.json (tools surface as kafka_topics,
kafka_records, kafka_groups, …). See kafka_mcp/mcp_config.json.
Documentation
The complete documentation is published as the official documentation site and is the recommended reference for installation, deployment, and day-to-day operation.
| Page | Contents |
|---|---|
| Installation | pip, source, extras, prebuilt Docker image |
| Deployment | run the MCP and agent servers, Compose, Caddy + Technitium, env config |
| Usage | the MCP tools, the KafkaApi client, the CLI |
| Backing Platform | deploy Apache Kafka with Docker |
| Overview | tools, REST contract, native client |
| Architecture | the layered REST client and tool surface |
| Concepts | concept registry (CONCEPT:KAFKA-*) |
AGENTS.md is the canonical contributor/agent guidance.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kafka_mcp-0.6.0.tar.gz.
File metadata
- Download URL: kafka_mcp-0.6.0.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87f3a8fda8b5637165357f7070a52a3b25e3e1910a17d1e2e33404397f33e4f4
|
|
| MD5 |
deef22e6cb7f337b2c88436dac7368ce
|
|
| BLAKE2b-256 |
069ca621fe96ce12f8584dfde280abd729bd78a0cef336038ca8466f8cac3d74
|
File details
Details for the file kafka_mcp-0.6.0-py3-none-any.whl.
File metadata
- Download URL: kafka_mcp-0.6.0-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ad71ffa1532476dd81956fae480d6035070c9de2e0d77f9e003a12be8e5c1cb
|
|
| MD5 |
8ab5be2259624524e0045bae065862d5
|
|
| BLAKE2b-256 |
9ebbf1030a91d648db651d8199fabb67df118cad9a98937d8d6fb55e60c06dd6
|