Lenses MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port to listen on (only used with http or sse transport) | 8000 |
| TRANSPORT | No | Transport mode: stdio, http, or sse | stdio |
| LENSES_URL | No | Lenses instance URL in format [scheme]://[host]:[port]. Use https:// for secure connections (automatically uses wss:// for WebSockets) | http://localhost:9991 |
| LENSES_API_KEY | Yes | Your Lenses API key (create via IAM Service Account) | |
| LENSES_API_HTTP_URL | No | Legacy environment variable for HTTP URL (automatically derived from LENSES_URL but can be explicitly set to override) | |
| LENSES_API_HTTP_PORT | No | Legacy environment variable for HTTP port (automatically derived from LENSES_URL but can be explicitly set to override) | |
| LENSES_API_WEBSOCKET_URL | No | Legacy environment variable for WebSocket URL (automatically derived from LENSES_URL but can be explicitly set to override) | |
| LENSES_API_WEBSOCKET_PORT | No | Legacy environment variable for WebSocket port (automatically derived from LENSES_URL but can be explicitly set to override) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_environmentsA | Lists all Lenses environments. Returns: A list containing all environments with their details including status, metrics, and metadata. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| list_consumer_groupsB | Retrieve a list of all Kafka consumer groups. Args: environment: The environment name. Returns: A list of consumer group objects. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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). |
| 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. |
| list_topicsB | Retrieve information about all topics. Args: environment: The environment name. Returns: List of all topics with detailed information. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| add_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. |
| 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. |
| list_topic_metadataC | List all topic metadata. Args: environment: The environment name. Returns: List of topic metadata including schemas and descriptions. |
| 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. |
| update_topic_metadataD | – |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| list_connected_environments | List all connected environments |
| list_running_kafka_connectors | List all running Kafka connectors in the environment |
| generate_create_kafka_connector_prompt | Create a Kafka connector with the specified configuration |
| troubleshoot_kafka_connector | Troubleshoot a specific Kafka connector |
| validate_kafka_connector_config | Validate a Kafka connector configuration before deployment |
| list_consumer_groups_for_topic | List consumer groups for a specified topic in a specified environment |
| generate_sql_query_for_task | Write a Lenses SQL query to achieve a task |
| list_running_sql_processors | List all running SQL processors in the environment |
| generate_create_sql_processor_prompt | Create a SQL processor with the specified name and SQL query |
| troubleshoot_sql_processor | Troubleshoot a specific SQL processor |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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.