Skip to main content

Your Kafka clusters,
in focus.

Browse topics, records, consumer groups, and schemas across your clusters, and let AI agents read them over MCP.

The klens topics page, listing the topics of a cluster with their partitions, sizes, and rates

One binary, one config file.

klens serves the web UI, a JSON API, and an MCP server from one Rust process. Name a broker in config.yaml, then start the image.

config.yaml
clusters:
  local:
    bootstrap_servers: [broker-1:9092]

Then open localhost:8080. No broker at hand? The tutorial runs one next to klens with Docker Compose.

Terminal
$ docker run --rm -p 8080:8080 \
  -v "$PWD/config.yaml:/config.yaml:ro" \
  ghcr.io/marcocondrache/klens:latest
INFO klens: configured kafka clusters clusters=["local"]
INFO klens: auth is off, so klens refuses requests addressed to any host but these hosts=["localhost", "127.0.0.1", "[::1]"]
INFO klens::kafka::ingest: starting ingestion lanes cluster=local
INFO klens::server: listening bind=0.0.0.0:8080

Built for reading Kafka.

Search a topic by text, partition, and time. klens runs the search on the server, decodes Avro, JSON Schema, and Protobuf values, and exports the matches as NDJSON.

Find records in a topic

Manage more than topics.

Beyond topics and groups, klens manages schemas, ACL bindings, SCRAM users, client quotas, and broker configs. Each change is its own privilege, so a role can reset offsets without the right to delete a topic.

See every privilege
Topics
create_topicsdelete_topicsadd_partitionsalter_topic_configs
Records
producedelete_records
Consumer groups
reset_offsetsdelete_offsetsdelete_groups
Schemas
register_schemasset_compatibilitydelete_schemas
ACLs
create_aclsdelete_acls
SCRAM users
set_scram_credentialsdelete_scram_credentials
Client quotas
alter_quotas
Brokers
alter_broker_configs

A page costs Kafka nothing.

klens reads each cluster on a fixed schedule into an in-memory projection, and every page, API call, and most MCP tools read that copy. The load on Kafka depends on the size of the cluster, not on how many people look.

Record reads, live tails, broker configs, and changes go to Kafka only when someone asks.

How klens reads Kafka

Safe to open up.

Read-only by default.

klens changes nothing on a cluster until you mark it writable. With sign-in and roles, only the people who hold the privilege for a change can make it.

Allow changes on a cluster
config.yaml
clusters:
  production:
    bootstrap_servers: [broker-1:9093]
    # writable: false is the default
  staging:
    bootstrap_servers: [staging-1:9092]
    writable: true

Sign in with OpenID Connect.

Give each group in your identity provider its own privileges on each cluster. A cluster that no role covers stays invisible.

Require sign-in

Hide private fields.

Hash, mask, or drop card numbers, emails, and any other field for every reader, admins included. Equal values get equal tokens, so records stay easy to correlate. Search sees what the page shows, so a filter can never recover a hidden value.

Hide sensitive fields
payments.transactions / 4 @ 88
{  "order": 1042,  "card": {    "number": "kx:3f9a2c481b7d6e05"hash    drop  },  "customer": {    "email": "***"mask  }}

Ready for agents.

Turn on MCP. Agents in Claude Code, VS Code, or Cursor then read the same projection as the UI, so most calls cost Kafka nothing.

Connect an AI agent
Terminal
claude mcp add --transport http klens http://localhost:8090/mcp

Under a ceiling you set.

The mcp block names the clusters agents reach and the privileges they hold. A tool whose privilege it leaves out never reaches the agent, so agents change nothing until it names a write.

See every MCP tool
config.yamlSelect a privilege to toggle it
mcp:  bind: 127.0.0.1:8090  clusters: [production, staging]  privileges:
tools/list11 of 16 tools
  • klens_records_readneeds records
  • klens_record_getneeds records
  • klens_schema_getschema_text
  • klens_acls_listacls
  • klens_topic_createneeds create_topics
  • klens_record_produceneeds produce
  • klens_schema_registerneeds register_schemas

And 9 catalog tools that need no privilege.

Bring Kafka into focus.

klens is open source under the MIT license. Start the image with Docker, or install the Helm chart on Kubernetes.