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


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.
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.
$ 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 topicSwitch to Live and records appear as soon as Kafka stores them. On a busy topic the tail samples the newest records, so the page stays responsive.
Follow a topic liveSee each group with its members and its lag on every partition. Reset its offsets after a preview of the lag the change leaves, or delete the offsets of a topic it no longer reads.
Reset a group's offsetsManage 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 KafkaSafe 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 clusterclusters:
production:
bootstrap_servers: [broker-1:9093]
# writable: false is the default
staging:
bootstrap_servers: [staging-1:9092]
writable: trueSign 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-inHide 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{ "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 agentclaude mcp add --transport http klens http://localhost:8090/mcpUnder 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.
mcp: bind: 127.0.0.1:8090 clusters: [production, staging] privileges:- 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.