jamubc/gemini-mcp-tool

MCP server that enables AI assistants to interact with Google Gemini CLI, leveraging Gemini's massive token window for large file analysis and codebase understanding

2,268 ★196 forksTypeScriptUpdated 16d ago

What you need to know

MCP server that lets AI assistants (e.g. Claude Code) invoke the Gemini CLI — now the Antigravity CLI (agy) after Gemini CLI retirement — to leverage Gemini's massive token window for large-file and codebase analysis using the @ file-reference syntax.

Install

claude mcp add gemini-cli -- npx -y gemini-mcp-tool
For the default backend: curl -fsSL https://antigravity.google/cli/install.sh | bash, then run `agy` once to sign in
Enterprise/paid-key users: set GEMINI_MCP_BACKEND=gemini to keep using Gemini CLI

Usage

  • Ask "use gemini to analyze @src/main.js and explain what it does" or "ask gemini to summarize @. the current directory"
  • Slash commands in Claude Code: /analyze, /sandbox, /help, /ping
  • Sandbox mode: "use gemini sandbox to create and run a Python script that processes data"

Key features

  • ask-gemini tool (prompt, model, sandbox params; default model gemini-2.5-pro) and sandbox-test tool (always sandboxed)
  • @ syntax for file/directory references; web search via natural language
  • Slash commands for Claude Code: /analyze, /sandbox, /help, /ping
  • Configurable via GEMINI_MCP_BACKEND (gemini vs agy), AGY_CLI_PATH, GEMINI_MCP_TIMEOUT (default 45 min)

Caveats

  • Gemini CLI was retired on 2026-06-18 for free/Pro/Ultra tiers — the tool now defaults to Antigravity CLI (agy)
  • agy backend is experimental: print mode is Gemini 3.5 Flash-only, replies come from stdout, and tool execution is not sandboxed in -p mode
  • Unofficial third-party tool, not affiliated with or endorsed by Google
  • Requires Node.js 16.0+
Platforms: macOS · Linux · WindowsClients: Claude Code · Claude Desktop

Reviewed 2026-08-07

Topics

aiclaudeclicodebase-analysisfile-analysisgeminimcpmodel-context-protocolnpmtypescript
View on GitHub ↗
Stars
2,268★
Forks
196
Language
TypeScript
License
NOASSERTION
Created
2025-06-29
Last push
2026-07-21