Gemini MCP Tool

Hands prompts and large files from an MCP client to Google's Gemini CLI or Antigravity CLI

By jamubc (individual) TypeScript Local · stdio AI and MLDeveloper tools

73 popularity score ★ 2.3k ↓ 3.6k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add gemini-tool -- npx -y gemini-mcp-tool
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "gemini-tool": {
      "command": "npx",
      "args": [
        "-y",
        "gemini-mcp-tool"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "gemini-tool": {
      "command": "npx",
      "args": [
        "-y",
        "gemini-mcp-tool"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "gemini-tool": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "gemini-mcp-tool"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.gemini-tool]
command = "npx"
args = ["-y", "gemini-mcp-tool"]
Gemini CLITerminal
gemini mcp add --scope user gemini-tool npx -- -y gemini-mcp-tool

Settings 3

GEMINI_MCP_BACKEND Optional: gemini or agy/antigravity; unset picks agy from 2026-06-18, gemini before.
AGY_CLI_PATH Optional: Full path to the agy binary when it is not on the server's PATH.
GEMINI_MCP_TIMEOUT Optional: Overall CLI run timeout in minutes, 45 by default.

What it does

Gemini MCP Tool is a small local server that passes requests from an assistant such as Claude Code to a Google command-line agent and returns its answer. The point is to offload work that needs a very large context window, such as reading a big file or a whole directory, to Gemini so the calling assistant spends fewer of its own tokens. Files and folders are pulled in with the CLI's @ syntax inside the prompt (for example @src/ or @package.json).

It does not talk to a Google API itself: it starts the CLI as a child process on your machine. Version 1.1.8 has two backends. The original one runs the Gemini CLI; the newer one runs the Antigravity CLI (agy), which Google named as the Gemini CLI's successor when it retired that CLI for free, AI Pro and AI Ultra users on 2026-06-18. Left unset, GEMINI_MCP_BACKEND picks agy from that date onward; enterprise and paid-API-key users can set it to gemini. The project calls the agy backend experimental.

Beyond plain questions it has a brainstorm tool that wraps the prompt in a chosen method (divergent, convergent, scamper, design-thinking, lateral, or auto by default, aiming for 12 ideas by default), and a changeMode option on ask-gemini that returns structured edit suggestions in chunks, fetched one by one with fetch-chunk. Model defaults to gemini-2.5-pro unless model is given.

The tool list in the README is out of date for 1.1.8: the registry in src/tools/index.ts registers ask-gemini, ping, Help, brainstorm and fetch-chunk, and no sandbox-test tool; sandboxed runs are a sandbox flag on ask-gemini instead. A timeout-test tool is added only when GEMINI_MCP_TEST_TOOLS is set, for the project's own tests.

What it needs

RuntimeNode.js 16+

Node.js 16 or newer for npx. Either the Antigravity CLI (agy) installed and signed in once by running agy, or, with GEMINI_MCP_BACKEND=gemini, the Google Gemini CLI installed and signed in (Gemini CLI still works for enterprise/Standard-licence and paid API key users). A Google account or key with quota for the chosen CLI.

Limits

With the agy backend (the default from 2026-06-18) print mode only uses Gemini 3.5 Flash, so a requested model is not honoured, and tool execution is not sandboxed; the server prints a notice when model or sandbox cannot be applied. Each CLI run times out after 45 minutes by default (GEMINI_MCP_TIMEOUT). The README still lists a sandbox-test tool that 1.1.8 does not register. Slash commands are tested in Claude Code only. Quota and sign-in errors come straight from the CLI.

Who it suits

Suits a Claude Code or other MCP client user who already has Gemini CLI or Antigravity CLI access and wants a second model to read large files or folders, or to brainstorm, without spending the main assistant's context. It is unofficial and depends on whichever Google CLI is installed, so a change on Google's side (as with the 2026 Gemini CLI retirement) can break it. Pick something else if you want direct Gemini API calls without a local CLI, or need sandboxed code runs on the free tiers, since agy runs tools unsandboxed.

Tools 5

ask-gemini
Sends a prompt, optionally with @-referenced files, to the CLI; options for model, sandbox and structured edit output (changeMode)
brainstorm
Generates ideas on a challenge using a chosen ideation method, with optional domain, constraints and feasibility notes
fetch-chunk
Returns a further chunk of a long changeMode answer by cache key and chunk number
ping
Echoes a message back to test the connection
Help
Shows the help text of the underlying CLI

Similar servers