Skip to content

kafka-mcp

Apache Kafka API + MCP Server + A2A Agent for the Arbora ecosystem — topics, records, consumer groups, brokers, and ACLs over the Confluent REST Proxy, with an optional native (direct-to-broker) client.

Official documentation

This site is the canonical reference for kafka-mcp, maintained alongside every release.

PyPI MCP Server License GitHub

Overview

kafka-mcp wraps the Apache Kafka administration and data-plane surface with typed, deterministic MCP tools, and ships an optional Pydantic-AI agent server. It provides:

  • KafkaApi — a requests-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.
  • Six MCP tools — action-dispatch wrappers (kafka_topics, kafka_partitions, kafka_records, kafka_groups, kafka_cluster, kafka_native) that expose the full surface to an agent or policy router.
  • An optional native client (kafka-mcp[native]) that produces, consumes, and administers topics directly against brokers via confluent-kafka.

The active cluster id is resolved lazily — set KAFKA_CLUSTER_ID to pin it, or let the client cache the first cluster the REST Proxy returns.

Explore the documentation

  • :material-rocket-start: Installation — pip, source, extras, and the prebuilt Docker image.
  • Deployment — run the MCP and agent servers, Docker Compose, Caddy + Technitium.
  • Usage — the MCP tools, the KafkaApi client, and the CLI.
  • Backing Platform — deploy Apache Kafka with Docker.
  • Architecture — the layered REST client and tool surface.
  • Concepts — the CONCEPT:KAFKA-* registry.

Quick start

pip install "kafka-mcp[mcp]"
kafka-mcp                        # stdio MCP server (default transport)

Connect it to a Confluent REST Proxy in front of the operator's Kafka cluster:

export KAFKA_REST_URL=http://your-rest-proxy:8082
kafka-mcp --transport streamable-http --host 0.0.0.0 --port 8000

See Installation and Deployment for the full matrix (PyPI extras, Docker image, all transports, the agent server, reverse proxy, DNS).

Spec delivery

Spec delivery dashboard. No owned specs are recorded yet. Missing requirement and code mappings remain unknown.