Skip to content

Lens MCP Server#

Lens MCP Server connects your AI assistants to Lens Desktop, enabling you to investigate and troubleshoot Kubernetes clusters using natural language. It implements the Model Context Protocol (MCP), an open standard by Anthropic donated to the Agentic AI Foundation (AAIF).

With the Lens MCP Server, you describe what you need in natural language, and the server runs read-only kubectl and PromQL commands on your behalf. You can troubleshoot cluster issues, investigate resource states, query Prometheus metrics, and correlate data across these sources to pinpoint problems that span multiple clusters or resource types.

  • Getting started


    Enable the MCP Server and connect your first AI assistant in under 5 minutes.

  • Kubernetes tools


    List clusters, connect to them, and run read-only kubectl commands.

  • Prometheus tools


    Query metrics, view alerts, inspect targets, and execute PromQL queries.

Key capabilities#

  • List and manage cluster connections from AWS EKS, Azure AKS, local kubeconfig, and Lens Teamwork Spaces
  • Run read-only kubectl commands (get, describe, logs, top, and more) across connected clusters
  • Query Prometheus — list metrics, view alerts, get targets, execute range queries
  • Works with any MCP-compatible client — Claude Desktop, Claude Code, Cursor, Windsurf, ChatGPT, and others

How it works#

Cluster access beyond kubeconfig#

Most Kubernetes MCP servers only work with your local kubeconfig. The Lens MCP Server provides the same cluster access as Lens Desktop. If you configure an AWS EKS integration that gives you access to 50 clusters, the MCP server can interact with all of them.

Cluster source Description
Local kubeconfig Clusters in your ~/.kube/config
AWS EKS integration Clusters discovered via your AWS account
Azure AKS integration Clusters discovered via your Azure subscription
Google GKE integration Coming soon
Lens Teamwork Spaces Shared clusters from your organization

Connection-based filtering#

Connect and disconnect from clusters to control which ones your AI assistant investigates. Instead of specifying cluster names in every prompt, connect to the clusters you care about and tell your assistant to focus on the connected ones.

Read-only mode#

The Lens MCP Server operates in read-only mode. You can investigate and diagnose issues, but write operations (creating, updating, or deleting resources) are not supported. Apply suggested fixes using your terminal, the Lens Desktop terminal, or the built-in editor.

Requirements#

  • You have a Plus, Pro, or Enterprise subscription plan. For details, see Lens Pricing
  • Lens Desktop with MCP Server support
  • Lens CLI installed and in your system PATH
  • An MCP-compatible AI assistant (Claude Desktop, Claude Code, Cursor, Windsurf, or other MCP client)

Limitations#

  • Read-only mode only — no write operations through the MCP server
  • Google GKE integration is not yet available
  • Lens Desktop must be running for the MCP server to work