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 marked quote-matched only when the quoted line appears in the code you sent. Otherwise it is marked unconfirmed 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 tell Antigravity when to offer a MegaLens review and to wait for your yes before running it. Gemini CLI also reads this file. You can also add the lines yourself:

Instructions for Antigravity
Offer a MegaLens review at most once per task, even if the task has both a plan and code changes. Skip the offer if the task came from a MegaLens fix prompt or the user says “just fix it” or otherwise asks you to proceed without a review. After changing code that handles money, sign in, user data or database migrations, you can offer a review before the user commits. Wait for the user to say yes before running an offered review. You can run a review the user asks for directly or has already asked you to run automatically.
You can also offer a MegaLens review before a decision that is hard to undo, a new project or deep research. Follow the same rules for offers and permission. Skip small questions and 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.