Gemini MCP Server

Stateless MCP server that proxies research queries to Gemini CLI, reducing agent context/model usage

Local serverstdioGo

What is the Gemini MCP server?

Connect Gemini to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Stateless MCP server that proxies research queries to Gemini CLI, reducing agent context/model usage. The gemini mcp server is what makes that connection.

What the server does

A lightweight, stateless MCP (Model Context Protocol) server that lets developer agents (Claude Code, GitHub Copilot) hand off deep repository analysis to the Gemini CLI. The server is read-only, returns structured JSON (as text content), and is designed to reduce the calling agent's context and model usage.

Gemini Researcher accepts queries from your AI agent and uses Gemini CLI to analyze your local code files. Results are returned as formatted JSON for your agent to use.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • quick_query — flash -> flash_lite -> auto
  • deep_research — pro -> flash -> flash_lite -> auto
  • analyze_directory — flash -> flash_lite -> auto
  • validate_paths — Pre-check file paths
  • health_check — Diagnostics
  • fetch_chunk — Get chunked responses

Credentials and setup notes

Configuration is passed through the environment: PROJECT_ROOT, GEMINI_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Node.js 18+ installed - Gemini CLI installed: npm install -g @google/gemini-cli - Gemini CLI authenticated (recommended: gemini → Login with Google) or set GEMINI_API_KEY Quick checks:

Installation

Installation goes through your MCP client rather than a global install: point it at gemini-researcher on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Where it fits

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Gemini's toolset — quick_query, deep_research, analyze_directory and 3 more — is a fair guide to whether it matches your workflow. It is maintained by capyBearista; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Gemini's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
quick_queryflash -> flash_lite -> auto
deep_researchpro -> flash -> flash_lite -> auto
analyze_directoryflash -> flash_lite -> auto
validate_pathsPre-check file paths
health_checkDiagnostics
fetch_chunkGet chunked responses

How to install the Gemini MCP server

{
  "mcpServers": {
    "gemini-researcher": {
      "command": "npx",
      "args": ["-y", "gemini-researcher"],
      "env": {
        "PROJECT_ROOT": "your-value",
        "GEMINI_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js 18+ installed - Gemini CLI installed: npm install -g @google/gemini-cli - Gemini CLI authenticated (recommended: gemini → Login with Google) or set GEMINI_API_KEY Quick checks:
VariableDescriptionRequired
PROJECT_ROOTConfiguration value read at startup.Optional
GEMINI_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Gemini to quick query.
  • Use Gemini to deep research.
  • Use Gemini to analyze directory.

Frequently asked questions

It connects Gemini to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (quick_query, deep_research, analyze_directory, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Gemini directly.