Skip to content

How the Lens MCP Server 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 K8S IDE. 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#

The MCP server exposes three tools that scope what your AI assistant sees: list-clusters, connect-cluster, and disconnect-cluster. Ask your assistant something like "Connect to my production EKS cluster" and it calls connect-cluster for you. After that, prompts such as "check all connected clusters" target only the ones you connected.

See Kubernetes tools for the tool reference and parameters.

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 K8S IDE terminal, or the built-in editor.

Reliability notes#

  • Large responses. Tool responses that return long output (for example, dense kubectl get listings or wide PromQL ranges) are chunked so the connection between Lens K8S IDE and your MCP client stays stable. You see the full response in your AI assistant without manual retries.