Skip to main content
Glama

gemini-app-bridge

CI License: MIT Node.js Version Chrome MV3

简体中文 | English

A zero-tab, minimal-permission Gemini Web App MCP bridge + turnkey Antigravity (AGY) plugin that lets local AI coding agents (Antigravity, Claude Code, Codex, Cursor, Windsurf, etc.) reuse your signed-in Gemini Web App subscription (https://gemini.google.com/app)—with no API key, no cookie export, no Chrome CDP flags, zero popups, zero focus stealing, plus Gemini 4 Native /skills cloud sync and one-command account switching (npm run onboard).

Disclaimer: This is an unofficial community tool and is not affiliated with or endorsed by Google. It reuses your local signed-in browser session and non-public Gemini Web endpoints, which Google may change at any time. Intended strictly for personal local development and research—never use it to bypass login, CAPTCHA, rate limits, or Google's Terms of Service.


Highlights (v2.12.0)

  • Silent Zero-Tab Execution: Prompts, file/directory uploads (small text files <=64KB auto-inlined), create_image (use downloadImagesDir to save images to disk), NotebookLM lookups, and usage checks run directly inside the MV3 Service Worker—no new windows, no tab switching, no focus stealing.

  • Native Gemini 4 /skills Cloud Sync: Manage cloud Skills zero-tab with zero popups. The 5 built-in specialist skills stay hosted with enabled: false by default and mount only when explicitly requested (e.g., gemId: "agy-code-auditor"), keeping your everyday Gemini Web chats 100% unpolluted (never touches global Saved Info).

  • Zero-Residue Cleanup & Clear Model Tiers: One-shot asks use temporary chats plus a durable cleanup queue so your Gemini sidebar stays clean. Generous timeouts by tier: Carbon (Web UI Code & complex, 420s default), Neon (Web UI Pro / Deeper analysis, alias "Pro", 300s default), and Hydrogen (Web UI Fast / Everyday help, alias "Fast"). Supports lock-free parallel runs, 135s sync-to-async handoff, and GEMINI_AUTH_USER_POOL=0,1 multi-account failover.

  • Turnkey Antigravity Plugin + One-Command Account Switch: Ships 5 ready-to-use specialist cloud skills and a cross-platform npm run onboard command that starts the daemon, clears stale session caches, checks quota, and syncs all 5 skills in one shot whenever you switch Google accounts.

flowchart LR
  A["AI Agent (Antigravity / Claude Code / Cursor / Codex)"] -->|"stdio (--connect)"| B["Local Daemon (127.0.0.1:17321)"]
  B <-->|"Loopback WS + Mutual HMAC-SHA256"| C["Chrome / Vivaldi MV3 Service Worker (Zero Tabs)"]
  C <-->|"Same-Origin Session RPC"| D["gemini.google.com (/app & /skills)"]

Related MCP server: Gemini Web Bridge MCP

Prerequisites

  • Node.js >= 20

  • Python >= 3.10 (only needed for npm run onboard / sync-skills / health)

  • Chrome / Vivaldi / Edge / Brave (Chromium 116+) signed in to https://gemini.google.com/app (keep the browser running; no Gemini tab needs to stay open)


Quick Start (3 Minutes, Cross-Platform)

1. Clone & Build

git clone https://github.com/nariahlamb/gemini-app-bridge.git
cd gemini-app-bridge
npm install --omit=optional   # or `npm install` if you also want Playwright fallback
npm run build

2. Auto-Pair & Install (Pick One)

  • Antigravity (AGY) users (recommended — pairs bridge + installs plugin + writes machine-local mcp_config.json):

    npm run setup:agy
  • Claude Code / Cursor / Codex / Generic MCP clients:

    npm run setup

This generates a local 64-char HMAC token in your OS app-data folder (bridge.json) and writes the gitignored extension/local-config.json for zero-copy pairing.

3. Load the Extension

  1. Open chrome://extensions (or vivaldi://extensions / edge://extensions) in your signed-in browser.

  2. Enable Developer mode.

  3. Click Load unpacked and select this repository's extension/ directory.

  4. Expected initial state: Because the local daemon has not started yet, the extension popup will show Disconnected / standby right after loading—this is normal. Once you run npm run onboard in Step 4 (or connect from your MCP client in Step 5, which auto-starts 127.0.0.1:17321), it switches to Connected within ~1 second.

4. One-Command Onboarding & Cloud Skill Sync (All Clients & OSes)

Works across Windows CMD, PowerShell, macOS, and Linux from the repo root—whether you use Antigravity, Claude Code, or Cursor:

# First-time onboarding, or anytime you switch Google accounts in your browser:
npm run onboard

# Switch to a secondary account slot (/u/1) and save it as default:
npm run onboard -- --auth-user 1 --set-default

Also available: npm run health and npm run sync-skills.

5. Register in Generic MCP Clients

Windows JSON note: Always use forward slashes (e.g. "E:/github/gemini-app-bridge/dist/index.js") or escaped backslashes \\ in JSON files—single backslashes \ will break JSON parsing.

Claude Code CLI:

claude mcp add gemini-app -e GEMINI_DRIVER=extension -- node /abs/path/to/gemini-app-bridge/dist/index.js --connect

Cursor (.cursor/mcp.json) / Generic MCP JSON:

{
  "mcpServers": {
    "gemini-app": {
      "command": "node",
      "args": ["E:/github/gemini-app-bridge/dist/index.js", "--connect"],
      "env": {
        "GEMINI_DRIVER": "extension"
      }
    }
  }
}

Codex (~/.codex/config.toml):

[mcp_servers.gemini-app]
command = "node"
args = ["/abs/path/to/gemini-app-bridge/dist/index.js", "--connect"]
env = { GEMINI_DRIVER = "extension" }

6. Everyday Usage (Just Ask in Plain Language)

No need to memorize the 19 tool names—just prompt your agent naturally:

  • Second-opinion code review: "Use gemini-app with agy-code-auditor to audit my uncommitted diff for concurrency or security bugs."

  • Primary-source research: "Ask gemini-app with agy-evidence-scout to check breaking changes in library X and include official links."

  • NotebookLM spec check: "List my NotebookLM notebooks, mount the Architecture Spec notebook, and verify whether my new endpoint conflicts with it."


Built-In Cloud Specialist Skills (5, Default enabled: false)

gemId (slug)

Recommended Model (Web UI Tier)

Focus

agy-memory-distiller

Carbon (Code & complex)

Deduplicates and distills workspace MEMORY.md / LEARNINGS.md

agy-evidence-scout

Neon (Pro / Deeper analysis)

Primary-source research (GitHub, papers, official docs with links & conflicts)

agy-code-auditor

Carbon (Code & complex)

Independent code & security second opinion (P0/P1/P2 + Gate Verdict)

agy-prose-critic

Carbon (Code & complex)

Editorial critique for AI clichés and stiffness (reports symptoms only)

agy-continuity-checker

Carbon (Code & complex)

Paired with NotebookLM (notebookIds) to audit large engineering specs, architecture docs, or long-form lore for contradictions


Exposed MCP Tools (19)

  • Core: gemini_ask, gemini_poll (single jobId or batch jobIds), gemini_sessions, gemini_status, gemini_usage, gemini_wait_for_ready

  • Native Skills, Knowledge & Automation: gemini_gems (v2.12 zero-tab /skills CRUD & toggle via pure-JS PKZIP + CRC-32 and Scotty agent_skills), gemini_list_gems, gemini_list_notebooks (notebookIds), gemini_tasks (list/get/create/update/pause/resume/confirm/delete)

  • History & Models: gemini_list_conversations, gemini_get_conversation, gemini_open_conversation, gemini_new_chat, gemini_list_models, gemini_select_model

  • DOM / Fallback: gemini_send_message, gemini_stop_generation, gemini_screenshot (Playwright/CDP mode only)


Security & Privacy Matrix

See SECURITY.md for the full threat model and disclosure policy.

Control

Guarantee (Enforced by npm run check)

Minimal Extension Permissions

Only tabs, scripting, storage, alarms. Never requests cookies, <all_urls>, debugger, activeTab, or webRequest.

Strict Host Permissions

Scoped strictly to gemini.google.com, content-push.googleapis.com, and Google usercontent CDN hosts.

Loopback Mutual Auth

Binds only 127.0.0.1, validates Host & chrome-extension:// Origin, and requires mutual HMAC-SHA256 authentication.

Zero Popups / Zero Focus Steal

Statically enforced by scripts/check-guardrails.mjs.

Secret & Symlink Upload Guard

Engine upload guards + cli.py redact-check block .env*, private keys, tokens, cookies, and symlinks.

No Anti-Bot / CAPTCHA Bypass

Immediately halts and returns needs_login or needs_human_verification.


Development & Verification

npm run check      # Minimal-permission, zero-popup, version-sync & hygiene guardrails
npm run build      # TypeScript compile
npm test           # Full unit + extension E2E + Playwright integration test suite (105 tests)

Attribution & License

  • Built on top of the MIT-licensed Xhhemoing/gemini-app-mcp engine and extended to v2.12.0 with Gemini 4 Native /skills zero-tab lifecycle management, cross-platform npm run onboard, resilience fixes, and the Antigravity plugin suite.

  • License: MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to interact with a signed-in Gemini web account through a local stdio MCP server for status, capabilities, models, prompts, history, conversations, memory, usage, and downloads.
      1
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables coding agents to send prompts to Gemini Pro through a logged-in Gemini web session in a Chromium browser, using a Chrome extension bridge instead of an API key. It also supports attaching local files to prompts and downloading images or other generated files back to disk, including on Linux servers.
      1
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects coding agents to personal Gemini Web accounts so they can delegate prompts, track jobs, and check model limits, while giving Gemini Web OAuth-protected local file listing, reading, searching, writing, and note-saving tools. Includes safeguards such as account locking, protected paths, and read-only remote modes.
      MIT