This page is about the MegaLens connector inside your coding tool. To review pull requests, use the GitHub Action.
Integrations/Google Antigravity

MegaLens + Google Antigravity

Google Antigravity writes the code and MegaLens checks it before it reaches your git history. Antigravity decides what to apply.

How it works

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

1

Antigravity talks to MegaLens over MCP

Type “Review my changes with MegaLens” in Antigravity. It sends the code you ask it to review.

2

Models from different companies review the code

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

3

A judge checks each finding against the code

A finding is verified only when the judge can quote the code that proves it. Otherwise it is marked unverified or disputed. Each result names the companies whose models took part.

4

Antigravity receives the list and decides

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

Setup

The quickest way is the setup command. It asks before every change, and it needs the agy command installed. If that is missing, it writes nothing and shows you the manual command instead. This setup command needs Node.js 18 or later.

Copy your token from MegaLens settings, then paste only the token (it starts ml_tok_) when the command asks. If you no longer have it, generate a new one there. A new token replaces the one from this settings page, so update any tool that was using it.

Setup command
npx megalens-mcp setup agy

It then asks separately whether to add the two lines below (only the ones you do not have yet; it updates an older version of the second line) to ~/.gemini/GEMINI.md. These lines ask Antigravity to offer a MegaLens review and wait for your yes before running it. Gemini CLI also reads this file, so the lines apply there too. You can also add the lines yourself:

Instructions for Antigravity
After you change code that handles money, sign-in, user data or database migrations, and before the user commits it, offer a MegaLens review and wait for a yes before running it.
Before you or the user settle a decision that is hard to undo (choosing a database or data model, adding sign-in or payments, picking a major library or architecture), starting a new project, or doing deep research, offer a MegaLens review once for that task and wait for a yes before running it. Do not offer it for small questions or routine edits.

To take the lines out again, run npx megalens-mcp setup agy --remove-line.

Or add the connection manually:

You need your MegaLens token first. Then run one command in your terminal, in any project folder. Replace the token in the command with your own.

Manual setup command
agy mcp add --header "Authorization: Bearer ml_tok_your_token_here" megalens "https://megalens.ai/api/mcp?ide=antigravity"

The command saves MegaLens in the agy settings file at ~/.gemini/config/mcp_config.json, so you only do it once.

Get your token at megalens.ai/app/settings/mcp.

Then type this in your chat:

“review this plan with MegaLens”
“ask MegaLens to check this migration before I run it”

Good to know

A few things to keep in mind before your first review.

1.

A review takes a few minutes and checks the code and context your tool sends.

2.

Looks for bugs that change what your app does, not formatting: logic, security and behaviour bugs.

3.

MegaLens runs when you or Antigravity ask for a review. For every pull request, add the GitHub Action.

4.

You stay in control. MegaLens reports what could break, and you decide what to change.

Pricing

Standard reviews

Free to start

3 reviews free, no card. Applies to Standard reviews. Then 5 credits for $2.99.

Plus, Pro and Max

Monthly plans

Plans: Plus $19 a month for 20 credits, Pro $69 a month for 80 credits, Max $199 a month for 250 credits. Or pay as you go at $1.25 a credit, from $5. A Standard review uses 1 credit and a Deep review uses 8. Cancel any time.

How model costs are paid

On a plan, credits come with it every month. Otherwise, pay as you go with credits that never expire. See all plans and rates

Antigravity writes the code. MegaLens checks it.

Add MegaLens with one command, and reviewers from other AI companies check the code. Antigravity stays in control.