Skip to main content
Glama

mcp-kafka

CI License: MIT

A Model Context Protocol server for Apache Kafka. It lets an MCP-capable client (Claude Desktop, Claude Code, etc.) monitor and manage Kafka clusters — topics, partitions, configs, and consumer groups (including lag) — with behaviour controlled entirely by flags.

Safe by default: it starts read-only, can be scoped to an allowlist of topics, protects internal/critical topics from mutation, and gates destructive operations behind an explicit opt-in.

Features

  • Monitoring — cluster/broker info, topic metadata and offsets, consumer groups, and per-partition + total consumer lag.

  • Management — create topics, add partitions, alter topic configs, reset group offsets; delete topics/groups (admin).

  • Access modesread-onlyread-writeadmin, layered so a mode never exposes tools above its level.

  • Security flags — topic allowlist, protected/internal topics, delete gating, dry-run, and JSON audit logging (see below).

  • Auth — plaintext, TLS, and SASL (PLAIN / SCRAM-SHA-256 / SCRAM-SHA-512).

Related MCP server: Kafka MCP Server

Security model

Concern

Flag

Default

Effect

What can the server do?

KAFKA_MODE

read-only

read-only exposes only monitoring; read-write adds management; admin adds deletes. Tools above the mode are never registered.

Which topics are in scope?

KAFKA_TOPIC_ALLOWLIST

(all)

When set, operations on other topics are refused.

Protect internal topics

KAFKA_PROTECT_INTERNAL_TOPICS

true

Topics starting with _ can be read but never mutated.

Protect specific topics

KAFKA_PROTECTED_TOPICS

(none)

Additional read-only-forever topics.

Can it delete?

KAFKA_ALLOW_DELETE

false

delete_topic / delete_consumer_group need this and admin mode.

Preview without touching the cluster

KAFKA_DRY_RUN

false

Write/admin tools validate + log intent, then return.

Audit trail

KAFKA_AUDIT_LOG

true

Emits a JSON line to stderr per guarded operation.

Tools

Read (read-only+): cluster_info, list_topics, describe_topic, topic_offsets, list_consumer_groups, describe_consumer_group (with lag)

Write (read-write+): create_topic, create_partitions, alter_topic_config, reset_consumer_group_offsets

Admin (admin): delete_topic, delete_consumer_group (both need KAFKA_ALLOW_DELETE)

Use with your MCP client

Works with Claude Code, Claude Desktop, Cursor, OpenAI Codex CLI, Windsurf, VS Code (Copilot), and any other MCP client — see docs/CLIENTS.md for per-client setup.

Install

npm install
npm run build

Run with Claude Desktop / Claude Code

{
  "mcpServers": {
    "kafka": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-kafka/dist/index.js"],
      "env": {
        "KAFKA_BROKERS": "broker1:9092,broker2:9092",
        "KAFKA_MODE": "read-only",
        "KAFKA_SSL": "true",
        "KAFKA_SASL_MECHANISM": "scram-sha-512",
        "KAFKA_SASL_USERNAME": "mcp",
        "KAFKA_SASL_PASSWORD": "…"
      }
    }
  }
}

Example prompts

  • "Which consumer groups have the most lag right now?"

  • "Describe the orders topic and show its offsets."

  • "Create a topic events with 6 partitions and 7-day retention." (needs read-write)

Develop

npm run dev
npm test
npm run typecheck

Publishing

This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.

License

MIT

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables interaction with Kafka clusters to manage topics, monitor consumer groups, and stream messages. It provides a comprehensive suite of tools for broker metadata inspection and local Kafka user management.
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    MCP server for Apache Kafka that allows LLM agents to inspect topics, consumer groups, and safely manage offsets (reset, rewind).
    16
    12
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with Kafka clusters via MCP, supporting topic management (list, create, delete, inspect), connection initialization, and more through natural language.
    1
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Managed Keycloak from any MCP client: clusters, realms, apps, SSO, users, domains, audit events.

  • Remote MCP for A2A caller identity, scope policy, verdict receipts, and audit history.

  • The official MCP Server from Mia-Platform to interact with Mia-Platform Console

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dockndevai/mcp-kafka'

If you have feedback or need assistance with the MCP directory API, please join our Discord server