Skip to main content

kafka-sentinel-mcp

Give AI agents safe, read-only eyes on your Kafka clusters.

An MCP (Model Context Protocol) server that exposes Kafka cluster health, consumer lag, partition state, and replay-readiness as structured tools — so LLM agents (Claude, or any MCP client) can diagnose streaming incidents without ever being able to break anything.

Built by an engineer who spent a decade running Kafka-based financial messaging at 99.999% availability, and got tired of every "AI + Kafka" demo assuming write access to production.

Why this exists

When a consumer group stalls at 3 a.m., the questions are always the same: Is it lag? A stuck partition? A rebalance storm? An offset reset gone wrong? These are pattern-matching questions — exactly what LLM agents are good at — but no operator will hand an agent admin rights on a production cluster.

kafka-sentinel-mcp draws a hard line: every tool is read-only by design, enforced at the client-config level (no admin operations are even imported). The agent can observe, correlate, and recommend; a human executes.

Tools

Tool What it returns
list_topics All non-internal topics with partition count and replication factor — start here if you don't know a topic name
list_consumer_groups All consumer group IDs with state — start here if you don't know a group name
cluster_health Broker count, controller status, under-replicated / offline partition counts
consumer_lag Per-group, per-topic, per-partition lag with committed vs end offsets
topic_audit Replication factor, min.insync.replicas, retention, and flags configs that violate durability best practice
partition_state Leaders, ISR shrinkage, skew across brokers
replay_readiness For a group + topic: earliest available offsets vs committed, i.e., "can we still replay what we missed?"
incident_snapshot One-call bundle of all the above, timestamped — designed for pasting into a postmortem

Quick start

pip install kafka-sentinel-mcp   # (or: uv tool install)

# Run against your cluster (read-only credentials!)
KAFKA_BOOTSTRAP=localhost:9092 kafka-sentinel-mcp

Add to Claude Desktop / any MCP client:

{
  "mcpServers": {
    "kafka-sentinel": {
      "command": "kafka-sentinel-mcp",
      "env": { "KAFKA_BOOTSTRAP": "broker1:9092,broker2:9092" }
    }
  }
}

Then ask your agent: "Why is the payments-consumer group falling behind, and can we still replay from where it stalled?"

Security posture

  • Read-only: no produce, no topic/config mutation, no offset commits, no ACL ops.
  • Supports SASL/SSL; credentials via env only, never logged.
  • Every tool call is logged with caller context for audit.
  • Recommended: run with a Kafka principal that has Describe/Read ACLs only — the server degrades gracefully and reports what it can't see.

Status

Early. See ROADMAP.md. Issues and PRs welcome — especially war stories about what you wish an agent could have told you during an incident.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kafka_sentinel_mcp-0.1.2.tar.gz (85.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kafka_sentinel_mcp-0.1.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file kafka_sentinel_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: kafka_sentinel_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 85.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for kafka_sentinel_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bd1747b277e62f0756141bf8f094ca4f682ef0b1acf0d95a52aebf569cd571e8
MD5 4727aa526a57174cbe5dc9e980ae8c68
BLAKE2b-256 8999a7aff10de2134386a0438a69554f5e5cdd82494589b398c547002f7bea49

See more details on using hashes here.

Provenance

The following attestation bundles were made for kafka_sentinel_mcp-0.1.2.tar.gz:

Publisher: publish.yml on sanjay-amu/kafka-sentinel-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kafka_sentinel_mcp-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for kafka_sentinel_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 141ca7cc84b8b5c34bff60e5b95e8476ebd4c1894c8db1c9c03b3ed7089c2427
MD5 e073a39fba9d2f4d71739e0a0c3c23d6
BLAKE2b-256 40ee1b5a50017f983a576bed2d678caf717ef6705a8d9b85f4a9ba821e2178f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kafka_sentinel_mcp-0.1.2-py3-none-any.whl:

Publisher: publish.yml on sanjay-amu/kafka-sentinel-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page