Skip to content

Getting Started

balakrishnagatla edited this page Nov 29, 2026 · 1 revision

Getting Started

1. Built-in demo (no cloud, no Docker)

git clone https://github.com/balakrishnagatla/infralens && cd infralens
pip install -e ".[aws]"
infralens scan

This scans a built-in demo environment ("Acme Shop" on a Monday morning) and prints the daily discoveries report: idle resources, a payment-api incident linked to the deploy that caused it, and untagged resources.

2. Simulated AWS account (Docker)

docker compose up --build -d     # simulated AWS (moto) + seeded resources + MCP server on localhost:8080
python demo/mcp_client_demo.py http://localhost:8080/mcp change-me-local-demo
docker compose run --rm infralens scan
docker compose down

mcp_client_demo.py talks to the server exactly the way an AI client does: it lists tools, calls scan, find_cost_savings and what_changed.

3. Your own infrastructure (read-only)

pip install "infralens-mcp[aws,k8s] @ git+https://github.com/balakrishnagatla/infralens"

INFRALENS_PROVIDERS=aws INFRALENS_REGIONS=us-east-1 infralens scan   # your AWS credentials or AWS_PROFILE
infralens -p kubernetes scan                                         # your current kubeconfig context

Use credentials that can only read. For AWS, attach the shipped read-only IAM policy; for Kubernetes, the read-only ClusterRole.

Install extras

Extra Adds
aws boto3 for the AWS provider
azure Azure SDKs (beta provider)
k8s Kubernetes client
ai LiteLLM for AI summaries in Watch Mode
dev pytest, ruff, moto

CLI

Command What it does
infralens scan Scan and print the report (what's new and resolved since last time)
infralens findings List tracked findings and their status
infralens savings Cost savings captured so far and still available
infralens serve Run the MCP server (stdio; --http for Streamable HTTP)
infralens daily Watch Mode: scan, AI summary, publish

Global options: --policy infralens.yaml, -p/--provider (repeatable).

Next: MCP Tools and Clients

Clone this wiki locally