What it does
This MCP server integrates the Google Gemini CLI with Claude Code, exposing Gemini's analysis and code-execution capabilities through the ask-gemini and sandbox-test tools. It leverages Gemini's extended token window for analyzing large files and codebases, with support for the @ syntax to reference files and directories directly in prompts. The server also enables web search, code execution in a sandbox environment, and general question-answering routed through Gemini.
Who it's for
Backend engineers, full-stack developers, and data scientists working with large codebases or complex files who need analysis capabilities beyond a single LLM's context window.
Common use cases
- Analyze large source directories or files using Gemini's extended context via @ syntax (e.g.,
@src/ summarize this directory) - Perform web searches for current information directly from Claude Code (e.g., latest tech news, research)
- Safely test and execute code in Gemini's sandbox environment without affecting your local system
- Get detailed explanations of complex codebases by pointing Gemini at specific files
Setup pitfalls
- Requires both Node.js (v16.0.0+) and the Google Gemini CLI to be pre-installed and configured locally
- Configuration must be added to Claude Desktop's config file (location varies by OS) and the terminal session restarted
- Reads and writes the filesystem extensively — ensure proper file permissions and consider sandboxing if untrusted input is analyzed
- Makes network calls to Gemini and external services — requires internet connectivity and valid API credentials in the Gemini CLI