gemini-bridge
Allows Claude to query Google's Gemini AI through the Antigravity CLI for independent second-opinion reviews, code and design feedback, and follow-up conversations, with read-only containment and structured review profiles.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
gemini-bridge
Let Claude ask Google's Gemini for a second opinion — safely.
You're building something with Claude Code. Claude writes a plan or some code. But who checks Claude? gemini-bridge lets Claude (or you) hand that plan, file, or set of changes to Gemini, a completely different AI from a different company, and get back an independent review. Different AIs make different mistakes, so a second pair of eyes catches things the first one missed.
Gemini only gets to read what you send it. It can't edit your files, run commands, or poke around your computer.
Not affiliated with Google or Anthropic.
What it does, in plain words
Second opinions. "Hey Gemini, here's Claude's plan for the database. Anything wrong with it?"
Code reviews. "Gemini, review everything I changed since my last commit. Any bugs? Any security holes?"
Design feedback. "Which of these two approaches is better, and why?"
(Optional) Hand off real work. Let Gemini build a UI piece or click through your app in a browser and take screenshots, in a separate copy of your project, so nothing touches your real files until you say so. This is called Agent mode and it's off by default.
You don't need to learn any commands to use it. After setup you just talk to Claude Code normally:
"Get a second opinion from Gemini on this migration plan"
"Have Gemini do a security review of my uncommitted changes"
"Ask Gemini if this login code has any bugs"
Claude sends the question, waits for Gemini, and shows you what Gemini said.
Related MCP server: antigravity-claude-mcp
Why you'd want this
Claude can be confidently wrong. So can any AI. Asking a different AI is the cheapest way to catch that before it ships.
It's safe by default. Running Gemini's command-line tool on its own can edit files and run commands. gemini-bridge switches all of that off. If Gemini somehow tries to use a tool anyway, the bridge throws the answer away and reports it (
CONTAINMENT_VIOLATION).The answers have a fixed format. Reviews come back as a clear verdict (approve / request changes / comment) plus a list of issues with file, line, and how serious each one is, not a wall of text. If Gemini replies in the wrong format, the bridge asks once more; if it's still wrong, it tells you instead of handing you garbage.
Everything is logged. Every call goes into a log on your machine that can't be quietly edited afterwards, so you can always see what was sent to Gemini and what came back.
How it works (the 30-second version)
You / Claude Code ──► gemini-bridge ──► Antigravity CLI (agy) ──► Gemini
│
├─ picks only the files/diff you asked for (skips secrets like .env and keys)
├─ runs Gemini in a fresh, empty, throwaway setup with every tool turned off
├─ checks the answer is in the right format
└─ saves the conversation so you can ask follow-up questionsIt talks to Gemini through Google's Antigravity CLI (agy), so it uses your existing Antigravity account and plan. You don't need a separate API key.
What you need
Python 3.10 or newer and git
Antigravity CLI (
agy) installed and signed in once (runagyin a terminal and finish the login)Claude Code (or any other app that supports MCP servers), if you want Claude to use it
Calls use up your Antigravity plan's quota
Alpha status: It's tested for real on Windows 11 (
agy1.5.18–1.5.20). The automated tests run on Windows, macOS, and Linux, but real Gemini calls haven't been tried on macOS/Linux yet. After setup,gemini-bridge doctor --livetells you whether it works on your machine.
Setup
Easiest way: let Claude Code set it up
Sign in to
agyyourself first. Open a terminal, runagy, and finish the login. Claude can't do this part for you because it's an interactive login.Paste this into Claude Code:
Set up gemini-bridge (https://github.com/IAbhishekJhaI/gemini-bridge) for me:
1. Check that Python 3.10+, git and the Antigravity CLI (agy) are on my PATH.
If agy is missing or not signed in, stop and tell me — I'll sign in myself.
2. Clone the repo and install it with `pipx install .`. If pipx isn't installed,
don't install it into my global or user Python (it can upgrade packages other
tools depend on): put pipx in its own venv, or install gemini-bridge into a
dedicated venv and put its script on my PATH.
3. Run `gemini-bridge doctor --live` and show me the result. Stop if any check fails.
4. Register it: `claude mcp add --scope user gemini-bridge -- gemini-bridge mcp`
5. Set MCP_TOOL_TIMEOUT=600000 persistently for my OS and shell.
Leave agent mode off. When done, tell me to restart Claude Code.Restart Claude Code completely (quit and reopen) so it picks up the new tools and the timeout.
Ask it something like "Get a second opinion from Gemini on this file".
Manual way
Step 1: Install it
git clone https://github.com/IAbhishekJhaI/gemini-bridge.git
cd gemini-bridge
pipx install .pipx puts the tool in its own little sandbox so it can't clash with your other Python stuff. Don't have pipx? Install it the way pipx's docs suggest for your system (e.g. scoop install pipx on Windows, brew install pipx on macOS, sudo apt install pipx on Ubuntu). Avoid pip install --user pipx into the Python your other projects use: it can upgrade packages those projects depend on and break them. (pip install . also works, but it installs into whatever Python is active.)
Step 2: Check it works
gemini-bridge doctor --liveThis makes two short real calls to Gemini (they count against your quota):
A simple "are you there?" call, which also checks that Gemini has no tools available.
A test where Gemini is asked to write a file and run a command. Both must fail. You want to see
write_file=ERROR, run_command=ERROR.
Every line should say [PASS].
Step 3: Connect it to Claude Code
claude mcp add --scope user gemini-bridge -- gemini-bridge mcpStep 4: Give Gemini enough time to answer
Gemini can take anywhere from 15 seconds to a few minutes on a big question, which is longer than Claude Code waits by default. Raise the limit to 10 minutes:
Windows (PowerShell):
setx MCP_TOOL_TIMEOUT 600000macOS / Linux: add
export MCP_TOOL_TIMEOUT=600000to your~/.zshrcor~/.bashrc
Step 5: Restart Claude Code and check it's connected:
claude mcp get gemini-bridgeIt should say Connected. Claude Code runs the bridge inside whatever project folder you open, so Gemini can only be shown files from that project.
{
"mcpServers": {
"gemini-bridge": {
"command": "gemini-bridge",
"args": ["mcp"],
"env": {
"GEMINI_BRIDGE_WORKSPACE": "/path/to/project"
}
}
}
}Using it
From Claude Code (normal way)
Just ask in plain English. Claude picks the right tool:
You say something like… | Claude uses |
"Ask Gemini what it thinks of this plan / file / idea" |
|
"Have Gemini review my changes" / "…since main" |
|
"Continue that Gemini conversation" |
|
"What review styles does Gemini have?" |
|
"Show me the whole Gemini conversation" |
|
None of these change your project. The bridge only writes to its own folder (logs and saved conversations).
Gemini's answer is advice, not approval. Treat it like one extra reviewer's opinion.
From your terminal
# Ask a question, with a file attached
gemini-bridge ask "Is a single Postgres table with row locks enough to prevent double-spend?" -f docs/adr-007.md
# Ask a follow-up in the same conversation
gemini-bridge ask "What would you change first?" --thread t-20261128T101500Z-a1b2c3
# Review your uncommitted changes
gemini-bridge review
# Security-focused review of a branch compared to main
gemini-bridge review --base main --head feature/x -p security-review --focus "token handling"
# Look around
gemini-bridge profiles # list review styles
gemini-bridge threads # list saved conversations
gemini-bridge log # see the call log
gemini-bridge config # see your current settings
gemini-bridge doctor --liveAdd --json for machine-readable output. Exit codes: 0 OK, 1 something went wrong on Gemini's side, 2 the bridge refused the request.
Profiles (review styles)
A profile tells Gemini how to answer, and what format the answer must be in.
Profile | Good for | What you get back |
| General questions | answer, key points, risks, open questions |
| Free-form chat | plain Markdown |
| "Which approach is better?" | recommendation, reasoning, alternatives with pros/cons, risks |
| Reviewing changes | verdict ( |
| Security checks | same as |
Create <config-dir>/profiles/<name>/ with:
profile.json:{"kind": "ask" | "review", "description": "...", "schema": "schema.json" | null}prompt.md: the prompt template. Wrap untrusted parts in tags that use{nonce}. Must include{question}(forask) or{diff}(forreview).schema.json(optional): a JSON Schema with top-level"type": "object". Stick totype,properties,required,enum,items, andadditionalProperties.
Placeholders you can use:
ask:{question}{files}{omitted}{thread}{round}{max_rounds}{nonce}review:{diff}{files}{omitted}{focus}{base}{head}{nonce}
Easiest start: copy a built-in one from src/gemini_bridge/profiles/.
Who wins: your own profiles can replace built-in ones. A repo can ship extra profiles in <repo>/.gemini-bridge/profiles/, but those can only add new names. They can never replace built-in or your own profiles.
Agent mode (optional)
Normally Gemini can only read and answer. Agent mode lets Gemini actually do things, like build a UI component, run your tests, or open your app in a browser, click around, and take screenshots.
To keep that safe:
Gemini works in a separate copy of your project (a git worktree on a branch called
gemini/<id>). Your real files aren't touched.Every single action Gemini tries (read a file, run a command, open a page) is checked against a strict allow-list first. Anything not allowed is blocked.
The browser it uses is a fresh, headless Chrome that can only visit your own machine (
localhost).Nothing lands in your project until you (or Claude) look at the changes and run
agent_apply.
Turn it on by adding this to your user config file (see Settings for where it lives). A project can't turn it on for you:
{
"agent": {
"enabled": true
}
}Then restart Claude Code. Try:
"Have Gemini add a dark-mode toggle to the header, then review its diff"
"Start the dev server and have Gemini test the signup flow and share screenshots"
How a session goes:
agent_start ──► agent_wait (repeat until done) ──► look at report, agent_diff, agent_artifacts
│
needs changes? ──► agent_send ────┘
looks good? ──► agent_apply ──► agent_close⚠️ Read SECURITY.md before turning this on. Gemini is allowed to run your build/test commands, and it can edit the files those commands run (like
package.jsonscripts). Only use agent mode on projects you trust, and always look at the diff before applying it.
Tool | What it does |
| Makes the separate copy (worktree) on |
| Waits (up to |
| Current state, report, number of changed files, number of blocked actions. |
| Send feedback or a follow-up instruction (wakes the worker back up if it went idle). |
| Show what Gemini changed. |
| List screenshots and output files so Claude can look at them. |
| Copy Gemini's changes into your real project (doesn't commit). |
| Stop the current work but keep the copy around to inspect. |
| End the session and delete the copy (optionally save the changes onto |
| List sessions and their states. |
gemini-bridge agent start -p ui-build "Add a dark-mode toggle to the header" \
--serve "npm run dev" --url http://localhost:5173/
gemini-bridge agent wait <session_id> --follow
gemini-bridge agent diff <session_id>
gemini-bridge agent send <session_id> "Use the existing Button component instead of a raw <button>"
gemini-bridge agent apply <session_id>
gemini-bridge agent close <session_id>Profile | What it's for | Final report has |
| Build UI in the copy, run the project's checks, optionally look at it in the browser |
|
| Click through the app in a browser and take screenshots. Can only write to |
|
| General coding tasks | same as |
Every step Gemini takes goes through the bridge's PreToolUse hook (if the hook fails, the step is blocked), inside a throwaway HOME:
File reads/writes only inside the copy (never
.gitor anything indeny_paths).Commands only from
allow_commands: no shell operators, nogit push, no package installs.Browser: a bridge-launched headless Chrome with a fresh profile, local network only.
strict: true(default): if any step ever ran without going through the hook, the session is cancelled and marked failed.
Key | Default | What it does |
|
| Turns agent tools on (user config only). |
|
| Which Gemini model and how hard it thinks. |
|
| How many sessions can run at once. |
|
| Time limits in seconds. Idle workers stop and wake up again on |
|
| Longest a single |
| build/test/git-read; push/installs | Command patterns ( |
|
| Hosts the browser and fetches may visit. |
|
| Folders linked into the copy so builds work without reinstalling. |
|
| Browser on/off, hidden window, custom Chrome path. |
|
| Loosen the rules on purpose. |
|
| Fail the session if any step skipped the safety hook. |
|
| Extra MCP servers to pass into each session. |
Sessions and their copies live in <state_dir>/agent/sessions/<id>/ and <state_dir>/agent/worktrees/<id>/.
Settings
You don't need to change anything; the defaults work. If you want to, your settings file is here:
Windows:
%APPDATA%\gemini-bridge\config.jsonmacOS / Linux:
~/.config/gemini-bridge/config.jsonOr anywhere you like: point
$GEMINI_BRIDGE_CONFIGat it
Example (every key is optional):
{
"default_advisor": "gemini",
"advisors": {
"gemini": { "model": "gemini-4-neon-high", "effort": "high", "timeout_s": 600 },
"fast": { "model": "gemini-4-neon-low", "effort": "low", "timeout_s": 180 }
},
"default_profile": "ask",
"max_rounds": 10,
"max_context_bytes": 400000,
"deny_paths": [".git", ".env*", "*.pem", "*.key", "id_rsa*"],
"extra_deny": [],
"log_outputs": true
}Key | What it does |
|
|
| File patterns that are never sent to Gemini, not even inside a diff. Built-in list covers |
| Extra Antigravity permission deny rules. The built-in lockdown rules can't be removed. |
| Max back-and-forth rounds in one conversation (default |
| Size limits for attached context and the whole prompt ( |
| How many times to re-ask if Gemini replies in the wrong format (default |
| Also save Gemini's replies in the log (default |
| Where logs, conversations, and agent sessions are stored. Default |
Project settings (<project>/.gemini-bridge.json) can only make things stricter: default_profile, default_review_profile, default_advisor, a lower max_rounds, turning review_include_files off, and adding to deny_paths / extra_deny. Everything else (including agent and advisors) is ignored with a warning, so a repo you downloaded can't weaken the safety settings or swap in a different command.
When something goes wrong
Every answer comes with a status. Here's what they mean:
Status | What happened | What to do |
| Got a valid answer. | Nothing. |
|
| Run |
| Gemini took too long and was stopped. | Ask a smaller question, or raise |
| Gemini answered in the wrong format, even after one retry. | Try again, or use the |
| A tool ran (or tools got loaded) even though everything should be blocked. The answer was thrown away and not retried. | Don't ignore it: check SECURITY.md and open an issue with |
| Google's safety filter blocked the prompt. | Rephrase the question. |
| Another Gemini call was already running too long. | Wait and retry. The bridge runs one call at a time. |
| The conversation hit | Start a new conversation. |
| Nothing to review. | Make sure you have changes, or pick a different |
| The bridge refused: bad path, a secret file, unknown profile, or too big. | Check the message; it says why. |
Claude doesn't see the Gemini tools? Fully restart Claude Code, then run claude mcp get gemini-bridge. It should say Connected.
Claude says the tool call timed out, but Gemini was still thinking? MCP_TOOL_TIMEOUT isn't set (or Claude Code wasn't restarted after setting it). See setup Step 4.
More docs
SECURITY.md: exactly what is and isn't protected, for both modes.
docs/architecture.md: how the pieces fit together, with diagrams.
docs/agy-notes.md: notes on how
agybehaves (headless mode, ACP mode, hooks, browser).
For contributors
python -m venv .venv
.venv/bin/pip install -e . # Windows: .venv\Scripts\pip install -e .
python -m unittest discover -s tests -v # offline tests (use a fake agy, no Gemini calls)
python tests/live_check.py # real check against Gemini
python scripts/probe_acp.py --hook --chrome # re-test agy ACP, hooks, and browserWant to add another AI besides Gemini? Subclass gemini_bridge.adapters.base.Adapter and register it in src/gemini_bridge/adapters/__init__.py.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Paid second opinion for coding agents: engineering advice, diff review and multi-model consensus.
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
Multi-brand AI code review for Claude: up to 12 reviewers and a judge, no install.
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude Code to request independent code reviews and second opinions from other AI models (like Gemini, GPT-OSS) via the Antigravity CLI, directly from the chat.11MIT
- AlicenseAqualityDmaintenanceAllows Claude Code to request an independent code review from Google Antigravity (Gemini, Claude, or GPT-OSS) via the Antigravity CLI, providing a second opinion on plans or diffs.1155 npm3MIT
- AlicenseBqualityNot gradedmaintenanceEnables MCP-compatible AI clients like Claude Code, Cursor, and Codex to invoke Google Antigravity's Gemini coding agent for repository-aware file operations, command execution, code review, test generation, and quota checks, while also providing a standalone dual-mode CLI.7MIT
- AlicenseBqualityCmaintenanceEnables MCP clients such as Claude Code and Cursor to delegate long multi-step coding tasks to Google Antigravity CLI, generate read-only plans and code reviews, digest large codebases, and manage background sessions in isolated git worktrees.15152 npm2MIT