Lenses MCP Server
The Lenses MCP Server enables AI assistants to interact with Apache Kafka ecosystems through natural language, providing comprehensive management and monitoring capabilities.
Core Capabilities:
Environment Management - List, create, retrieve, and check health of Lenses environments with tier-based configurations (development/staging/production), including agent connection monitoring
Kafka Connector Operations - Full lifecycle management including listing (with filtering by cluster/class), creating, validating configurations, controlling actions (start/stop/restart/pause/resume), restarting tasks, deleting connectors, and retrieving connector definitions in YAML format
Consumer Group Management - List consumer groups (with optional topic filtering), update/delete offsets at various granularities (group or topic-partition level), and delete entire consumer groups
SQL Processing & Querying - Execute SQL queries against Kafka topics via WebSocket API, manage SQL processors (list, create, retrieve, delete), and view available deployment targets for Kubernetes and Connect clusters
Topic Management - List and retrieve topics with detailed information (partitions, broker configurations), create topics with or without schemas (AVRO, JSON, CSV, XML formats), update configurations, add partitions, and resend messages by partition and offset
Dataset & Metadata Management - List datasets with pagination and advanced filtering, retrieve dataset details including fields and policies, get message metrics, and update topic descriptions and tags
Monitoring & Operations - Access Kubernetes pod logs, monitor partition-level metrics (message counts and bytes), track consumer group activity and lag, and check health status across environments and connectors
Provides integration with Apache Kafka through Lenses.io, enabling exploration, transformation, and joining of data in Kafka topics across multiple clusters using SQL queries without requiring an additional database.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Lenses MCP Server show me the latest messages from the orders topic in the production cluster"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🌊🔍 Lenses MCP Server for Apache Kafka 🔎🌊
This is the Lenses MCP (Model Context Protocol) server for Apache Kafka. Lenses offers a developer experience solution for engineers building real-time applications connected to Kafka. It's built for the enterprise and backed by a powerful IAM and governance model.
With Lenses, you can find, explore, transform, integrate and replicate data across a multi-Kafka and vendor estate. Now, all this power is accessible through your AI tools and AI Agents via MCP, bringing real-time context into your agentic engineering workflows.
The quickest way to try the MCP server is with the free Lenses Community Edition, which runs Lenses MCP Server as a remote MCP server and comes with a pre-configured single broker Kafka cluster with demo data, ideal for local development or evaluation (steps here).
Table of Contents
Related MCP server: Kafka MCP Server
1. Install uv and Python
We use uv for dependency management and project setup. If you don't have uv installed, follow the official installation guide.
This project requires Python 3.13 (any 3.13.x release). To verify your Python version, run:
uv run python --version2. Configure Environment Variables
Copy the example environment file and configure it based on your authentication method:
cp .env.example .envRequired variables depend on your authentication choice:
For OAuth (recommended):
LENSES_URLandMCP_ADVERTISED_URLFor API Key (fallback):
LENSES_URLandLENSES_API_KEY
3. OAuth 2.1 Authentication (Recommended)
OAuth 2.1 is the recommended authentication method for all Lenses MCP deployments. It provides secure, scope-based authorization without sharing static API keys.
How it works
OAuth 2.1 uses bearer tokens that are validated via RFC 7662 Token Introspection. The flow involves three participants:
MCP Client — Your AI tool (Claude, Cursor, etc.)
Authorization Server — Lenses HQ at
LENSES_ADVERTISED_URLMCP Server — This server (the resource server)
When you connect, the client automatically:
Discovers OAuth metadata from this server (
/.well-known/oauth-protected-resource/mcp)Registers itself with the authorization server
Initiates OAuth authorization (with PKCE) and gets an access token
Uses the token to authenticate requests to this MCP server
This server then validates the token with Lenses HQ before allowing access to Kafka resources.
Simple setup
To use OAuth, you should set OAUTH_ENABLED to true, then you only need to set two environment variables:
OAUTH_ENABLED=true
LENSES_URL=https://lenses.example.com
MCP_ADVERTISED_URL=http://localhost:8000LENSES_URL— Your Lenses instance (used internally and as the OAuth authorization server)MCP_ADVERTISED_URL— The public URL where this MCP server is reachable by clients
TRANSPORT automatically defaults to http when MCP_ADVERTISED_URL is set.
Advanced: split-plane deployments
If the MCP server reaches Lenses on an internal address but clients reach it on a public URL:
OAUTH_ENABLED=true
LENSES_URL=http://lenses-hq.internal:9991
LENSES_ADVERTISED_URL=https://lenses.example.com
MCP_ADVERTISED_URL=https://mcp.example.comAuthorization scopes
The server advertises three scopes:
Scope | Description |
| Read-only access to Lenses resources (topics, environments, connectors, etc.) |
| Create and update resources |
| Delete resources |
When you authenticate, you'll be prompted to grant these scopes. Your token will only grant the scopes you select.
Lenses HQ configuration
Lenses HQ must support OAuth 2.0 and token introspection. Ensure your Lenses HQ config includes:
oauth2:
authorizationServer:
unauthenticatedIntrospection: trueThis allows the MCP server to validate tokens without client credentials.
4. Lenses API Key (Fallback)
For backward compatibility and testing, you can use a static API key instead of OAuth. This is not recommended for production but may be useful for local development or legacy systems.
Create a Lenses API key by provisioning an IAM Service Account in Lenses. Add the API key to .env:
LENSES_URL=https://lenses.example.com
LENSES_API_KEY=<YOUR_LENSES_API_KEY>When using API key authentication, TRANSPORT defaults to stdio (local only) unless you explicitly set MCP_ADVERTISED_URL.
5. Running the Server Locally
First, install dependencies:
uv syncWith OAuth (Recommended)
Run with stdio transport (for local AI tools):
OAUTH_ENABLED=true \
LENSES_URL=https://lenses.example.com \
MCP_ADVERTISED_URL=http://localhost:8000 \
uv run src/lenses_mcp/server.pyOr run with HTTP transport (for remote clients):
OAUTH_ENABLED=true \
LENSES_URL=https://lenses.example.com \
MCP_ADVERTISED_URL=http://localhost:8000 \
uv run fastmcp run src/lenses_mcp/server.py --transport=http --port=8000To configure in Claude Desktop, Cursor, or similar tools:
{
"mcpServers": {
"Lenses": {
"command": "uv",
"args": [
"run",
"--project", "<ABSOLUTE_PATH_TO_THIS_REPO>",
"--with", "fastmcp",
"fastmcp",
"run",
"<ABSOLUTE_PATH_TO_THIS_REPO>/src/lenses_mcp/server.py"
],
"env": {
"OAUTH_ENABLED": "true",
"LENSES_URL": "https://lenses.example.com",
"MCP_ADVERTISED_URL": "http://localhost:8000"
},
"transport": "stdio"
}
}
}With API Key (Legacy)
Using a static API key:
LENSES_URL=https://lenses.example.com \
LENSES_API_KEY=<YOUR_LENSES_API_KEY> \
uv run src/lenses_mcp/server.pyOr with HTTP transport:
LENSES_URL=https://lenses.example.com \
LENSES_API_KEY=<YOUR_LENSES_API_KEY> \
uv run fastmcp run src/lenses_mcp/server.py --transport=http --port=8000To configure in Claude Desktop, Cursor, or similar tools:
{
"mcpServers": {
"Lenses.io": {
"command": "uv",
"args": [
"run",
"--project", "<ABSOLUTE_PATH_TO_THIS_REPO>",
"--with", "fastmcp",
"fastmcp",
"run",
"<ABSOLUTE_PATH_TO_THIS_REPO>/src/lenses_mcp/server.py"
],
"env": {
"LENSES_URL": "https://lenses.example.com",
"LENSES_API_KEY": "<YOUR_LENSES_API_KEY>"
},
"transport": "stdio"
}
}
}Note: Some clients may require the absolute path to uv in the command.
6. Running with Docker
The Lenses MCP server is available as a Docker image at lensesio/mcp. You can run it with OAuth (recommended) or API key authentication.
With OAuth (Recommended)
Stdio transport (for local AI tools):
docker run --rm -it \
-e OAUTH_ENABLED=true \
-e LENSES_URL=https://lenses.example.com \
-e MCP_ADVERTISED_URL=http://localhost:8000 \
lensesio/mcpHTTP transport (for remote clients, listens on http://0.0.0.0:8000/mcp):
docker run --rm -it -p 8000:8000 \
-e OAUTH_ENABLED=true \
-e LENSES_URL=https://lenses.example.com \
-e MCP_ADVERTISED_URL=http://localhost:8000 \
-e TRANSPORT=http \
lensesio/mcpFor split-plane deployments where the MCP server reaches Lenses internally but clients use a public URL:
docker run --rm -it -p 8000:8000 \
-e OAUTH_ENABLED=true \
-e LENSES_URL=http://lenses-hq.internal:9991 \
-e LENSES_ADVERTISED_URL=https://lenses.example.com \
-e MCP_ADVERTISED_URL=https://mcp.example.com \
-e TRANSPORT=http \
lensesio/mcpWith API Key (Legacy)
Stdio transport (for local AI tools):
docker run --rm -it \
-e LENSES_API_KEY=<YOUR_API_KEY> \
-e LENSES_URL=https://lenses.example.com \
lensesio/mcpHTTP transport (for remote clients, listens on http://0.0.0.0:8000/mcp):
docker run --rm -it -p 8000:8000 \
-e LENSES_API_KEY=<YOUR_API_KEY> \
-e LENSES_URL=https://lenses.example.com \
-e TRANSPORT=http \
lensesio/mcpEnvironment Variables Reference
Variable | Required | Default | Description |
| No |
| Enables/disables OAuth |
| Yes |
| Lenses instance URL in format |
| For OAuth | - | Public base URL of this MCP server as reachable by clients. Setting this enables OAuth and defaults |
| For API Key auth | - | Your Lenses API key (create via IAM Service Account). Only needed if not using OAuth |
| No |
| Transport mode: |
| No |
| Port to listen on (only used with |
| No |
| Public Lenses HQ URL advertised to MCP clients for OAuth. Override only in split-plane deployments |
| No |
| Comma-separated OAuth scopes advertised in protected-resource metadata |
| No | Discovered from | Override for the RFC 7662 token introspection endpoint URL |
| No |
| Cache TTL for introspection results in seconds |
| No |
| Export OpenTelemetry traces (see section 7) |
| No |
|
|
| No |
| Service name reported to the tracing backend |
| No |
| Collector base URL. Read by the OpenTelemetry SDK, so all standard |
| No |
|
|
Legacy environment variables (for backward compatibility):
LENSES_API_HTTP_URL,LENSES_API_HTTP_PORTLENSES_API_WEBSOCKET_URL,LENSES_API_WEBSOCKET_PORT
These are automatically derived from LENSES_URL but can be explicitly set to override.
Transport Endpoints
stdio: Standard input/output (no network endpoint)
http: HTTP endpoint at
/mcpsse: Server-Sent Events endpoint at
/sse
Building the Docker Image Locally
To build the Docker image locally:
docker build -t lensesio/mcp .7. OpenTelemetry Tracing
The server is built on FastMCP 4, which emits an OpenTelemetry span for every
MCP request — tools/call <tool_name>, tools/list, prompts/get <prompt_name>
and so on. Spans carry the tool or prompt name, the MCP session id, the
negotiated protocol version, and error status when a call fails.
Tracing is off by default and costs nothing until you switch it on.
Enabling
OTEL_ENABLED=true \
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
uv run python src/lenses_mcp/server.pyWith Docker:
docker run -p 8000:8000 \
-e LENSES_URL=<your-lenses-url> \
-e LENSES_API_KEY=<your-api-key> \
-e TRANSPORT=http \
-e OTEL_ENABLED=true \
-e OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318 \
lensesio/mcpOTEL_EXPORTER_OTLP_ENDPOINT is a base URL — the SDK appends /v1/traces
for HTTP. Point it at the collector root, not at the traces path. Use
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT if you need to specify the full URL.
Exporters
The OTLP HTTP exporter (port 4318) is included by default. The gRPC
exporter (port 4317) pulls in grpcio and adds roughly 27MB to the image, so
it is an optional extra:
uv sync --extra otlp-grpc
# then
OTEL_EXPORTER_OTLP_PROTOCOL=grpc OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317 ...Asking for grpc without the extra installed logs a warning and leaves tracing
off; it never prevents the server from starting. The same is true of any other
telemetry misconfiguration — an unreachable collector or a bad exporter name is
logged and the server carries on serving requests.
Verifying locally
The quickest check needs no collector — print spans to stderr:
OTEL_ENABLED=true OTEL_EXPORTER=console uv run python src/lenses_mcp/server.pyThe console exporter writes to stderr, not stdout: with the default stdio
transport, stdout carries the JSON-RPC wire and anything else printed there
would corrupt it. Redirect stderr to a file if the spans crowd your terminal:
OTEL_ENABLED=true OTEL_EXPORTER=console \
uv run python src/lenses_mcp/server.py 2>spans.logFor a trace UI, Jaeger accepts OTLP/HTTP on 4318 and serves its UI on 16686:
docker run -p 16686:16686 -p 4318:4318 \
-e COLLECTOR_OTLP_ENABLED=true jaegertracing/all-in-one:1.62.0Then browse http://localhost:16686 and select the lenses-mcp service.
Trace context propagation
Spans are emitted per MCP request; there is no session-level parent span. A
nested trace only forms when the client propagates trace context
(traceparent in the request _meta), which FastMCP extracts and parents
from. Clients that are not OpenTelemetry-instrumented produce one root trace
per call, which is expected. To get grouped traces, instrument the agent that
calls this server.
8. Optional Context7 MCP Server
Lenses documentation is available on Context7. It is optional but highly recommended to use the Context7 MCP Server and adjust your prompts with use context7 to ensure the documentation available to the LLM is up to date.
Appendix: OAuth Flow Details
Token validation sequence
The MCP server validates bearer tokens using the following sequence:
Protected Resource Metadata (RFC 9728) —
RemoteAuthProviderserves/.well-known/oauth-protected-resource/mcpso clients can discover which authorization server to use and what scopes are available.Auto-Discovery — On the first incoming request, the
DiscoveryTokenVerifierlazily fetches{LENSES_ADVERTISED_URL}/.well-known/oauth-authorization-serverto discover theintrospection_endpoint. The endpoint URL can also be set explicitly viaINTROSPECTION_URL.Token Introspection (RFC 7662) — For each incoming bearer token, the verifier POSTs to the introspection endpoint (
/oauth2/introspect) without client authentication. The authorization server responds with:active— whether the token is validscope— granted scopes (e.g.read write)client_id— the token's ownerexp— expiration timestamp
Inactive or expired tokens are rejected before reaching the Lenses API.
Token Forwarding — Valid tokens are forwarded to the Lenses API via
Authorization: Bearer <token>so Lenses can perform its own authorization checks.
Authorization scopes
The server advertises three scopes in its protected-resource metadata:
Scope | Description |
| Read-only access to Lenses resources (topics, environments, connectors, etc.) |
| Create and update resources |
| Delete resources |
Scopes are not enforced globally at the introspection level — a token with any subset of these scopes is accepted. Per-tool scope enforcement can be added using FastMCP's require_scopes decorator.
Configuration and Requirements
In a simple deployment, only two environment variables are required:
LENSES_URL=https://lenses.example.com
MCP_ADVERTISED_URL=http://localhost:8000For split-plane deployments where the MCP server reaches Lenses on an internal address but clients use a public URL, set:
LENSES_URL=http://lenses-hq.internal:9991
LENSES_ADVERTISED_URL=https://lenses.example.com
MCP_ADVERTISED_URL=https://mcp.example.comLenses HQ must support:
OAuth 2.0 Authorization Server Metadata (RFC 8414) at
/.well-known/oauth-authorization-serverToken Introspection (RFC 7662) at the
introspection_endpoint, with client authentication disabledPKCE with S256 (RFC 7636) for client authorization flows
The MCP server does not send client credentials when introspecting. Lenses HQ must be configured with:
oauth2:
authorizationServer:
unauthenticatedIntrospection: trueWithout this setting, every bearer token will be rejected as invalid.
Available Tools
42 toolsadd_topic_partitionsB
Add partitions to an existing topic.
Args: environment: The environment name. topic_name: Name of the topic. partitions: New total number of partitions.
Returns: Updated partition count.
Inputs: environment (required), topic_name (required), partitions (required). Returns: object
check_environment_healthB
Checks the health status of a Lenses environment.
Args: name: The name of the environment to check.
Returns: Health status information including agent connection and any issues.
Inputs: name (required). Returns: object
create_environmentA
Creates a new Lenses environment.
Args: name: The name of the new environment. Must be a valid resource name (lowercase alphanumeric or hyphens, max 63 chars). display_name: The display name of the environment. If not provided, 'name' will be used. tier: The environment tier. Options: "development", "staging", "production". Default: "development". metadata: Additional metadata as key-value pairs.
Returns: The created environment object including the agent_key for setup.
Inputs: name (required), display_name, tier, metadata. Returns: object
create_kafka_connectorC
Creates a new Kafka connector.
Args: environment: The environment name. name: The name of the connector. cluster: The cluster name where the connector will be deployed. configuration: The connector configuration as a dictionary.
Returns: The created connector object.
Inputs: environment (required), name (required), cluster (required), configuration (required). Returns: object
create_sql_processorA
Creates a new SQL processor.
Args: environment: The environment name. name: The name of the SQL processor. sql: The SQL query/statement for the processor. deployment: Deployment configuration including details like mode, runners, cluster, namespace, etc. If there are no available deployment targets (Kubernetes or Connect clusters), use 'in process' mode: {{mode: "IN_PROC"}} sql_processor_id: Optional processor ID. If not provided, will be auto-generated. description: Optional description of the processor. tags: Optional list of tags for the processor.
Returns: The created SQL processor object with its ID.
Inputs: environment (required), name (required), sql (required), deployment, +3 more. Returns: object
create_topicB
Creates a new Kafka topic with optional configuration.
Args: environment: The environment name. topic_name: Topic name. partitions: Number of partitions (default: 1). replication: Replication factor (default: 1). configs: Topic configurations.
Returns: Creation result.
Inputs: environment (required), topic_name (required), partitions, replication, +1 more. Returns: result
create_topic_with_schemaA
Creates a new Kafka topic with optional format and schema configuration.
Args: environment: The environment name. name: Topic name. partitions: Number of partitions (default: 1). replication: Replication factor (default: 1). configs: Topic configurations. key_format: Key format (AVRO, JSON, CSV, XML, INT, LONG, STRING, BYTES, etc.). key_schema: Key schema (required for AVRO, JSON, CSV, XML). value_format: Value format. value_schema: Value schema.
Returns: Creation result.
Inputs: environment (required), name (required), partitions, replication, +5 more. Returns: object
delete_consumer_groupC
Delete a consumer group.
Args: environment: The environment name. group_id: The ID of the consumer group to delete.
Returns: The result of the delete operation.
Inputs: environment (required), group_id (required). Returns: object
delete_consumer_group_offsetsC
Delete offsets for a consumer group topic-partition tuples.
Args: environment: The environment name. group_id: The ID of the consumer group. offsets: A list of topic-partition objects.
Returns: The result of the delete operation.
Inputs: environment (required), group_id (required), offsets (required). Returns: object
delete_consumer_group_topic_partition_offsetB
Delete the offset for a topic-partition for a given group.
Args: environment: The environment name. group_id: The ID of the consumer group. topic: The topic name. partition: The partition number.
Returns: The result of the delete operation.
Inputs: environment (required), group_id (required), topic (required), partition (required). Returns: object
delete_kafka_connectorC
Deletes a Kafka connector.
Args: environment: The environment name. cluster: The cluster name. connector: The connector name.
Returns: The result of the delete operation.
Inputs: environment (required), cluster (required), connector (required). Returns: object
delete_sql_processorC
Removes an existing SQL processor.
Args: environment: The environment name. sql_processor_id: SQL processor unique identifier.
Returns: Success message confirming the deletion.
Inputs: environment (required), sql_processor_id (required). Returns: result
execute_sqlB
Executes SQL statements/queries using Lenses WebSocket API.
Args: environment: The environment name. sql: The SQL statement/query to execute.
Returns: A list of MessageRecord objects representing the result of the SQL query.
Inputs: environment (required), sql (required). Returns: result
get_datasetB
Get a single dataset by connection/name.
Args: environment: The environment name. connection: The connection name (e.g., "kafka"). dataset: The dataset name.
Returns: Dataset details including fields, policies, permissions, and metadata.
Inputs: environment (required), connection (required), dataset (required). Returns: object
get_dataset_message_metricsC
Get ranged metrics for a dataset's messages.
Args: environment: The environment name. entity_name: The dataset's entity name.
Returns: List of message metrics with date and message count.
Inputs: environment (required), entity_name (required). Returns: result
get_deployment_targetsB
Returns deployment information including available Kubernetes clusters and Connect clusters.
Args: environment: The environment name.
Returns: Dictionary containing available deployment targets (Kubernetes clusters and Connect clusters).
Inputs: environment (required). Returns: object
get_environmentA
Retrieves a single Lenses environment by name.
Args: name: The name of the environment to retrieve.
Returns: A dictionary containing the environment's details including status, metrics, and metadata.
Inputs: name (required). Returns: object
get_kafka_connector_target_definitionA
Fetches the current target definition for a Kafka connector.
Args: environment: The environment name. connect_cluster_name: The connect cluster name. connector_name: The connector name.
Returns: The connector definition as a YAML string.
Inputs: environment (required), connect_cluster_name (required), connector_name (required). Returns: result
get_pod_logsB
Returns the logs produced by a running Kubernetes Pod.
Args: environment: The environment name. cluster: Pod's cluster name. namespace: Pod's namespace. pod: Pod's name.
Returns: The logs content as a string.
Inputs: environment (required), cluster (required), namespace (required), pod (required). Returns: result
get_sql_processorB
Retrieves a single SQL processor by ID.
Args: environment: The environment name. sql_processor_id: SQL processor unique identifier.
Returns: Detailed SQL processor information including application, metadata, and deployment status.
Inputs: environment (required), sql_processor_id (required). Returns: object
get_topicC
Retrieve information about a specific topic.
Args: environment: The environment name. topic_name: Name of the topic.
Returns: Detailed topic information including partitions, consumers, config, etc.
Inputs: environment (required), topic_name (required). Returns: object
get_topic_broker_configsC
Get broker configurations for a topic.
Args: environment: The environment name. topic_name: Name of the topic.
Returns: List of broker configuration details.
Inputs: environment (required), topic_name (required). Returns: result
get_topic_metadataB
Get metadata for a specific topic.
Args: environment: The environment name. topic_name: Name of the topic.
Returns: Topic metadata including schema information and tags.
Inputs: environment (required), topic_name (required). Returns: object
get_topic_partitionsC
Retrieve detailed partition information including messages and bytes (v2 endpoint).
Args: environment: The environment name. topic_name: Name of the topic.
Returns: Partition details with message counts, bytes, and JMX timestamp.
Inputs: environment (required), topic_name (required). Returns: object
list_consumer_groupsB
Retrieve a list of all Kafka consumer groups.
Args: environment: The environment name.
Returns: A list of consumer group objects.
Inputs: environment (required). Returns: result
list_consumer_groups_by_topicC
Retrieve a list of consumer groups by a specific topic.
Args: environment: The environment name. topic: The name of the topic.
Returns: A list of consumer group objects.
Inputs: environment (required), topic (required). Returns: result
list_datasetsA
Retrieves a paginated list of datasets (topics and other data sources).
Args: environment: The environment name. page: Page number (default: 1). page_size: Items per page (default: 25). search: Search keyword for dataset, fields and description. connections: List of connection names to filter by. tags: List of tag names to filter by. sort_field: Field to sort results by. sort_order: Sorting order - "asc" or "desc" (default: "asc"). include_system: Include system entities (default: False). search_fields: Search field names/documentation (default: True). schema_format: Schema format filter for SchemaRegistrySubject. has_records: Filter based on whether dataset has records. is_compacted: Filter based on compacted status (Kafka only).
Returns: Paginated list of datasets with source types.
Inputs: environment (required), page, page_size, search, +9 more. Returns: object
list_environmentsA
Lists all Lenses environments.
Returns: A list containing all environments with their details including status, metrics, and metadata.
Inputs: no named parameters. Returns: result
list_kafka_connectorsB
Retrieves a list of all Kafka connectors.
Args: environment: The environment name. cluster: Optional list of cluster names to filter by. class_name: Optional list of connector class names to filter by.
Returns: A dictionary containing a list of all connectors with their details.
Inputs: environment (required), cluster, class_name. Returns: object
list_sql_processorsC
Retrieves all SQL processor details.
Args: environment: The environment name.
Returns: A dictionary containing a list of all SQL processors with their details.
Inputs: environment (required). Returns: object
list_topic_metadataC
List all topic metadata.
Args: environment: The environment name.
Returns: List of topic metadata including schemas and descriptions.
Inputs: environment (required). Returns: result
list_topicsB
Retrieve information about all topics.
Args: environment: The environment name.
Returns: List of all topics with detailed information.
Inputs: environment (required). Returns: result
resend_messageC
Resend a Kafka message.
Args: environment: The environment name. topic_name: Name of the topic. partition: Kafka partition number. offset: Kafka offset.
Returns: Resend operation result with partition and offset.
Inputs: environment (required), topic_name (required), partition (required), offset (required). Returns: object
restart_kafka_connector_taskB
Restarts a specific task of a Kafka connector.
Args: environment: The environment name. cluster: The cluster name. connector: The connector name. task_id: The task ID to restart.
Returns: The result of the task restart operation.
Inputs: environment (required), cluster (required), connector (required), task_id (required). Returns: object
set_action_on_kafka_connectorB
Controls a Kafka connector (start, stop, restart, pause, resume).
Args: environment: The environment name. cluster: The cluster name. connector: The connector name. action: The action to perform. Options: "start", "stop", "restart", "pause", "resume".
Returns: The result of the control operation.
Inputs: environment (required), cluster (required), connector (required), action (required). Returns: object
update_consumer_group_offsetsC
Update the offset for a consumer group topic-partition tuples.
Args: environment: The environment name. group_id: The ID of the consumer group. offsets: A list of topic-partition offset objects.
Returns: The result of the update operation.
Inputs: environment (required), group_id (required), offsets (required). Returns: object
update_consumer_group_topic_partition_offsetC
Update the offset for a topic-partition for a given group.
Args: environment: The environment name. group_id: The ID of the consumer group. topic: The topic name. partition: The partition number. offset: The new offset value.
Returns: The result of the update operation.
Inputs: environment (required), group_id (required), topic (required), partition (required), +1 more. Returns: object
update_dataset_topic_descriptionC
Update topic description (in metadata).
Args: environment: The environment name. topic_name: Name of the topic. description: The description of the topic. Returns: Success message.
Inputs: environment (required), topic_name (required), description. Returns: object
update_dataset_topic_tagsC
Update topic tags (in metadata).
Args: environment: The environment name. topic_name: Name of the topic. tags: List of tag names. Returns: Success message.
Inputs: environment (required), topic_name (required), tags (required). Returns: object
update_topic_configB
Update topic configuration.
Args: environment: The environment name. topic_name: Name of the topic. configs: List of config key-value pairs [{"key": "retention.ms", "value": "86400000"}].
Returns: Success message.
Inputs: environment (required), topic_name (required), configs (required). Returns: result
update_topic_metadataD
Inputs: environment (required), metadata (required). Returns: result
validate_connector_configurationC
Validates a Kafka connector configuration.
Args: environment: The environment name. name: The name of the connector. cluster: The cluster name. configuration: The connector configuration to validate.
Returns: Validation results including configuration details and any errors.
Inputs: environment (required), name (required), cluster (required), configuration (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 42 tools
Most tools have distinct purposes targeting specific resources like topics, connectors, or environments, but there is some overlap between tools like get_topic, get_topic_metadata, and get_topic_partitions, which could cause confusion about which to use for specific topic details. The descriptions help clarify, but the boundaries are not always perfectly clear.
Tool names follow a consistent snake_case pattern with clear verb_noun structures throughout, such as create_topic, list_consumer_groups, and update_dataset_topic_description. There are no deviations in naming conventions, making the set predictable and easy to navigate.
With 42 tools, the count is excessive for typical MCP server scope, leading to potential cognitive overload and inefficiency. While the domain is broad (Kafka and Lenses management), many tools could be consolidated or omitted without losing functionality, making the set feel heavy and unwieldy.
The tool set provides comprehensive coverage for managing Lenses environments, Kafka topics, connectors, SQL processors, and consumer groups, including full CRUD operations, health checks, and advanced features like message resending and configuration validation. No significant gaps are apparent for the stated domain.
Maintenance
Related MCP Connectors
Kafka and Postgres Monitoring Stack
Streamkap CLI & MCP server - manage CDC pipelines, sources, destinations, and transforms
Kafka + Redis + MinIO Stack Generator
Kafka + MinIO + Redis Stack Generator
Related MCP Servers
AlicenseBqualityAmaintenanceAn MCP server implementation built to interact with Confluent Kafka and Confluent Cloud REST APIs.241,927 npm170MIT- AlicenseNot gradedqualityDmaintenanceEnables interaction with Apache Kafka topics, allowing users to publish messages to and read messages from Kafka instances through natural language.1Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and monitor Apache Kafka clusters through natural language, providing real-time operations, health monitoring, consumer lag analysis, and temporal trend detection for intelligent cluster management.-
- FlicenseBqualityDmaintenanceEnables interaction with Apache Kafka clusters, allowing management of topics, message production, and consumption through natural language.5-