Integrations/Gemini CLI

MegaLens + Gemini CLI

Gemini CLI writes the code and MegaLens reviews it. Gemini decides what to apply.

How it works

Gemini CLI stays in charge. It writes the code, sends it to MegaLens for review, gets a structured verdict back, and decides what to act on. MegaLens never touches the codebase directly.

1

Gemini CLI talks to MegaLens over MCP

Your Gemini CLI session calls the megalens_debate tool. Code and context are sent to the review pipeline.

2

Models from different companies review the code

MegaLens selects up to four AI models from different companies to review your code. They review it independently.

3

A final check reviews their findings

It reads the findings and removes weak ones. Each result names the models that actually took part.

4

Gemini receives the verdict and decides

The structured findings, severity levels, and fix roadmap go back to Gemini CLI. Gemini decides what to apply, modify, or skip.

Setup

The quickest way is the setup wizard. It detects Gemini CLI and writes the config for you.

npx megalens-mcp setup

Detects Gemini CLI, asks for your token, and writes the config below automatically. Or paste this into ~/.gemini/settings.json yourself:

{
  "mcpServers": {
    "megalens": {
      "httpUrl": "https://megalens.ai/api/mcp?ide=gemini-cli",
      "headers": {
        "Authorization": "Bearer ml_tok_your_token_here"
      }
    }
  }
}

Get your token at megalens.ai/app/settings/mcp. Setup wizard source: github.com/megalens/mcp.

Limitations

Here is what the integration cannot do today.

1.

A review takes a few minutes. It is not for autocomplete.

2.

Advisory only. MegaLens does not change your code, merge, push, or run tests.

Pricing

Free

$0

Your first review is free, with no card. MegaLens selects two reviewing models for it. After that, pay as you go: $9 per 1M blended tokens, never more than $3 for one review.

Plus and Pro

From $19 a month

A monthly allowance of reviews with model usage included: up to 100 reviews on Plus, 300 on Pro. MegaLens selects up to four reviewing models. Cancel any time.

How model costs are paid

On a plan, model usage is part of your monthly allowance. Otherwise, pay-as-you-go credits: $9 per 1M blended tokens, capped at $3 per review, prepaid from $20. See all plans

Gemini writes the code. MegaLens checks it.

Add one config entry, and other AI models review the code. Gemini stays in control.